Nunit3 task does not log anything on to the console
varunthakur2480 opened this issue · 8 comments
The Nunit3 task simply loads the Dll's in separate instances and runs tests , it does not log any output onto the console not even the summary of total tests at the end of the run.
This is very problematic as the screen seems to freeze for the duration of the tests and devs cannot be sure of the results , they also have to wait for all tests to finish.
I think the problem is with Nunit3 as Nunit3-console.exe works flawlessly.
Hi @varunthakur2480.
I quickly tested this against a build I had kicking about on my laptop and got some output on the console. I get output from any tests that have outputted data to the console and also get feedback of what test is running. I an running the task and have the verbose option turned on. How are you running the task and what are you passing to it ?
Regards
Hi Steve,
I am running nunit3 task on multiple assemblies and assume that you also tested in multi threaded setup.Here are the options I used
NUnit3 Assemblies="@(NUnitTestAssemblies->'%(FullPath)')"
Process="Multiple"
TestTimeout="360000"
Framework="v4.0"
Force32Bit="true"
Workers="1"
EnableShadowCopy="false"
ToolPath="$(NUnit3RunnerDir)\tools"
OutputXmlFile="$(UnitTestLogDir)\MyTestOutput.xml"
WorkingDirectory="./"
ShowLabels="All"
InternalTrace=""
TextOutputFile="$(UnitTestLogDir)\TestOutput.txt"
ErrorOutputFile="$(UnitTestLogDir)\TestErrorOutput.txt"
Verbose="true"
Where ="cat !=/$(UnitTestCategoryExcludes)
I couldn't see the options in your reply ?
Hi @varunthakur2480.
This is the NUnit3 usage in my test proj file and below is attached the output from the cmd line.
In one of the test fixtures in Setup I output "Setup output" on the console to show that the redirection of the std out from the test is working correctly.
Hope this is useful.
<NUnit3 Assemblies="@(TestAssemblies)"
Process="Multiple"
TestTimeout="2000"
Framework="v4.0"
Force32Bit="true"
Workers="10"
EnableShadowCopy="true"
OutputXmlFile="myTestOutput.xml"
WorkingDirectory="./"
ShowLabels="All"
NoHeader="true"
NoColor="true"
Verbose="true"/>
</Target>
Regards Steve.
Updated the comment , seems that it does not display traditional msbuild tags that start with <
Hi.
I ran my tests again on the command line through msbuild with your settings and yes you don't get any feedback on what tests are running as you have redirected the output from the task to the TextOutputFile location. I still got a summary though so not 100% why you are not getting this when you are running the task through msbuild. If you remove the TextOutputFile and ErrorOutputFile attributes and see what you get. Hopefully you will get the correct test output....
Regards.
thanks for looking into this , it turns out that it was a combination of two issues,
- Redirection of logs as you mentioned above
- I was calling the msbuild from a command file which had the verbosity set to minimal
No probs. Glad to be of help.