Configurable whether process should exit with non-zero exit code when tests failed?
See original GitHub issueWe run tests on Jenkins using Karma and Grunt. Karma produces JUnit reports using the karma-junit-reporter
, and we’ve configured Jenkins to set the build as unstable (yellow) if test failures are found in these report files.
The problem is that whenever a test fails, Karma (and Grunt) exits with a non-zero exit code and this makes the build failed (red).
I think the process still should fail in all those cases where the tests haven’t been completely executed, for example when a browser has been disconnected.
Is there any way to configure this today? If not, I’ll gladly provide a pull request.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:6
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Configurable whether process should exit with non-zero exit ...
We run tests on Jenkins using Karma and Grunt. Karma produces JUnit reports using the karma-junit-reporter , and we've configured Jenkins to ...
Read more >make test failures more obvious for non-zero exit status
1. run a unit test that fails w/ non-zero exit status, e.g. log.Fatal() ... Should see FAIL somewhere obvious in the output window,...
Read more >Gradle Test Executor X finished with non-zero exit value 143
We are using Gradle to build and run tests in Jenkins for CI. In many builds we see build failures with the following...
Read more >How to fail JUnit tests if the Java process exits with non-zero ...
exit (1) which I notice (in Java by default non-main threads are OK(!) to die at any point if they encounter an exception...
Read more >Exit Codes for TAEF - Windows drivers | Microsoft Learn
If the exit code is less than or equal to 0xFFFF (65535), then that is the number of non-passing tests (failed, blocked, not...
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
I’m kind of surprised that this is the case. Is no one using Karma with tools like Jenkins? 😦
Just to help any other googlers, the
failOnFailingTestSuite
option was added. Looks like maybe--no-fail-failing-test-suite
could work from the command line?