hi evgeny, i have used Ant coverage tasks and it works perfectly fine for unit tests running in the same jvm as server. jacoco.exec file is created.
But when tests run outside the server jvm, then no jacoco-it.exec file gets generated. It is the same instrumented code with ant coverage tasks. Any idea why? Do I explicitely need to start the java agent for jacoco in server vm in addition to specifying ant coverage task? Thanks Kanu On Sep 4, 2017 2:35 PM, "Evgeny Mandrikov" <[email protected]> wrote: > > > On Thursday, August 31, 2017 at 6:24:56 AM UTC+2, [email protected] > wrote: >> >> On Wednesday, August 30, 2017 at 9:19:48 PM UTC-7, [email protected] >> wrote: >> > Evgeny, >> > >> > Thanks. After going through docs, I have few more questions - >> > >> > 1. Since I use ANT file and have included <jacoco:coverage> tags around >> the executions, my understanding is that I don't need a separate java agent >> to run. Am I correct? >> > > "coverage" task configures nested tasks to enable use of agent. > > >> > >> > 2. In the examples I see, I notice that sometime I see >> <jacoco:coverage> tags around the execution which needs to be instrumented >> (e.g. the server code that will be executed by tests) and sometimes I see >> these tags around the test execution (e.g. tests which run against server >> code). Not sure which is the correct approach? >> > > Agent should always be attached to the JVM that executes application whose > coverage should be measured. > > >> > >> > Thanks, >> > Kanu >> >> -- 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/CAMRoh-DLp5nw7_8LupmL5hF8J7TnZOtxM2ax%3DZ3Br5ashZoEdg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
