示例#1
0
 public override void Process(AllureCSharpCommons.AllureModel.testcaseresult context)
 {
     context.status  = status.failed;
     context.failure = new failure
     {
         message    = mErrorInfo.Message,
         stacktrace = mErrorInfo.StackTrace
     };
 }
 public override void Process(testcaseresult context)
 {
     context.start = _started.HasValue ? _started.Value.ToUnixEpochTime() : AllureResultsUtils.TimeStamp;
     context.status = status.passed;
     context.name = Name;
     context.title = Title;
     context.description = Description;
     context.labels = Labels;
 }
 public override void Process(testcaseresult context)
 {
     context.status = Status;
     if (Throwable != null)
     {
         string message = Throwable.Message;
         string stacktrace = !String.IsNullOrEmpty(StackTrace) ? StackTrace : "There is no stack trace";
         
         context.failure = new failure(message, stacktrace);
     }
     else
     {
         context.failure = new failure(Message);
     }
 }
        public void TestCaseStorageTest()
        {
            var storage = new TestCaseStorage();
            var testcaseresult1 = new testcaseresult();
            var testcaseresult2 = new testcaseresult();
            var testcaseresult3 = new testcaseresult();

            storage.Put(testcaseresult1);
            Assert.AreEqual(testcaseresult1, storage.Get());

            new Thread(() =>
            {
                storage.Put(testcaseresult2);
                Thread.Sleep(100);
                Assert.AreEqual(testcaseresult2, storage.Get());
            }).Start();

            new Thread(() =>
            {
                storage.Put(testcaseresult3);
                Assert.AreEqual(testcaseresult3, storage.Get());
            }).Start();
        }
 public abstract void Process(testcaseresult context);
 public override void Process(testcaseresult context)
 {
     context.stop = _finished.HasValue ? _finished.Value.ToUnixEpochTime() : AllureResultsUtils.TimeStamp;
 }
 public override void Process(testcaseresult context)
 {
     var attachment = AllureResultsUtils.WriteAttachmentSafely(Attachment, Title, Type);
     context.attachments = ArraysUtils.Add(context.attachments, attachment);
 }
 public override void Process(testcaseresult context)
 {
     context.parameters = ArraysUtils.Add(context.parameters, new parameter(Name, Value, parameterkind.environmentvariable));
 }