/// <summary> /// Stores a log file for the test run. Depending on the execution /// environment, this call may not successful. /// </summary> /// <param name="logName">The name of the log file.</param> /// <param name="fileContent">The log file content as a string.</param> public virtual void WriteLogFile(string logName, string fileContent) { if (TestService != null && TestService.HasService(TestServiceFeature.TestReporting)) { TestReportingProvider trp = TestService.GetService <TestReportingProvider>(TestServiceFeature.TestReporting); if (trp != null) { trp.WriteLog(null, logName, fileContent); } } }
/// <summary> /// If supported by any attached test service, this publishes the final /// test results. Typical harness implementations may immediately close /// the web browser channel upon receiving the message, so any other /// reporting should be done first. /// </summary> protected void PublishFinalResult() { // Final publish on the test service if (TestService != null && TestService.HasService(TestServiceFeature.TestReporting)) { TestReportingProvider trp = TestService.GetService <TestReportingProvider>(TestServiceFeature.TestReporting); if (trp != null) { int failures = State.Failures; int total = State.TotalScenarios; trp.ReportFinalResult(null, State.Failed, failures, total, "" /* message is not supported right now */); } } }