Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fail hudson build on single unit test failure

Tags:

junit

hudson

Is there a way to cause hudson to report a build as failed, rather than unstable, if only a single unit test fails? thanks.

like image 854
Jeff Storey Avatar asked Jun 17 '09 00:06

Jeff Storey


2 Answers

Hudson actually enables the ignoring of test failures. It just needs to be put as a property in hudson. -Dmaven.test.failure.ignore=false

like image 85
Jeff Storey Avatar answered Jan 04 '23 00:01

Jeff Storey


It's actually not a good idea to fail the build if tests failed when using hudson. Problem is hudson will not report the state of test pass/fail if the build fails. If the build fails, hudson deems it to not have completed properly and thus does not act on the result.

like image 29
Michael Wiles Avatar answered Jan 03 '23 23:01

Michael Wiles