Hi Howard,

let's see how we can get you to level 100 of JaCoCo grandmaster. I should prepare batches for this ;-)

Let me provide you with some pointers here:

Running the raw files through the simple ExecDump.java API example from the 
EclEmma site showed probes/coverage exactly how I'd expect. Of course > 
creating a report from the exec file showed 0% coverage.

Make sure you use the exact same class files for report generation as at execution time. Otherwise execution data cannot be matched. You can check on the "sessions" page of the HTML report:

 * Classes under test are listes --> OK, the agent recorded probes properly
 * Classes are not linked to your report --> NOK, you use different
   class files

And even then the generated report did not drill down to source code level, 
only method level.

Do you see a LINE coverage column? If not your classes under test are most likely not compiled with debug informations. This is required by JaCoCo for source highlighting to work.

If you see LINE coverage but no source code this is most likely due to the way you provide the source code to the report generator. Make sure you provide Java source file properly "rooted", meaning relative to the folder where your Java packages start.

Did you check the FAQ? Some of the issues are listed there: http://www.eclemma.org/jacoco/trunk/doc/faq.html

BTW, if you configure the JaCoCo agent for your app server anyways, there should be no need to offline-instrument your class files (unless you are forced to do so due to some interference with other tools modifying your class files at runtime).

Best regards,
-marc

On 07.11.14 02:04, [email protected] wrote:
So I figured it out, all I had to do was add the JaCoCo agent to Liberty's JVM 
arguments and exec files were produced exactly how I wanted them to be.

Running the raw files through the simple ExecDump.java API example from the 
EclEmma site showed probes/coverage exactly how I'd expect. Of course creating 
a report from the exec file showed 0% coverage.

I threw everything I could at this thing.

The only method that worked was actually opening the war files, extracting the 
jar files that I had instrumented from them, extracting the class files from 
the jars, and loading them into my HTML reporter. And even then the generated 
report did not drill down to source code level, only method level.

Unless there's a silver bullet I don't know about then it seems as though I've 
hit a dead end. At this point I don't think this is an issue with JaCoCo so 
much as it is with how war files are packaged and executed within their 
container. Is this the glass ceiling for JaCoCo coverage?

If anybody has been able to automate runtime instrumentation of web services 
and filter all 3rd party libraries from coverage with the Maven plugin (or some 
minimally dependency-invasive method) then I'd love to hear about it. If not, 
then I do realize it's not a fault of JaCoCo. Offline instrumentation is just a 
kind of necessary evil.

Until then, I'll remain grateful for the help you've given me in the past, 
Marc... I really do appreciate that you have a presence in the community.

Cheers!


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to