Thanks Marc, In my html I am getting Line Covered Column also. I am using Mockito framework for unit testing and getting warning also like "execution data not matching with runtime class files" is this is the reason for not showing source file links.
Please help me how to handle this warning and get the source file link. Thanks On Wednesday, 24 February 2016 23:00:20 UTC+5:30, Marc R. Hoffmann wrote: > Hi, > > there are two common problems: > > 1) Missing debug information: Your class files needs to be compiled with > debug information. You check in the JaCoCo report whether line coverage > is reported in the tables. > > 2) The source files must be properly provided starting from the Java > package root. In your case the package root seems to be more likely > $aps_home/src/test, maybe even $aps_home/src/test/java > > Regards, > -marc > > On 24.02.16 12:30, [email protected] wrote: > > Hi, > > Using jacoco to generate report. > > Report getting generated . > > But no link is coming for Source files. > > > > Please find the below source code for report > > > > task testJacocoReport(type: JacocoReport){ > > > > sourceDirectories = fileTree(dir: "$aps_home/src", exclude: > > 'test/**/*.java') > > classDirectories = fileTree(dir: "$buildDir", exclude: > > 'test-classes/**/*.class') > > executionData files("$aps_home/build/jacoco/jacoco.exec") > > def reportDir = "build/jacocoReport" > > reports { > > xml{ > > enabled true > > destination "$aps_home/build/jacoco.xml" > > } > > csv{ > > enabled true > > destination "$aps_home/build/jacoco.csv" > > } > > html.destination = reportDir > > } > > doLast { > > println "Jacoco report for client created: > > file://${reportDir.toURI().path}" > > } > > } > > > > > > Please let me know where I am missing . > > Regards > > SS > > -- 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/478c579b-a9b1-4b33-8b65-d358be7c3400%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
