Hi,
I try to answer the JaCoCo some specific questions, for Sonar please
check their mailing list.
Will the report generated by the ExecutionDataClient be in a merged state, an
appended state, will it be overwritten,
or is this behavior determined by the append flag for each agent?
The append flag of the JaCoCo agent has no meaning if you run the agent
on tcpserver output mode.
The ExecutionDataClient example actually overwrites an existing file.
You might change this by adding true as a second parameter here:
final FileOutputStream localFile = new FileOutputStream(DESTFILE,
true);
Is there a difference between merge and append?
Appending means simply appending the session data to an exiting file
with all probes listed separately. The merge tasks merges all probes of
all sessions into a single data structure. This compacts exec files but
also combines the data of all sessions.
For parallel tests running across multiple vm's using two processes, is a merge
even possible and if it is will
it provide accurate coverage reports?
Yes.
What if report-a.exec has 10% coverage for TestB... would the lines of code be
compared and overlapped with
report-b.exec such that an accurate coverage percentage is displayed?
Yes. All probes will be "overlapped". I.e. only parts executed neither
in A nor B will be considered as uncovered.
Best regards,
-marc
On 08.07.14 17:56, [email protected] wrote:
Here's my situation: I'm running execution analysis with the jacoco agent on
multiple vm's which each need two separate processes analyzed and the coverage
reports viewable by SONAR.
The solution that's been devised so far is to attach an agent to each process
running in tcpserver mode, running a client on another remote machine. Prior to
SONAR analysis a remote dump is performed (sequentially) and the results
imported into SONAR.
I'm basing my client off the API example
(http://www.eclemma.org/jacoco/trunk/doc/examples/java/ExecutionDataClient.java)
with a reset on dump.
What I'm wondering:
Will the report generated by the ExecutionDataClient be in a merged state, an
appended state, will it be overwritten, or is this behavior determined by the
append flag for each agent?
Is there a difference between merge and append?
For parallel tests running across multiple vm's using two processes, is a merge
even possible and if it is will it provide accurate coverage reports?
ie) MachineA runs TestA, MachineB runs TestB off the package org.myapplication:
report-a.exec: org.myapplication.TestA - 50% coverage
report-a.exec: org.myapplication.TestB - 0% coverage
report-b.exec: org.myapplication.TestA - 0% coverage
report-b.exec: org.myapplication.TestB - 50% coverage
Would an appended and/or merged report display results such as:
report-merged.exec: org.myapplication.TestA - 50% coverage
report-merged.exec: org.myapplication.TestB - 50% coverage
What if report-a.exec has 10% coverage for TestB... would the lines of code be
compared and overlapped with report-b.exec such that an accurate coverage
percentage is displayed?
When it is said that "SONAR can accept multiple jacoco reports," does this mean
I could simply output these reports with unique filenames, dump them somewhere, feed the
location to SONAR, and it'll be able to interpret an accurate coverage percentage?
--
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.