So I would like to know how actually jacoco works. This is what I have in my mind now. When the jacoco runs there should be an executable jar file so that jacoco agent can generate the jacoco.exec file. When the jacoco is attached to the test cases within the java project my maven or any avaiable plugin, is the above process happening? Which means there should be some executable jar file to execute the tests and based on that jar file the jacoco.exec is generated. Is this right? If not can you please give me some idea how actually jacoco works?
On Tuesday, October 22, 2019 at 1:25:51 PM UTC+5:30, Marc R. Hoffmann wrote: > > Hi, > > so you mean attaching the agent to a already running Java program? > > This is not possible due to the way how JaCoCo is implemented (adding new > members to instrumented classes) and restrictions of the JVM (no schema > changes on re-transformation possible). > > Regards, > -marc > > > > On 2019-10-22 07:27, Shehan Dhaleesha wrote: > > So what I want is start the JaCoCo agent dynamically so that I don't need > to give any specific jar program name to start the agent. So this is what I > tried. > > java -javaagent:jacocoagent.jar -jar myjar.jar > > So I used previous command to execute the JaCoCo agent and used the .exec > file to generate a coverage report (note that this is not a test coverage > report). So what I want now is, starting the agent dynamically, which > means, not typing the above command. Is this can be done? If not what > should be the way to approach this? > > Note that I don't want use any maven or ant plugin in this case. > > > -- > 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] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/f966a983-62e1-4eb3-bc58-d43e42977197%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/f966a983-62e1-4eb3-bc58-d43e42977197%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/a59bda25-1968-44f8-88a4-352ae6269f97%40googlegroups.com.
