We've got a multiproject we're trying to run Cobertura test coverage reports on as part of our mvn site build. I can get Cobertura to run on the child projects, but it erroneously reports 0% coverage, even though the reports still highlight the lines of code that were hit by the unit tests. We're using mvn 2.0.8. I've tried running "mvn ...
I am using the Maven (2) Cobertura plug-in to create reports on code coverage, and I have the following stub I am using in a method:
try {
System.exit(0);
} catch (final SecurityException exception) {
exception.printStackTrace();
}
System.err.println("The program never exited!");
I know that I need to log the exception, etc, b...
I'm trying to configure my WAR project build to fail if the line or branch coverage is below given thresholds. I've been using the configuration provided on page 455 of the excellent book Java Power Tools, but with no success. Here's the relevant snippet of my project's Maven 2 POM:
<build>
...
<plugins>
<plugin>
<groupId>org.code...
I've got some projects that are already doing site generation via maven, and I want to integrate cobertura reports in them, but no maven goal I seem to run will generate a local preview for me to look at that includes the Cobertura reports in the site. I want to be sure they're generating correctly before I commit the pom changes to the...
My company is in the middle of upgrading our build system to use Buckminster (which has gone well). Naturally the managers would like it if we could automatically generate some of the metrics they use for code while we're at it - one of these metrics is coverage for the unit tests.
The previous build, which was PDE-based, resulted in a ...
I've found a solution, see my own answer below. Does anyone have a more elegant one?
Assume the following class to be tested:
public class Foo {
private final Logger logger = LoggerFactory.getLogger(Foo.class);
public void bar() {
String param=[..];
if(logger.isInfoEnabled()) logger.info("A message with paramete...
Is there a way to exclude code from inclusion into Cobertura coverage reports? We have some methods that should not be include in the coverage report and therefore not drive down the coverage numbers.
I know that Clover has such a functionality, but I have not found anything similar for Cobertura.
...
hi,
I'm using the maven cobertura plugin to generate coverage reports, but for some reason, the instrument goal gets stuck in an infinite loop. In my classes directory (named bin), an infinite loop occurs and creates directories named generated-classes/cobertura/generated-classes/cobertura...and on and on as long as I let the instrument...
Hi,
I have a problem that when I run the cobertura target maven, the report always shows 0%.I've tried forking my junit tests, and no luck. I've tried configuring the cobertura plugin in the reporting section and build section of the pom, and also tried binding it to both the site and package phase. Any thoughts?
On a related note, I'v...
is there a way to have the cobertura test coverage graph be shown on the front page of a project, similar to the test trend graph? I'd like to have that displayed next to the coverage graph. Any help would be appreciated. Thanks.
...
Hi,
I have a maven2 project in hudson and when the cobertura reporting plugin runs, it causes the unit tests to show that they have run twice. I don't mind them running multiple times, but the trend graph shows twice as many tests as we actually are running. Is there a way to make sure the graph only shows them once?
thanks,
Jeff
...
Does anybody know where Cobertura sticks it's coverage report image?
The url to my image is:
http://ContinualTests/746/cobertura/graph
When I dig down on my box that is running tomcat/hudson I find
tomcat6/.hudson/jobs/XX/builds/746 but I don't see the graph. Is the image getting generate on the fly? Seems like something that wou...
Is there a Cobertura (or other code coverage tool) equivalent for C# .NET?
...
Has anyone been able to use maven2 with the Aspectj plugin, and Cobertura plugin? I keep getting 0% coverage, when I should get something. Cobertura instrumentation is running before Aspectj weaving which, I think, is messing up the Cobertura instrumentation. Also, Cobertura is giving warnings about my aspects, it looks like it is trying...
Hello everybody,
i have a maven project with 4 modules - 3 of them contain code and some tests (testing equals and hashcode of the classes) whereas the 4th module is for testing the 3 other modules.
Now i want to run the cobertura code coverage tool to get an overview which classes are well tested and which are not. I did some investig...
I'm migrating a couple of projects from an ant build to a maven one. The build server is , and will remain, Hudson.
I've been having trouble recording code coverage in hudson with cobertura due to the tests run and recorded twice problem.
The project is multi-module and it would be nice, although not required, to have an aggregated out...
I tried to get Cobertura running inside my ant script, but I'm stuck right at the beginning. When I try to insert the cobertura taskdef I'm missing the Log4J libraries.
Ant properties & classpath
<property name="cobertura.dir" location="/full/path/to/cobertura-1.9.3" />
<path id="cobertura.classpath">
<fileset dir="${cobertura.dir}">...
Hi Friends
In my project I need to create Cobertura Code Coverage report from Hudson using maven build. In Hudson I haved added the Cobertura Code Coverage plugin.
I need the complete modification steps of pom.xml.
Please help me.
Thanks
...
Hi there, i have a Maven 2 project setup which nicely packages a war file using a pom.xml now i want to introduce Cobertura to that. I can succesfully instrument the classes but when i want to package the instrumented classes and deploy them to my jboss server the wrong files are being packaged.
My target tree looks like this:
\target
...