From 55c747fdbe04001e3d02898ea6ac316f9d1d655c Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 14 Jul 2020 16:08:10 +0200 Subject: [PATCH] [TouchRunner] Print test output to the console. (#75) Updated versions of NUnit will capture Console.Out during a test run. We want to show it in the Console, so write it there when the test has finished. I couldn't find a way to tell NUnit to not capture Console.Out in the first place. --- NUnitLite/TouchRunner/TouchRunner.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NUnitLite/TouchRunner/TouchRunner.cs b/NUnitLite/TouchRunner/TouchRunner.cs index 68a39f0..9b3b018 100644 --- a/NUnitLite/TouchRunner/TouchRunner.cs +++ b/NUnitLite/TouchRunner/TouchRunner.cs @@ -494,6 +494,10 @@ public virtual void TestFinished (ITestResult r) Writer.Write (" : {0}", message.Replace ("\r\n", "\\r\\n")); } Writer.WriteLine (); +#if NUNITLITE_NUGET + if (!string.IsNullOrEmpty (result.Output)) + Writer.WriteLine (result.Output); +#endif string stacktrace = result.StackTrace; if (!String.IsNullOrEmpty (result.StackTrace)) {