question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NUnit runner: Handle specific non-zero exit codes

See original GitHub issue

Right 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:closed
  • Created 8 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
gep13commented, Jul 14, 2016

@jrnail23 this should be in the next release of Cake, big thanks to @ChrisMaddock

1reaction
ChrisMaddockcommented, May 18, 2016

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.

It might make sense to add a virtual member to Tool<ToolSettings> so that each tool can opt in to handle it’s own errors.

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found