Hi Ashar,

correct: both ways you describe are possible, and in any case you need configure the agent.

Note that the IAgent.dump() method will trigger a dump according to the configured output mode. Default is writing to disc, but there are other options e.g. for output via tcp/ip streams. See agent documentation.

How you proceed with the exec file or byte[] array (which will have the same content) afterwards depends on what you want to archieve. A separate report for every test? Some new kind of report?

Best regards,
-marc

On 13.04.14 02:07, [email protected] wrote:
Thanks for the reply Marc,

I want to confirm what I have understood. As per my understanding I need to:

1. Run my junit execution program that executes the whole suite with the 
-javaagent command line argument as I am already doing.

2. After each test run, i can do either
     i.   Do a IAgent.dump(true) to create the exec file on disk    or
     ii.  Do a getExecutionData(true) to get byte[].
             Then get the ExecutionDataStore from the byte array by creating a
             ByteArrayInputStream to then create ExecutionDataReader and setting
             an instance of ExecutionDataStore as visitor through 
setExecutionDataVisitor.

Please let me know if this is the right way to do it. I'll give it a try the 
day after.

Regards,
Ashar

I can either do a dump from the

On Saturday, April 12, 2014 1:17:24 PM UTC-4, Marc R. Hoffmann wrote:
Hi Ashar,



there is, but this requires some coding or investigation with other

tools like Sonar:



JaCoCo offers a runtime API (see here:

http://www.eclemma.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/package-summary.html)



You could create your own test JUnit runner or listener which dumps

coverage data after every test through the API -- no need to launch a

new JVM n this case.



AFAIK Sonar provides such a test runner in place:

https://jira.codehaus.org/browse/SONARJAVA-94



Best regards,

-marc



On 11.04.14 20:24, Ashar wrote:

Hi,
I need the unit test coverage for individual Junit tests for multiple large 
projects.
Right now I am using the jacoco agent on the java commandline to run individual 
junit tests and create exec files as per the process I read else where on this 
group.
However this is proving to be too slow and takes hours when for large projects 
compared to running EclEmma in eclipse which takes only ~30 secs for the whole 
suite.
I want to know if there is a more efficient way to do.
Thank,
Ashar

--
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