Jacoco Report jacoco.exec to IBM wepshere setenv

124 views
Skip to first unread message

omair....@gmail.com

unread,
Mar 10, 2015, 4:11:40 AM3/10/15
to jac...@googlegroups.com
I want to archive code coverage report for IBM websphere

what i am doing is following below steps but i get no out put please help?


1. I add this command in IBM setenv: if "%1"=="stop" goto skip_agent
set JAVA_OPTS=%JAVA_OPTS% -javaagent:"C:\IBM\WCDE_ENT70\JacocoLib\jacocoagent.jar=destfile=C:\IBM\WCDE_ENT70\JacocoLib\jacoco.exec,append=true,includes=com.*"
:skip_agent

2. start the server and brows in local host

3. close the server

after performing these steps i am not getting any out put report of jacoco.exec

but when i applied the same above steps for Tomcat it works fine and i am able to get code coverage report in destination folder jacoco.exec

Frank Krumm

unread,
Mar 10, 2015, 7:56:26 AM3/10/15
to jac...@googlegroups.com
Did you end websphere?
I read in doc: 
"The JaCoCo agent collects execution information and dumps it on request or when the JVM exits. There are three different modes for execution data ouput:
  • File System: At JVM termination execution data is written to a local file.
  • TCP Socket Server: External tools can connect to the JVM and retrieve execution data over the socket connection. Optional execution data reset and execution data dump on VM exit is possible.
  • TCP Socket Client: At startup the JaCoCo agent connects to a given TCP endpoint. Execution data is written to the socket connection on request. Optional execution data reset and execution data dump on VM exit is possible."
To my understanding exec is only written when JVM is stopped. I also saw never a exec file with weblogic.  But you can collect the information with Eclemma Plugin for Eclipse or with maven jacoco module. Look for goal "dump"

hth

frank


--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/5cb75f0a-a631-4f4f-9427-6738e1684972%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

omair....@gmail.com

unread,
Mar 10, 2015, 8:26:58 AM3/10/15
to jac...@googlegroups.com
Yes i do end the JVM but still not able to get any exec with IBM webshere , although when i perform the same steps for Tomcat it works fine , is there any thing different for wepshere IBM ??

Frank Krumm

unread,
Mar 10, 2015, 9:07:38 AM3/10/15
to jac...@googlegroups.com
I have the same behavior with weblogic, but I use Eclemma Eclipse plugin to dump the data into eclipse.
Did you try that?

bye

frank

On Tue, Mar 10, 2015 at 1:26 PM, <omair....@gmail.com> wrote:
Yes i do end the JVM but still not able to get any exec with IBM webshere , although when i perform the same steps for Tomcat it works fine , is there any thing different for wepshere IBM ??
--
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 jacoco+un...@googlegroups.com.

omair....@gmail.com

unread,
Mar 10, 2015, 10:45:46 AM3/10/15
to jac...@googlegroups.com
I cant use Eclemma Eclipse plugin to dump the data, i need to do some thing with Jacoco only as later i will be reading the report with sonar ! can any one guide me which start up file needs to be modified to implement JACOCO in Wepshere IBM

Marc R. Hoffmann

unread,
Mar 10, 2015, 11:32:04 AM3/10/15
to jac...@googlegroups.com
Your websphere probably runs on IBM's JVM, which needs the following
additional VM parameter to work with JaCoCo:

-Xshareclasses:none

See FAQ: http://www.eclemma.org/jacoco/trunk/doc/faq.html

Regards,
-marc

luvr...@gmail.com

unread,
Mar 17, 2015, 4:43:35 AM3/17/15
to jac...@googlegroups.com
Hi Frank,
Need some help on other 2 options of TCP Socket Server and Client way of retrieving execution data? Where can I find some good examples or procedures?

Thanks,
Rahul
On Tuesday, March 10, 2015 at 5:26:26 PM UTC+5:30, Frank Krumm wrote:
> Did you end websphere?
> I read in doc: 
> "The JaCoCo agent collects execution information and dumps it on request or when the JVM exits. There are three different modes for execution data ouput:File System: At JVM termination execution data is written to a local file.TCP Socket Server: External tools can connect to the JVM and retrieve execution data over the socket connection. Optional execution data reset and execution data dump on VM exit is possible.TCP Socket Client: At startup the JaCoCo agent connects to a given TCP endpoint. Execution data is written to the socket connection on request. Optional execution data reset and execution data dump on VM exit is possible."

Frank Krumm

unread,
Mar 18, 2015, 11:09:06 AM3/18/15
to jac...@googlegroups.com
Hi Rahul,

quite simple is to install EclEmma in Eclipse and use Import->Other->Coverage Session:
Inline image 1
Inline image 2

This is very good to test the functionality of the jacoco agent before going on with other tools.

bye

frank

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages