Finally, I found out that led to IntelliJ IDEA 12.0.0 (as well as 12.0.1) breaking code coverage.
My project is a GWT project, so there is an additional configuration for running gwt client tests: the source directories are added to the class path, so gwt devmode can be run headless for testing:
<build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.5</version> <configuration> <additionalClasspathElements> <additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement> <additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement> </additionalClasspathElements> </configuration> </plugin> </plugins> </build>
Adding source folders to the surefire class path causes IntelliJ IDEA 12.x to configure the project ( .iml file) .iml and the coverage stops working.
Note that this maven configuration has no effect on IntelliJ IDEA 11.x, which works fine.
To reproduce the error, simply add <additionalClasspathElement> to your confident configuration, then right-click on your project and execute "Maven β Reimport", then run the tests with coverage; and you will see that the editor skips all the information about the coverage of the lines.
I was able to reproduce the problem and I will send an error report.
A workaround would be to comment out the two lines of <additionalClasspathElement> and make "Maven - <additionalClasspathElement> Reimport" and then uncomment them if you need to.
Reported error IDEA-97920 , it will be fixed in 12.0.2
Luigi R. Viggiano
source share