Reputation: 355
I am having issue resolving Jenkins unit test fail with following error: "testException = java.lang.AssertionError: expected:<> but was:<>" Jenkins build was success with Unit test fail. Please help.
Upvotes: 0
Views: 1037
Reputation: 136
Can you give some more details about your jenkins job? I believe you need to publish the junit test results to alter the build status.
E.g. If you are using a jenkinsfile for your configuration
// publish JUnit results to Jenkins
step([$class: 'JUnitResultArchiver', testResults: '**/build/test-results/*.xml'])
If you are using the ui configuration for the job there is a field where you can configure this.
Upvotes: 1