Hi All,

I was able to generate the dump after looking around a bit i replaces the 
CATALINE_OPTS with the JAVA_OPTS, so now i do see the file being created 
but 

JACOCO_OPTS="-javaagent:/xxxxx/bin/jacoco/lib/jacocoagent.jar=destfile=JACOCO_EXEC_FILE,output=file,append=false"

-rwxr-xr-x 1 root root    442 Mar  3 16:44 setenv.sh

-rw-r----- 1 root root   2086 Mar  3 16:47 JACOCO_EXEC_FILE


But now i need to create the report from the file. I would greatly 
appreciate if someone could help me on it. I tried the following:


java -jar <path to jacoco.jar> report JACOCO_EXEC_FILE --classfiles 
../webapps/ROOT/WEB-INF/classes/  -html . -name output.html


It did generate the output.html but everything was 0% . I did 
minimalistic testing on website so it may be due to that. I'll try to do 
more exhaustive tests to check.


I would appreciate if someone could comment if i'm on the right track or if 
i should try something else.


Thanks,

jk.





On Sunday, March 3, 2019 at 9:21:49 PM UTC-8, jk wrote:
>
> Hi All,
>
> I'm a newbie to Jacoco. I needed to perform some code coverage in our 
> webapp. The webapp is shipped as a war file running on tomcat application 
> server. Since I don't have the build information for the webapp as well the 
> source repository for it, the on-fly looked most viable option for me.
>
> I have  defined the following in setenv.sh file:
>
> JACOCO_OPTS="-javaagent:/portal/bin/jacoco/lib/jacocoagent.jar=destfile=JACOCO_EXEC_FILE,output=file,append=false"
>
> CATALINA_OPTS="${CATALINA_OPTS} ${JACOCO_OPTS}
>
> when i start the webapp i do the file being created when i do browse the 
> site and shutdown catalina.sh i still the file size as 0
>
> root@xxx-xxxx:/xxxxxxx/bin# ./shutdown.sh 
> Using CATALINA_BASE:   /xxxxxx
> Using CATALINA_HOME:   /xxxxxx
> Using CATALINA_TMPDIR: /xxxxxx/xxxx
> Using JRE_HOME:        /usr
> Using CLASSPATH:       
> /xxxxxxx/bin/bootstrap.jar:/portal/bin/tomcat-juli.jar
> -rw-r----- 1 root root      0 Mar  3 16:07 JACOCO_EXEC_FILE
> drwxr-x--- 3 root root   4096 Mar  3 16:13 .
>
>
> i'm using the following versions:
> Server version: Apache Tomcat/8.5.29
> Server built:   Mar 5 2018 13:11:12 UTC
> Server number:  8.5.29.0
> OS Name:        Linux
> OS Version:     4.4.0-116-generic
> Architecture:   amd64
> JVM Version:    1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12
> JVM Vendor:     Oracle Corporation
>
> The Jacoco version used is :
> jacoco/0.8.3/jacoco-0.8.3.zip
> I would appreciate of any insight into how to resolve the issue.
>
> Thanks,
> jk
>
>

-- 
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/d34de65a-06ad-426e-ab22-420c6aed570a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to