Hi Marc,
Can you provide some examples to request for dump using maven when
output=tcpserver
Regards
Rajeev
On Wednesday, 8 January 2014 11:17:54 UTC+5:30, Marc R. Hoffmann
wrote:
Hi,
exec *files* are only written if output=file. If output=tcpserver
this
means you need another process to connect to the specified port and
request a dump. This is possible e.g. with the Ant task or the maven
goal.
What does it mean by connection is open at the time when the VM
terminates???
This means that if some dump client has a TCP connection to the
JaCoCo
agent at the point in time when the JVM shuts down execution data is
written to that connection. Note that the Ant/Maven dump goals are
not
suitable for this as they do a "one shot" dump only and disconnect
afterwards. To get dump on exit over a TCP connection you would need
a
special client which stays connected.
But I don't think you need this, as you should have two other
options:
1) Use output=false and dumponexit=true and shutdown the server
after
you've executed your tests
2) Use output=tcpserver and request a dump with Ant/Maven after
you've
executed your tests (no need to shutdown the server for this)
Best regards,
-marc
On 08.01.14 05:18, [email protected] wrote:
Hi, I am using jacoco agent and I would like to take dump on code
coverage without having ant dump task which is take dump on VM exit.
I have configured jacocoagent like this below:
-javaagent:/lib/jacocoagent.jar=destfile=/current/jacoco.exec,output=tcpserver,address=ipaddress,port=36003,includes=com.abc.*:com.def.gh.*,dumponexit=true
So, I start my server, jacocoagent is active ...stop my server but
no jacoco.exe file is created after shutting down the server
I change output=file in the above jacocoagent, jacoco.exec file is
created on shutting down the server but no codecoverge is there.
I dont understand why jacoco.exec is not created while i have
output=tcpserver.
I was reading the jacoco documentation. And it says
dumponexit If set to true coverage data will be written on
VM shutdown. The dump can only be written if either file is
specified or the output is tcpserver/tcpclient and a connection is
open at the time when the VM terminates.
What does it mean by connection is open at the time when the VM
terminates???
On Thursday, May 16, 2013 10:12:45 AM UTC-7, [email protected]
wrote:
On Thursday, May 16, 2013 10:55:29 AM UTC-4, Marc R. Hoffmann
wrote:
I would like to have report generatation like I had > for my
ant tasks and nice details up to method level. In this case you will
need to create the report e.g. with the Ant task as I described in
my previous answer. The agent itself cannot create a report. Best
regards, -marc On 2013-05-16 15:33, [email protected] wrote: > On
Thursday, May 16, 2013 2:25:12 AM UTC-4, Marc R. Hoffmann wrote: >>
Hi, please see documentation for the Ant tasts you need to perform
the remote dump and create the report: >>
http://www.eclemma.org/jacoco/trunk/doc/ant.html#dump [1] >>
http://www.eclemma.org/jacoco/trunk/doc/ant.html#report [2] And yes,
you >> need the original class files from your web application
locally on the >> machine where the report is generated. The report
task will also work >> on WAR/EAR files. If you want to get source
highlighting in your >> reports you will also need to supply the
Java source files to the >> report task. Best regards, -marc On
2013-05-15 20:27, >> [email protected] wrote: > Hi > > I have given
the following java >> option in commandlinf unix, and > rather
editing the startup. > export >> JAVA_OPTIONS="$JAVA_OPTIONS > > >>
-javaagent:/home/../../../jacocoagent.jar=output=tcpserver,port=8030,address=localhost"
> This run on a Unix system > > My webapplication runs on top
of >> this weblogic server. > > Now I need to conduct my testing and
generate reports. ( As it's set > to listen to port 8030, what
type of >> request should I make to > generate > report) > How do I
get generated >> report files? > > > DO I have to use to ant build
file? ( > > ant >> -Djacocoagent.server.host=<my server> >
-Djacocoagent.server.port=8030 >> > for this option ant wants to
have the class file location in the ant >> > build script?can i give
a network path to find the class fiels in > >> web-inf in Unix
system? Assuming ant run on another windows machine > >> and work as
a clien to make this call? > > ) > Appreciate your support >> >
Thanks > Kanchana > > Thanks Marc > Got the Ant stuff working. Now
my plans are different:). I have > weblogic configured sucussefully
and jacoco agents runs with no > issues > to test a webapplication
and generate reports as I test through the > applicatio. I have
given the JAVA_OPTIONS to run > >
javaagent:/home/../../jacocoagent.jar=output=tcpserver,destfile=jacoco.exec,includes=com.*,dumponexit=true,port=8010,classdumpdir=/../../dump,address=*"
So I see the classdump which Agent scans through and dumps while I
navigate through my web application.I would like to have report >
generatation like I had for my ant tasks and nice details up to >
method > level. > Appreciate your input how to get it done in this
set up. > Thanks > Kanchana
hi Marc,
Appreciate your reply. Please assume that my ant runs on a
windows box and and webapp on top of logic runs on a seperate Unix
box.
In this case my class files are in the Unix box.
If I'm using jacoco:agent and try to generate reports .. in Ant
scripts should I give the network path of the webapp/classes in unix
system.Or what if i give the classdumpdir?
<target name="dump" depends="configure">
<echo>Running agent for jacoco results to
${result.exec.file}</echo>
<jacoco:agent property="agentvmparam"
address="${jacocoagent.server.host}"
port="${jacocoagent.server.port}" destfile="${result.exec.file}" />
</target>
<target name="report">
<jacoco:report>
<executiondata1>
<file file="${result.exec.it.file}" />
</executiondata1>
<structure name="report">
<group name="IT Code Coverage">
<classfiles>
<fileset dir="...................." />
</classfiles>
</group>
</structure>
<html destdir="${result.report.dir}" />
</jacoco:report>
</target>
--
Marc Hoffmann
[email protected]
_______________________________________________
Mountainminds GmbH & Co. KG
Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS
Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann
--
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/b09b9afa-54c4-46cb-a97c-95b219867d1b%40googlegroups.com
[3].
For more options, visit https://groups.google.com/d/optout [4].
Links:
------
[1] http://www.eclemma.org/jacoco/trunk/doc/ant.html#dump
[2] http://www.eclemma.org/jacoco/trunk/doc/ant.html#report
[3]
https://groups.google.com/d/msgid/jacoco/b09b9afa-54c4-46cb-a97c-95b219867d1b%40googlegroups.com?utm_medium=email&utm_source=footer
[4] https://groups.google.com/d/optout