我正在尝试使用 Cobertura 应用代码覆盖率。该应用程序是
部署在 Tomcat 5 中,但是当我检测 .class 文件时,
应用程序停止工作。
这是我的步骤:
有人有在 Tomcat 中正确部署应用程序的正确步骤吗
与 Cobertura 的课程一起使用吗?
参考:http://cobertura.sourceforge.net/faq.html
我正在使用 cobertura-1.9.4.1
正确的步骤是:
- 编译应用程序
检测类文件。D:\test\cobertura-1.9.4.1\cobertura-instrument.bat --destination D:\test\instrument D:\src\path_to_app\main\target\webapp
(它创建了一个 cobertura.ser)
覆盖类文件D:\src\path_to_app\main\target\webapp
与仪表化的类文件D:\test\instrument
.
- 将 cobertura.jar 复制到 WEB-INF/lib
- 直接或通过 war 文件在 Tomcat 中部署应用程序。
- 将 cobertura.ser 复制到 tomcat 的当前目录(tomcat/bin 或 system32,否则您将在错误日志中看到该路径)
- 使用该应用程序,并停止 tomcat 服务器。
- 使用更新的 cobertura.ser(在 system32 或...)构建报告(至少对我来说,大小没有改变)
参考:
-http://cobertura.sourceforge.net/faq.html——JB 尼泽的回答
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)