private void FireErrorOutput(ITestMethodRunnerCallback callback, StreamingTestFileContext testFileContext, JsRunnerOutput jsRunnerOutput) { var error = jsRunnerOutput as JsError; error.Error.InputTestFile = testFileContext.ReferencedFile.Path; callback.FileError(error.Error); testFileContext.TestFileSummary.Errors.Add(error.Error); ChutzpahTracer.TraceError("Eror recieved from Phantom {0}", error.Error.Message); }
private void FireLogOutput(ITestMethodRunnerCallback callback, StreamingTestFileContext testFileContext, JsRunnerOutput jsRunnerOutput) { var log = jsRunnerOutput as JsLog; // This is an internal log message if (log.Log.Message.StartsWith(internalLogPrefix)) { ChutzpahTracer.TraceInformation("Phantom Log - {0}", log.Log.Message.Substring(internalLogPrefix.Length).Trim()); return; } log.Log.InputTestFile = testFileContext.ReferencedFile.Path; callback.FileLog(log.Log); testFileContext.TestFileSummary.Logs.Add(log.Log); }
private void FireFileFinished(ITestMethodRunnerCallback callback, string testFilesString, IEnumerable<StreamingTestFileContext> testFileContexts, JsRunnerOutput jsRunnerOutput) { var jsFileDone = jsRunnerOutput as JsFileDone; var testFileSummary = new TestFileSummary(testFilesString); testFileSummary.TimeTaken = jsFileDone.TimeTaken; foreach (var context in testFileContexts) { context.TestFileSummary.TimeTaken = jsFileDone.TimeTaken; testFileSummary.AddTestCases(context.TestFileSummary.Tests); } callback.FileFinished(testFilesString, testFileSummary); }
private void FireCoverageObject(ITestMethodRunnerCallback callback, StreamingTestFileContext testFileContext, JsRunnerOutput jsRunnerOutput) { var jsCov = jsRunnerOutput as JsCoverage; testFileContext.TestFileSummary.CoverageObject = testFileContext.TestContext.CoverageEngine.DeserializeCoverageObject(jsCov.Object, testFileContext.TestContext); }
private void FireTestFinished(ITestMethodRunnerCallback callback, StreamingTestFileContext testFileContext, JsRunnerOutput jsRunnerOutput, int testIndex) { var jsTestCase = jsRunnerOutput as JsTestCase; jsTestCase.TestCase.InputTestFile = testFileContext.ReferencedFile.Path; AddLineNumber(testFileContext.ReferencedFile, testIndex, jsTestCase); callback.TestFinished(jsTestCase.TestCase); testFileContext.TestFileSummary.AddTestCase(jsTestCase.TestCase); ChutzpahTracer.TraceInformation("Test Case Finished:'{0}'", jsTestCase.TestCase.GetDisplayName()); }
private void FireTestFinished(ITestMethodRunnerCallback callback, StreamingTestFileContext testFileContext, JsRunnerOutput jsRunnerOutput, int testIndex) { var jsTestCase = jsRunnerOutput as JsTestCase; jsTestCase.TestCase.InputTestFile = testFileContext.ReferencedFile.Path; AddLineNumber(testFileContext.ReferencedFile, testIndex, jsTestCase); callback.TestFinished(jsTestCase.TestCase); testFileContext.TestFileSummary.AddTestCase(jsTestCase.TestCase); }