My theory is that this is what is happening:
"Why does a class show as not covered although it has been executed?
First make sure execution data has been collected. For this select the Sessions link on the top right corner of the HTML report and check whether the class in question is listed. If it is listed but not linked the class at execution time is a different class file. Make sure you're using the exact same class file at runtime as for report generation. Note that some tools (e.g. EJB containers, mocking frameworks) might modify your class files at runtime."
Now can I configure the agent to dump all the classes it sees and give that to the maven report task to generate the report correctly?
-
Karthik
I have been able to get the coverage reports by dumping the classes and use the ant task to use that. My coverage reports are now showing up fine.
But the catch is that source code information is not available in the generated HTML Reports. Here's how my ANT Tasks look like..
https://gist.github.com/KarthikDot/7154630
My Source Code is available in the {src.dir} but the only catch is that this is a multi module project, and there are different folders have the source code...
How can I get the HTML Reports to show the code as well?
Make sure the following prerequisites are fulfilled to get source code highlighting in JaCoCo coverage reports: