Hi Marc, This check is positive. But I still can't generate report with highlighted source code. Sorry I cannot share any class files. Can you please suggest any alternate approach?
Thanks and Regards, Sabyasachi Mishra On Tuesday, 23 January 2018 21:52:57 UTC+5:30, Marc R. Hoffmann wrote: > > Ok, this means your class files are compiled with debug information. > > Did you double check that your source files are available at the location > you provided? > > --sourcefiles Path/src/main/java > > Note that this path needs to point to the parent folder of the Java > package hierarchy. E.g. if you have a class com.example.Foo the source file > has to be in this folder: > > Path/src/main/java/com/example/Foo.java > > If this check is positive can you please share one of your class file? > > Thanks, > -marc > > > > > > > > > > > > On 2018-01-23 16:46, Sabyasachi Mishra wrote: > > Hi Marc, > My HTML report shows a column called lines. Attaching the screenshot. > > > Thanks and Regards, > Sabyasachi Mishra > > On Tuesday, 23 January 2018 18:57:01 UTC+5:30, Marc R. Hoffmann wrote: >> >> Hi, >> >> does your generated HTML report show a column called "Lines"? If not, the >> class files do not contain debug information. >> >> Regards, >> -marc >> >> >> >> On 2018-01-23 14:01, Sabyasachi Mishra wrote: >> >> HI Team, >> >> I am trying to compute code coverage for a build hosted in tomcat. I am >> following the below steps. >> >> >> >> >> 1. Added Java agent with Jacocoagent.jar in tomcat.conf file under >> JAVA_OPTS >> >> >> *javaagent:/opt/jacoco/lib/jacocoagent.jar=destfile=/opt/jacoco/Result/jacoco.exec,classdumpdir=/opt/jacoco/Result/classes,append=false,includes=** >> >> >> >> 2. Started Tomcat. >> >> 3. Ran tests. >> >> 4. After tests are complete stoped the tomcat in order to generate >> the .exec file. >> >> >> >> 5. Keep class files which I wanted to instrument in one place along >> with the exec file. >> >> 6. Now ran the report generation command >> >> >> >> java -jar Path/jacococli.jar report Path/jacoco.exec --classfiles >> Path/classes --html Path/Report --name jacocoReport --sourcefiles >> Path/src/main/java >> >> >> >> Now I am able to generate HTML report. *But not able to see the >> highlighted source code*. But from the report I can see the functions >> under the classes. >> >> >> >> For adding debugging info to the class I have added below code to maven's >> pom.xml >> >> >> >> <plugin> >> >> <groupId>org.apache.maven.plugins</groupId> >> >> <artifactId>maven-compiler-plugin</artifactId> >> >> <configuration> >> >> <source>1.8</source> >> >> <target>1.8</target> >> >> <debug>true</debug> >> >> <debuglevel>lines</debuglevel> >> >> </configuration> >> >> </plugin> >> >> >> Can anyone please tell me what I am missing or what I am doing wrong. >> >> Thanks in advance. >> >> Regards, >> Sabyasachi Mishra >> >> >> -- >> 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/9d440a15-f2d2-49c3-91b8-2af73b0d6700%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jacoco/9d440a15-f2d2-49c3-91b8-2af73b0d6700%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] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/cfeda9f4-d697-49c3-ad08-959bf1e78582%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/cfeda9f4-d697-49c3-ad08-959bf1e78582%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/64e661d0-2b70-42b7-88f1-07a2f93d2075%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
