Example #1
0
        public static void Pass(string message)
        {
            var result = new TestStepEvent()
            {
                Timestamp = TimeStamp(),
                Type      = "PASS",
                Message   = message
            };

            _testStepResult.Add(result);
            PostToLog("PASS", $"[{result.Timestamp}] PASS: {message}");
        }
Example #2
0
        public static void Fail(string message)
        {
            var screenshot = Path.GetFileName(CreateScreenShot());
            var result     = new TestStepEvent()
            {
                Timestamp  = TimeStamp(),
                Type       = "FAIL",
                Message    = message,
                Screenshot = screenshot
            };

            _testStepResult.Add(result);

            PostToLog("FAIL", $"[{result.Timestamp}] FAIL: {message} [{screenshot}]");
            FailCount += 1;
        }
Example #3
0
 public void Add(TestStepEvent stepEvent)
 {
     StepEvents.Add(stepEvent);
     if (stepEvent.Type == "PASS")
     {
         TotalPass += 1;
         if (OverallResult == "LOG")
         {
             OverallResult = "PASS";
         }
     }
     else if (stepEvent.Type == "FAIL")
     {
         TotalFail    += 1;
         OverallResult = "FAIL";
     }
 }