0
votes

I am integrating Cobertura with Jenkins. Build status is success but build result is failure. It is saying that

No coverage results were found using the pattern 'C:\apache-maven-3.3.9\bin\hai\target\site\cobertura\com.infy.App.html' relative to 'C:\Program Files (x86)\Jenkins\jobs\Compare\workspace'. Did you enter a pattern relative to the correct directory? Did you generate the XML report(s) for Cobertura?

Build step 'Publish Cobertura Coverage Report' changed build result to FAILURE

Finished: FAILURE

Please help me.

TIA

1
What's your job configuration? Where does cobertura generate the reports? After a run, can you see the generated files? - Morfic

1 Answers

0
votes

Cobertura has to generate the XML files before publishing the coverage reports.

To do it go to Configure > Post Steps > Execute shell > command.

Also see this post