Hi Marc, I debugged the Jacoco ant task code and found the problem. My jar list has more than 150+ jars which contain 10K of classes. Execution terminated abnormally at analyzeZip() method. May be the load is too high. I will try to provide a patch with fixes.
When reduce the jar list size coverage generation works. Thanks for your help. -Krishantha. On Fri, Mar 13, 2015 at 1:07 AM, Marc R. Hoffmann < [email protected]> wrote: > Hi, > > when you open the HTML report: > > 1) Are your packages and classes listed (even with 0% coverage) or is the > report empty? > 2) Click on the "Sessions" link on the top right. Are your classes under > test listed? Do they have links? > > In case of 0% coverage you'll find some background information here: > http://www.eclemma.org/jacoco/trunk/doc/classids.html > > Regards, > -marc > > > On 12.03.15 09:55, Krishantha Samaraweera wrote: > > Hi Marc, > > Thanks for your prompt reply. > > I'm trying to use ant task as below by giving path to server side jar > files directory. However jacoco doesn't generate the coverage report > correctly. The generated xml report has zero coverage data. Note that > jacoco.exec file is not empty and its size is around 414K. Let me know > whether my jacoco-report ant task is valid ? do I need to point valid > project structure name here for "structure name". Since I'm trying to > generate server side code coverage my project has only test classes to call > server side APIs. > > <jacoco-report> > <executiondata> > <file file="${project.basedir}/target/jacoco.exec"/> > </executiondata> > <structure name="Minerva"> > <classfiles> > <fileset dir="/path/to/jar/directory/in/my/extracted/server/"> > <include name="**/*.jar"/> > </fileset> > </classfiles> > </structure> > <html destdir="${project.basedir}/target/jacoco/report"/> > <xml > destfile="${project.basedir}/target/jacoco/report/jacoco.xml"/> > </jacoco-report> > > > Your feedback really appreciated. > > Thanks, > Krishantha. > > On Tue, Mar 10, 2015 at 9:05 PM, Marc R. Hoffmann < > [email protected]> wrote: > >> Where do you "extract all JAR files" from? >> >> Note that by default the JaCoCo reporting Ant task or Maven goal will >> recursively search EAR/WAR/JAR files for class files. >> >> Regards, >> -marc >> >> >> On 10.03.15 11:17, [email protected] wrote: >> >>> Hi all, >>> >>> Can I use Jacoco for jar instrumentation without using Maven or ant >>> tasks provided. >>> >>> I know that adding agent jar as JVM option to my server startup script >>> will generate jcoco.exec file. However as per the documentation, to >>> generate coverage report, I need to point class files. Since I don't have >>> source files or class files, only option left is to extract all jar files >>> and put class files to temp directory, and point them at report generation. >>> Is there any better alternative for this ? >>> >>> Thanks, >>> Krishantha. >>> >>> > -- > 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/BmMFpFG0vdY/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/5501EADE.30901%40mountainminds.com > <https://groups.google.com/d/msgid/jacoco/5501EADE.30901%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/msgid/jacoco/CAAws004GQt1Zi9MRQ0TTOq%3DBxMf4whpsYnMzeyp6QWJS9yiUNw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
