angularjs - How to make Jenkins fail the build of zero tests were run (due to configuration error) -
i have jenkins job runs javascript unit tests (jasmine + karma). result of step junit-compatible xml file.
i have configured post-build action using `` publish xunit test result report` plugin, can handle variety of test result formats, including junit.
it works fine, if there failed tests, step fails build.
...but doesn't fail build in case of catastrophic failure: if there error bad in web app no tests run @ all, xml result file happily
<testsuite/>
... meaning there 0 tests, meaning there 0 failed tests, meaning peachy! that's false positive if ever saw one.
how can configure jenkins / xunit reports plugin / ... take failure case account?
fwiw: use bower
manage js modules use, , config file had error, no 3rd party deps downloaded our angular app, including angular package.
i did using 'text finder' plugin, , searching exact file contents if there no tests.
it's totally counter-intuitive, in order fail build, need not check 'succeed if found' checkbox (in negative logic, "don't succeed (fail) if not found").
Comments
Post a Comment