Beispiel #1
0
        void SaveResult()
        {
            WriteSummary("{0} tests, {1} passed, {2} errors, {3} ignored.", countTests, countSuccess, countErrors, countIgnored);
            WriteSummary("Total time: {0}.", endTime - startTime);

            if (ResultOutput != null)
            {
                var serialized = TestSerializer.WriteTestResult(result);
                var settings   = new XmlWriterSettings();
                settings.Indent = true;
                using (var writer = XmlTextWriter.Create(ResultOutput, settings))
                    serialized.WriteTo(writer);
                Debug("Result writting to {0}.", ResultOutput);
                AddFile(ResultOutput);
            }

            if (!string.IsNullOrWhiteSpace(stdout) && File.Exists(stdout))
            {
                AddFile(stdout);
            }
            if (!string.IsNullOrWhiteSpace(stderr) && File.Exists(stderr))
            {
                AddFile(stderr);
            }

            var printer = new ResultPrinter(global::System.Console.Out, result);

            printer.Print();
        }
Beispiel #2
0
        void SaveResult()
        {
            WriteSummary("{0} tests, {1} passed, {2} errors, {3} unstable, {4} ignored.",
                         countTests, countSuccess, countErrors, countUnstable, countIgnored);
            WriteSummary("Total time: {0}.", endTime - startTime);

            if (Options.ResultOutput != null)
            {
                var serialized = TestSerializer.WriteTestResult(result);
                var settings   = new XmlWriterSettings();
                settings.Indent = true;
                using (var writer = XmlTextWriter.Create(Options.ResultOutput, settings))
                    serialized.WriteTo(writer);
                Debug("Result written to {0}.", Options.ResultOutput);
            }

            if (Options.JUnitResultOutput != null)
            {
                JUnitResultPrinter.Print(result, Options.JUnitResultOutput);
                Debug("JUnit result written to {0}.", Options.JUnitResultOutput);
            }

            var printer = new ResultPrinter(global::System.Console.Out, result);

            printer.Print();
        }
Beispiel #3
0
        async Task <bool> ShowResult(CancellationToken cancellationToken)
        {
            await Task.Yield();

            var printer = ResultPrinter.Load(global::System.Console.Out, ResultOutput);

            return(printer.Print());
        }
Beispiel #4
0
        async Task <bool> ShowResult(CancellationToken cancellationToken)
        {
            await Task.Yield();

            var printer = ResultPrinter.Load(global::System.Console.Out, Options.ResultOutput);
            var ret     = printer.Print();

            if (Options.JUnitResultOutput != null)
            {
                JUnitResultPrinter.Print(printer.Result, Options.JUnitResultOutput);
                Debug("JUnit result written to {0}.", Options.JUnitResultOutput);
            }

            return(ret);
        }
Beispiel #5
0
        void SaveResult()
        {
            LogInfo($"Test Result: {result.Status}");
            LogInfo($"{countTests} tests, {countSuccess} passed, {countErrors} errors, {countUnstable} unstable, {countIgnored} ignored.");
            LogInfo($"Total time: {endTime - startTime}.");
            if (JenkinsHtml != null)
            {
                JenkinsHtml.WriteLine($"<p>Test Result: {result.Status}");
                JenkinsHtml.WriteLine($"<br>{countTests} tests, {countSuccess} passed, {countErrors} errors, {countUnstable} unstable, {countIgnored} ignored.");
                JenkinsHtml.WriteLine($"<br>Total time: {endTime - startTime}.</p>");
            }

            if (Options.ResultOutput != null)
            {
                var serialized = TestSerializer.WriteTestResult(result);
                var settings   = new XmlWriterSettings();
                settings.Indent = true;
                using (var writer = XmlTextWriter.Create(Options.ResultOutput, settings))
                    serialized.WriteTo(writer);
                Debug("Result written to {0}.", Options.ResultOutput);
            }

            if (Options.JUnitResultOutput != null)
            {
                JUnitResultPrinter.Print(result, Options.JUnitResultOutput);
                Debug("JUnit result written to {0}.", Options.JUnitResultOutput);
            }

            var printer = new ResultPrinter(System.Console.Out, result);

            printer.Print();

            if (StdOut != null)
            {
                var stdoutPrinter = new ResultPrinter(StdOut, result);
                stdoutPrinter.Print();
            }
        }