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.

Configurable whether process should exit with non-zero exit code when tests failed?

See original GitHub issue

We 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:closed
  • Created 9 years ago
  • Reactions:6
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
costincaraivancommented, Feb 14, 2018

I’m kind of surprised that this is the case. Is no one using Karma with tools like Jenkins? 😦

2reactions
dougludlowcommented, Mar 21, 2019

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?

Read more comments on GitHub >

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

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