in order for my bachelor exam
I develop a plugin using the jacoco library.
The instrumentation of the classes works fine,
but i have a problem to collect the executions at runtime.
what should I do to get the executions?
How EclEmma do this exactly?
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes i know this from the "CoreTutorial" and there it works fine,
but when i use the same struckture in my plugin and start the runtime-eclipse,
the ExecutionData is emty :/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure what you're trying to do. One impoertant thing is that execution data is collected in the JVM that executes your instrumented classes. So in your case you probably launch some test program from Eclipse. So if you call the Runtime APIs in the Eclipse JVM you will not gat any data. You need to include some control code with your JVM under test.
This is BTW exactly how the JaCoCo agent works.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to develop a plug-in like EclEmma with some other features and for the coverage information i like to use Jacoco.
So i have to add the Jacoco agent to the LaunchConfigurations am i rigth?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
in order for my bachelor exam
I develop a plugin using the jacoco library.
The instrumentation of the classes works fine,
but i have a problem to collect the executions at runtime.
what should I do to get the executions?
How EclEmma do this exactly?
thanks
You get execution data from your runtime instance:
void org.jacoco.core.runtime.IRuntime.collect(IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionInfoVisitor, boolean reset)
Cheers,
-marc
Yes i know this from the "CoreTutorial" and there it works fine,
but when i use the same struckture in my plugin and start the runtime-eclipse,
the ExecutionData is emty :/
Not sure what you're trying to do. One impoertant thing is that execution data is collected in the JVM that executes your instrumented classes. So in your case you probably launch some test program from Eclipse. So if you call the Runtime APIs in the Eclipse JVM you will not gat any data. You need to include some control code with your JVM under test.
This is BTW exactly how the JaCoCo agent works.
I'm trying to develop a plug-in like EclEmma with some other features and for the coverage information i like to use Jacoco.
So i have to add the Jacoco agent to the LaunchConfigurations am i rigth?
> So i have to add the Jacoco agent to the LaunchConfigurations am i rigth?
This is what EclEmma does in the background.