AlwaysALearner
AlwaysALearner

Reputation: 355

Jenkins build success but failed on Unit test

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

Answers (1)

Kirsteen
Kirsteen

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

Related Questions