You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
The desired use case is to collect coverage when JUnit testing a Java 'main' class. Typically, such a 'main' class is tested by spawning it in its own process during the JUnit test. A naive process execution (e.g. exec 'java acme.Main') cannot collect coverage, since it does not load the JaCoCo agent. So, it is understood that at least some JaCoCo argument must be passed in the exec line. However, it is hard to see how that argument can be properly constructed from within the JUnit test. At least the following is unknown/hard to obtain:
Exact classpath of the jacoco agent
Port of the Jacoco server
Sessionid to be used
Ideally, the Emma plugin would make the required JaCoCo argument available as a 'defined' property, e.g. 'jacoco.jvm.arg', available for application during the JUnit test. In this way, child processes can easily be constructed with the appropriate JaCoco configuration argument.
The text was updated successfully, but these errors were encountered:
The EclEmma plug-in currently accepts a single connection per launch only. For multiple connections we have to clarify whether they create different sessions or get merged into the same session. If a dump is requested from a running VM should the child processes also considered?
As a workaround you could configure a file output location for the child processes and import/merge the created exec file.
The desired use case is to collect coverage when JUnit testing a Java 'main' class. Typically, such a 'main' class is tested by spawning it in its own process during the JUnit test. A naive process execution (e.g. exec 'java acme.Main') cannot collect coverage, since it does not load the JaCoCo agent. So, it is understood that at least some JaCoCo argument must be passed in the exec line. However, it is hard to see how that argument can be properly constructed from within the JUnit test. At least the following is unknown/hard to obtain:
Ideally, the Emma plugin would make the required JaCoCo argument available as a 'defined' property, e.g. 'jacoco.jvm.arg', available for application during the JUnit test. In this way, child processes can easily be constructed with the appropriate JaCoco configuration argument.
The text was updated successfully, but these errors were encountered: