public void TestComplete(string testName, TestFinishState finishState, long stopwatchMs, string message, string stacktrace) { TestCaseReport report = new TestCaseReport { message = message, classname = InternalReport.name, failureText = finishState.ToString(), finishState = finishState, name = testName, time = TimeSpan.FromMilliseconds(stopwatchMs) }; if (InternalReport.testResults == null) { InternalReport.testResults = new List <TestCaseReport>(); } InternalReport.testResults.Add(report); switch (finishState) { case (TestFinishState.PASSED): InternalReport.passed += 1; break; case (TestFinishState.FAILED): InternalReport.failures += 1; break; case (TestFinishState.SKIPPED): InternalReport.skipped += 1; break; } // TODO: Add hooks for SuiteSetUp and SuiteTearDown, so this can be estimated more accurately InternalReport.time = DateTime.UtcNow - InternalReport.timestamp; // For now, update the duration on every test complete - the last one will be essentially correct }
public void TestComplete(string testName, UUnitFinishState finishState, long stopwatchMs, string message, string stacktrace) { TestCaseReport report = new TestCaseReport { message = message, classname = InternalReport.name, failureText = finishState.ToString(), finishState = finishState, name = testName, time = TimeSpan.FromMilliseconds(stopwatchMs) }; if (InternalReport.testResults == null) InternalReport.testResults = new List<TestCaseReport>(); InternalReport.testResults.Add(report); switch (finishState) { case (UUnitFinishState.PASSED): InternalReport.passed += 1; break; case (UUnitFinishState.FAILED): InternalReport.failures += 1; break; case (UUnitFinishState.SKIPPED): InternalReport.skipped += 1; break; } // TODO: Add hooks for SuiteSetUp and SuiteTearDown, so this can be estimated more accurately InternalReport.time = DateTime.UtcNow - InternalReport.timestamp; // For now, update the duration on every test complete - the last one will be essentially correct }
public void TestComplete(string testName, UUnitFinishState finishState, long stopwatchMs, string message, string stacktrace) { var report = new TestCaseReport { message = message, classname = InternalReport.name, failureText = finishState.ToString(), finishState = finishState, name = testName, time = TimeSpan.FromMilliseconds(stopwatchMs) }; if (InternalReport.testResults == null) { InternalReport.testResults = new List <TestCaseReport>(); } InternalReport.testResults.Add(report); InternalReport.RecalculateCounts(); // TODO: Add hooks for SuiteSetUp and SuiteTearDown, so this can be estimated more accurately InternalReport.time = DateTime.UtcNow - InternalReport.timestamp; // For now, update the duration on every test complete - the last one will be essentially correct }