Code coverage for maven projects ?


I want to use the code coverage mechanism (available with a right click on a Java file: Analyze > Show Code Coverage data) with a maven project. But the menu entry is grey, is it because it is not supported with maven project or did I forgot something ?



1 comment
Comment actions Permalink

Code coverage is collected by IDEA when you run unit tests from within IDEA.
In the run configuration for your unit tests, you need to activate code coverage on a separate tab.
Then after running your test(s) through, you'll see coverage data displayed in the editor and the project tree.

Unfortunately (AFAIK) IDEA does not support reading/displaying coverage data generated by Emma/Cobertura Maven plugins when they run as part of a Maven invocation.
Hmmm... Perhaps I should log it as a feature request in Youtrack.


Please sign in to leave a comment.