Generating nunit test result when a test fails
I am currently working with the nunit-console. I have a dll which have 8 tests. To run the test a bat file has been created with following command:
nunit-console.exe Sample.dll Result.xml
This runs all the tests & generates the result after completion of entire tests. What I need is to get the result when a single test fails & stop further testing so that i dont have 开发者_如何学Pythonto wait for the entire test to complete.
Is there any thing I can do with the bat file and without touching the source code of Sample.dll.
Please help.
Thanks in advance.
The flag you're looking for on the command line is /stoponerror
From the documentation:
The /stoponerror option causes execution of the test run to terminate immediately on the first test failure or error.
The documentation page is here: http://nunit.com/index.php?p=consoleCommandLine&r=2.6
精彩评论