Thanks Evgeny . I have source code in a different Maven project , packaged as war , while Integration tests in different Maven Project ( maintained by offshore teams ) . In such scenario , how do I use report-aggregate ( when I can't define Parent Module in integration tests' POM ) .
Also , I have a general question : I am using Jbehave for integration tests . Will Jacoco support Jbehave Tests ? Regards, neha On Wed, Jun 28, 2017 at 2:05 PM, Evgeny Mandrikov <[email protected]> wrote: > Hi, > > Report goal uses classes of module where it is executed and hence > generates report containing them. I assume that your "integration tests" > module has no source classes, so the behavior that you observe is a correct > one. > > To have a report that includes classes of other modules within Maven > reactor please use report-aggregate (http://www.jacoco.org/jacoco/ > trunk/doc/report-aggregate-mojo.html). In complex scenarios/setups to > have a more fine grained control of what is used (classes, sources) for > generation of report consider usage of JaCoCo Ant Tasks ( > http://www.jacoco.org/jacoco/trunk/doc/ant.html). > > > > On Wednesday, June 28, 2017 at 10:28:09 AM UTC+2, JococoUser wrote: >> >> Hi Marc >> >> Please find my configuration below ( Using Maven ) : >> >> 1. Started Jacoco javaagent with JBoss ( as JAVA_OPTS args , output set >> to tcpserver ) , deployed my source .war file on this server . >> 2. Changed my Integration tests' pom.xml to include jacoco-maven-plugin , >> added phase - post -integration-test , goals : dump ( from tcpserver ) , >> and report . >> >> With these changes , I am able to generate a coverage report . >> But , the report shows classes from Integraiton Tests ( rather than the >> source code classes ) , and coverage is 0% >> >> Could you please help where I am going wrong . >> >> On Thu, Jun 22, 2017 at 4:51 PM, Marc Hoffmann < >> [email protected]> wrote: >> >>> What build system do you use to run your integration tests? Ant, Maven? >>> >>> Please see our documentation for different build systems: >>> >>> http://www.jacoco.org/jacoco/trunk/doc/ >>> >>> Regards, >>> -marc >>> >>> >>> >>> On 2017-06-22 10:44, Neha B wrote: >>> >>> Basically , my application war file is deployed in server , and I run >>> integration tests through Jenkins on that server . >>> Please let me know how to go ahead with Jacoco code coverage in this >>> scenario . >>> >>> Regards, >>> >>> On Thu, Jun 22, 2017 at 12:19 PM, Neha B <[email protected]> wrote: >>> >>>> Hi Marc >>>> >>>> Thanks so much for the response ! >>>> >>>> In my setup , I have Integration Tests code in a different Eclipse >>>> project , and Development Source Code in a different Eclipse project >>>> altogether . Could you please help how Jacoco can be used in this setup to >>>> gauge integration test code coverage . >>>> Thanks . >>>> >>>> Regards, >>>> >>>> On Wed, Jun 21, 2017 at 8:53 PM, Marc R. Hoffmann < >>>> [email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> it should be possible to create any report without source code. You >>>>> simply get no source highlighting in the html report. >>>>> >>>>> If this does not work for you, please provide a exact description of >>>>> your setup. >>>>> >>>>> Regards, >>>>> -marc >>>>> >>>>> On 21.06.17 15:19, JococoUser wrote: >>>>> >>>>> >>>>> Hello >>>>> >>>>> I have a scenario where I am just having binary ( no source code ) to >>>>> run my integration tests on , using maven . >>>>> I want to generate code coverage report using jacoco . >>>>> Have searched through a lot , found examples when your source code is >>>>> in different module than integration tests ( then use report-aggregate >>>>> goal >>>>> ) . >>>>> But haven't found anything related to when you don't have source code >>>>> available and just the binary . >>>>> It should work as mentioned in Jacoco documentation -" Based on Java >>>>> byte code and therefore works also without source files." >>>>> >>>>> Please suggest ! >>>>> >>>>> Regards, >>>>> -- >>>>> 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/1fcf39fd-f1d9-4bb3- >>>>> 898a-0f2b52749c93%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/jacoco/1fcf39fd-f1d9-4bb3-898a-0f2b52749c93%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "JaCoCo and EclEmma Users" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>> pic/jacoco/5IqM4AibmT8/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/jacoco/d108a325-5f2c-c344- >>>>> a0fb-e1dc0b8117c3%40mountainminds.com >>>>> <https://groups.google.com/d/msgid/jacoco/d108a325-5f2c-c344-a0fb-e1dc0b8117c3%40mountainminds.com?utm_medium=email&utm_source=footer>. >>>>> >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>> -- >>> 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/ms >>> gid/jacoco/CAGi%2Bcio9TiLr7cqVvgPWt3wTPwq1Gmm%3D7jyGUij% >>> 2BV6v6kBN-wQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/jacoco/CAGi%2Bcio9TiLr7cqVvgPWt3wTPwq1Gmm%3D7jyGUij%2BV6v6kBN-wQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >>> >>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "JaCoCo and EclEmma Users" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>> pic/jacoco/5IqM4AibmT8/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/jacoco/02ba8fcb0f68b6aa4458f32717221442%40mountainminds.com >>> <https://groups.google.com/d/msgid/jacoco/02ba8fcb0f68b6aa4458f32717221442%40mountainminds.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "JaCoCo and EclEmma Users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/jacoco/5IqM4AibmT8/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jacoco/1fc287f0-0fe1-40f7-917a-72aa00b2c312%40googlegroups.com > <https://groups.google.com/d/msgid/jacoco/1fc287f0-0fe1-40f7-917a-72aa00b2c312%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAGi%2BcioQLEO9J4fSpxdPk_SEuk8ECP2VHPrejwssdWLmtcCOeg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
