Cobertura “unable to locate file” problem

和自甴很熟 提交于 2019-12-13 15:26:33

问题


Can anyone please help me to understand what is wrong here?

I am using Cobertura 1.9.4.1 for Java Code Coverage. I want to attache the source file with HTML report, I am generating report using the below command:

cobertura-report.sh --format html --datafile  $COBERTURA_HOME/core/emscore.ser --basedir $COBERTURA_HOME/core/src --destination $REPORT_DIR

HTML report generated successfully. Where I click on the file name in HTML report, it is giving the below error:

"Unable to locate com/airvana/serverImpl/ObjectDao.java. Have you specified the source directory?"

However I have the Java source file at:

$COBERTURA_HOME/core/src/com/airvana/serverImpl/ObjectDao.java

回答1:


using "--srcdir" instead of "--basedir" worked for me




回答2:


Got the answer from Cobertura's Developer forum. You can also submit your problem to cobertura-devel@lists.sourceforge.net

The final command I used to attache the source with HTML report is the below ().

cobertura-report.sh --format html --datafile $COBERTURA_HOME/core/emscore.ser --destination $REPORT_DIR $COBERTURA_HOME/core/src



来源:https://stackoverflow.com/questions/5592448/cobertura-unable-to-locate-file-problem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!