You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the --explore option with no arguments will list the tests available in the assembly in a flat text list:
>nunit3-console SomeTests.dll --explore
NUnit Console Runner 3.5.0
Copyright (C) 2016 Charlie Poole
Runtime Environment
OS Version: Microsoft Windows NT 10.0.10586.0
CLR Version: 4.0.30319.42000
Test Files
SomeTests.dll
SomeTests.Class1.Test1
I want this list in the NUnit3 xml format, but when I try this
Your command-line is in error. The message indicates that "--explore;format" is not a valid option. That's because a semicolon has no special meaning where you are using it - it's just another character. Only space, colon or equal function to separate an option from it's value. IOW, you are trying to set "explore;format" equal to "nunit3".
Using, for example, "--explore:format=nunit3" (with a colon) works in a fairly perverse way: it saves the output in nunit3 format (the default) in a file named "format=nunit3"!
So you are correct: there is no way to cause the nunit3 format XML output to go to the console.
We will need to discuss this to decide whether to accept it as a possible enhancement of NUnit. Can you explain the use case? Why do you want the XML to go to the console?
@CharliePoole - thanks for the quick response. I agree the command line is incorrect, it was an attempt at an example of what I wanted. I indeed ended up with quite a few files called "nunit3" or "=nunit3" etc, and I couldn't see any test cases in the console source code covering this use case.
The reason I'd like it is that I have a test execution script that reads the test fixtures available in an assembly and allocates them to available execution environments. At the moment I'm spewing a bunch of temp files into my build server's %TEMP% directory. It would be much nicer to simply read the info from stdout and act on it, without having to worry about managing temp files.
I also would like to have option to print formatted output to cosnole to avoid creating temp files.
What do you think about such change: pavzaj@88f4338
?
It has a drawback, because it is not clear where nunit technical headers end and where output starts, but it suits my needs.
Currently the --explore option with no arguments will list the tests available in the assembly in a flat text list:
I want this list in the NUnit3 xml format, but when I try this
An exception message is displayed.
I would prefer not to have to dump the results to a file to read them. Is there anyway I can get XML output from stdout using --explore?
The text was updated successfully, but these errors were encountered: