Conversation
somdoron
commented
Jul 18, 2016
- Outcome of a test is never printed
- Test is being printed when the test is finished, problematic when I want to find an hanging thread. To fix printing the name of the test when the test starts
@@ -190,7 +190,7 @@ int Execute() | |||
else | |||
{ | |||
TestExecutionListener listener = new TestExecutionListener(_testExecutionSink, _options, assemblyPath); | |||
SetupLabelOutput(listener); | |||
SetupLabelOutput(listener); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and rebased
@jasonwilliams200OK fixed and rebased. |
Thanks @somdoron. Would be nice to have a test to verify the changes. :) |
@jasonwilliams200OK will add, might take me a day. |
|
||
string output = null; | ||
|
||
if (testResult.Messages.Count > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a miss, good catch. 👍
@rprouse I there a stated standard C# level to be used for dotnet-test-nunit? |
@CharliePoole there is no stated C# level, but because .NET Core 1.0 requires Visual Studio 2015 Update 3, I have been using C# 6 features. |
@jasonwilliams200OK I added tests. @rprouse the current implementation doesn't print the label twice as the WriteLabelLine protects against that. @CharliePoole @rprouse Regarding printing the label before the tests, right now it is only if you set the labels to All, if set to ON it will print the test when test is finished. |
@@ -215,7 +250,7 @@ public void FiresSuiteFinished() | |||
|
|||
Assert.That(test, Is.Not.Null); | |||
Assert.That(test, Is.EqualTo("NUnit.Framework.Internal.CultureSettingAndDetectionTests.LoadWithFrenchCanadianCulture")); | |||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra space :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and rebased.
@somdoron Actually, your implementation is correct, based on the intent for All versus On. The console implementation originally worked that way but it somehow got messed up when we made some changes to it. |
Can the PR be merged? |
if (labels == "ALL") | ||
WriteLabelLine(args.TestName); | ||
}; | ||
|
||
listener.TestFinished += (sender, args) => | ||
{ | ||
if (labels == "ALL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are going to add the labels ALL to the start, let's remove it from here. When we go multi-threaded, the currentLabel code you pointed to could fail to prevent the second print.
@somdoron one small change, then we can merge. |
@rprouse fixed and rebased |
👍 waiting for CI Thanks for your help. |
thanks |