问题原因:
jenkins-plugin-report无法识别绝对路径,只能识别相对路径
报错信息如下:
coverage-report:
[mkdir] Created dir: D:\JK\workspace\d9_rm3_engine_dev1.0.0_cud\view\rmv3_engine\engine_j2ee\doc\coveragereport
[cobertura-report] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[cobertura-report] Cobertura: Loaded information on 114 classes.
[cobertura-report] Report time: 913ms
BUILD SUCCESSFUL
Total time: 1 minute 44 seconds
Publishing Cobertura coverage report...
No coverage results were found using the pattern 'view/rmv3_engine/engine_j2ee/doc/coveragereport/coverage.xml' relative to 'D:\JK\workspace\d9_rm3_engine_dev1.0.0_cud\view'. 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
Recording test results
Finished: FAILURE
覆盖率报告已经生成,在工作区也可以找到,路径是:'view/rmv3_engine/engine_j2ee/doc/coveragereport/coverage.xml',但jenkins对于这个路径似乎不认,以前用svn的时候可以找到,改成CC后就找不到了
解决方法:
job配置里面将覆盖率的路径设置为:**/coverage.xml 就可以了。
After trying in different ways to solve the above problem,I could solve it by placing the TestResult.xml
file in the workspace folder for the project in Hudson
s jobs
folder and giving only TestResult.xml
under Publish NUnit test result report
instead of giving the absolute path to the xml file.