NUnit runner: Handle specific non-zero exit codes
See original GitHub issueRight now, any time the NUnit console tool returns a non-zero exit code, the Cake NUnit runner throws a CakeException
with the less-than-helpful error message, NUnit: Process returned an error.
I think this behavior is too broad, as it treats failed tests the same as an unexpected problem. I’d like the flexibility to decide whether to blow up my build based on test failures, errors, etc.
NUnit does have meaningful exit codes (discussed here), so we should throw more specific exceptions as appropriate.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Console Runner
Console Exit Codes. The console will exit with zero if all tests pass, a positive number if there are any test failures, and...
Read more >nunit-console return codes
The main purpose of a return code in this case is to allow a decision as to whether the build is broken. Generally,...
Read more >Where can I find the meaning of NUnit console exit codes?
I am getting error message from my MSBuild: "nunit-console.exe" exited with code -100. Where can the meaning of the NUnit console exit codes...
Read more >NUnit test runner exiting without an exception
Our test build has suddenly started failing on a specific unit test ... The process exit code is -1073740940 and I have a...
Read more >Cake v0.15.0 released
Patrik has been very busy working on the port of Cake to run on the CoreClr (you ... #517 NUnit runner: Handle specific...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jrnail23 this should be in the next release of Cake, big thanks to @ChrisMaddock
I’d be interested in taking a look at this. We wrote some new scripts for the NUnit code samples recently, and it was this limitation which meant we decided to use NUnit via the console, instead of the tool.
@patriksvensson - I’m not yet familiar with Cake’s internal tool architecture, and it sounds like you have some ideas - mind posting a rough overview of what you’d expect this to look like?