示例#1
0
 private static testResultsTestResult[] GetTestResults(TestSession testSession)
 {
     var xmlTestResults = new List<testResultsTestResult>();
     foreach (TestRun testRun in testSession.TestSuite.TestRuns)
     {
         var testResult = new testResultsTestResult();
         testResult.testName = testRun.TestName;
         testResult.testCategory = testRun.TestType.ToString();
         testResult.durationMillis = testRun.TestDuration.ToString();
         testResult.testDescription = testRun.TestDescription;
         testResult.status = testRun.IsSuccess() ? "SUCCESS" : "ERROR";
         testResult.message = ConcatMessages(testRun.Results);
         xmlTestResults.Add(testResult);
     }
     return xmlTestResults.Count == 0 ? null : xmlTestResults.ToArray();
 }
示例#2
0
        public TestSessionLogTestResultXmlAssert FirstTestResult()
        {
            testResultsTestResult first = _testSessionLog.testResults[0];

            return(new TestSessionLogTestResultXmlAssert(first));
        }
示例#3
0
 public TestSessionLogTestResultXmlAssert(testResultsTestResult testResultsTestResult)
 {
     _testResultsTestResult = testResultsTestResult;
 }