How to calculate code coverage in Hudson using emma for a multi-module maven project but only run tests once
Asked Answered
P

1

1

We have several multi-module projects which I want to run emma against, but I don't want the tests to be run twice, because this results in misleading statistics on the Hudson project home page as unit tests are counted twice.

For a single module project, we can ommit the install goal and just use clean emma:emma to run the tests once, is there any way we can test only using emma instrumented byte code and then build & install the project artifacts without running the tests a second time? Using -Dmaven.tests.skip=true causes emma to fail.

For a full release (i.e. mvn release:perform) the tests should be run un-instrumented.

Preciosa answered 11/8, 2010 at 15:23 Comment(0)
A
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.

Arela answered 13/5, 2011 at 10:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.