Test cases grouped by execution outcome.
 /// <summary>
 /// If existing running test cases, change the status to Other.
 /// </summary>
 public void FinishTest()
 {
     if (runningTestCase != null)
     {
         GroupByOutcome.ChangeStatus(runningTestCase.Name, TestCaseStatus.Other);
     }
 }
Beispiel #2
0
 /// <summary>
 /// If existing running test cases, change the status to Other.
 /// </summary>
 public void FinishTest()
 {
     // Clear RunningTestCase
     if (RunningTestCase != null)
     {
         if (RunningTestCase.Status == TestCaseStatus.Running)
         {
             GroupByOutcome.ChangeStatus(RunningTestCase.Name, TestCaseStatus.NotRun);
         }
         RunningTestCase = null;
     }
     foreach (var testcase in AllTestCases)
     {
         // Clear Waiting cases.
         if (testcase.Status == TestCaseStatus.Waiting && CurrentPageCaseList.Contains(testcase.Name))
         {
             TestCaseStatus status = TestCaseStatus.NotRun;
             TestCaseDetail caseDetail;
             if (testcase.LogUri != null && System.IO.File.Exists(testcase.LogUri.AbsolutePath))
             {
                 Utility.ParseFileGetStatus(testcase.LogUri.AbsolutePath, out status, out caseDetail);
             }
             testcase.Status = status;
         }
         // Clear Running cases. Should not be here
         if (testcase.Status == TestCaseStatus.Running && CurrentPageCaseList.Contains(testcase.Name))
         {
             testcase.Status = TestCaseStatus.NotRun;
             RunningTestCase = null;
         }
     }
 }
 /// <summary>
 /// Update the case status and case log
 /// Find the related case name, change its status and show log to user
 /// </summary>
 public void UpdateCaseFromHtmlLog(TestCaseStatus status, string testCaseName, string testCaseLogPath)
 {
     runningTestCase = AllTestCases.FirstOrDefault(c => c.Name == testCaseName);
     if (runningTestCase == null)
     {
         return;
     }
     GroupByOutcome.ChangeStatus(testCaseName, status);
     runningTestCase.LogUri = new Uri(testCaseLogPath);
     runningTestCase        = null;
 }
Beispiel #4
0
 /// <summary>
 /// Update the case status and case log
 /// Find the related case name, change its status and show log to user
 /// </summary>
 public void UpdateCaseFromHtmlLog(TestCaseStatus status, string testCaseName, TestCaseDetail detail, string testCaseLogPath)
 {
     RunningTestCase = AllTestCases.FirstOrDefault(c => c.Name == testCaseName);
     if (RunningTestCase == null)
     {
         return;
     }
     GroupByOutcome.ChangeStatus(testCaseName, status);
     RunningTestCase.LogUri          = new Uri(testCaseLogPath);
     RunningTestCase.Assembly        = detail.Source;
     RunningTestCase.StartTime       = detail.StartTime;
     RunningTestCase.EndTime         = detail.EndTime;
     RunningTestCase.StdOut          = String.Join("\n", detail.StandardOut.Select(output => output.Content));
     RunningTestCase.ErrorMessage    = String.Join("\n", detail.ErrorMessage);
     RunningTestCase.ErrorStackTrace = String.Join("\n", detail.ErrorStackTrace);
     RunningTestCase = null;
 }
 /// <summary>
 /// If existing running test cases, change the status to Other.
 /// </summary>
 public void FinishTest()
 {
     // Clear RunningTestCase
     if (RunningTestCase != null)
     {
         if (RunningTestCase.Status == TestCaseStatus.Running)
         {
             GroupByOutcome.ChangeStatus(RunningTestCase.Name, TestCaseStatus.NotRun);
         }
         RunningTestCase = null;
     }
     foreach (var testcase in AllTestCases)
     {
         // Clear Running cases. Should not be here
         if (testcase.Status == TestCaseStatus.Running && CurrentPageCaseList.Contains(testcase.Name))
         {
             testcase.Status = TestCaseStatus.NotRun;
             RunningTestCase = null;
         }
     }
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public Logger()
 {
     GroupByOutcome = new GroupByOutcome();
     GroupByCategory = new GroupByCategory();
 }
 /// <summary>
 /// To refresh the test case lists.
 /// </summary>
 public void RefreshTestCaseLists()
 {
     GroupByOutcome.SetTestCaseList(AllTestCases);
     GroupByCategory.SetTestCaseList(AllTestCases);
 }
 /// <summary>
 /// Filter test cases.
 /// </summary>
 /// <param name="testcases">test cases</param>
 public void ApplyFilteredList(List <TestCase> testcases)
 {
     GroupByOutcome.SetTestCaseList(testcases);
     GroupByCategory.SetTestCaseList(testcases);
 }
 /// <summary>
 /// Initialize the logger.
 /// </summary>
 /// <param name="allTestCases">all test cases</param>
 public void Initialize(List <TestCase> allTestCases)
 {
     AllTestCases = allTestCases;
     GroupByOutcome.SetTestCaseList(allTestCases);
     GroupByCategory.SetTestCaseList(allTestCases);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public Logger()
 {
     GroupByOutcome  = new GroupByOutcome();
     GroupByCategory = new GroupByCategory();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public TestSuiteLogManager()
 {
     GroupByOutcome  = new GroupByOutcome();
     GroupByCategory = new GroupByCategory();
 }