1

我们有几个多模块项目,我想针对这些项目运行 emma,但我不希望测试运行两次,因为这会导致 Hudson 项目主页上的统计数据具有误导性,因为单元测试被计算了两次。

对于单个模块项目,我们可以省略安装目标,只使用干净的 emma:emma 运行测试一次,有什么方法可以只使用 emma 检测字节码进行测试,然后构建和安装项目工件而不运行测试第二次?使用 -Dmaven.tests.skip=true 会导致 emma 失败。

对于完整版本(即 mvn release:perform),测试应该在未检测的情况下运行。

4

1 回答 1

0

You may consider the following article to answer "how to calculate.." code coverage. The coverage would then not be visible in Hudson but in sonar. This is not exactly what you are looking for, but sonar is worth an evaluation. (Installation is really a breeze)

I would use a profile to activate the test configuration with emma, and that by default the project is built and installed without running tests.

于 2011-05-13T10:46:50.073 回答