jenkinsci / cobertura-plugin

Jenkins cobertura plugin
https://plugins.jenkins.io/cobertura/
MIT License
109 stars 133 forks source link

Can't find coverage.xml, which exists and matches search pattern #41

Open abbybader opened 9 years ago

abbybader commented 9 years ago

Hi, the Cobertura plugin seems to have a problem finding the coverage documents. When configured to fail when no coverage files are found, the job does fail.

The files are there. Log message is:

[Cobertura] No coverage results were found using the pattern '**/target/site/cobertura/coverage.xml​' relative to '/home/[user]/jenkins_server_home/jenkins/jobs/Measure_code_quality/workspace'

Listing such a directory:

$ ll /home/[user]/jenkins_server_home/jenkins/jobs/Measure_code_quality/workspace/[appName]/target/site/cobertura
total 304
-rw-r--r-- 1 jenkins jenkins 308049 Jan 15 14:07 coverage.xml

Browsing the job's workspace, I can see the file "[appName]/target/site/cobertura/coverage.xml", which is non-empty and looks well-formed. Coverage rates are non-zero.

I have verfied that these files are actively being produced by wiping out the job's workspace and rebuilding.

Can you offer any insight into this?

abbybader commented 9 years ago

Still having problems with this. For further info: We switched recently to Java 8, but switching back to Java 7 hasn't seemed to get the plugin working again. Cobertura xml and html outputs are well-formed and correct(-looking) in either case. Currently on Jenkins 1.597, Cobertura plugin version 1.9.6. Have tried other combinations including older jenkins version; Cobertura version 1.9.3; nothing seems to work.

I'm getting around this by producing Cobertura's HTML file structure, but we'd ideally like to get this integrated into our build system again. Is this a known problem? Any steps I can take to try to debug this?

stad-nico commented 4 months ago

Having the same problem with cobertura report generated by jest. Pattern is **/cobertura-coverage.xml, the file does exist in the workspace, is not empty and is owned by the correct user.