Reset execution data without using ANT/Maven task for Jacoco Agent

25 views
Skip to first unread message

myspyp...@gmail.com

unread,
Nov 24, 2017, 2:50:21 AM11/24/17
to JaCoCo and EclEmma Users
Is it possible to reset the execution data 'on demand' or 'on retrieval' with some command signal that you can send to the remote jacoco agent? I am using FTP method to retrieve the execution dump. Basically i want that once i have retrieved the data i should be able to reset the execution data for the next report. There is no such jacoco agent argument that is available (http://www.eclemma.org/jacoco/trunk/doc/agent.html). Is there some sort of signal/command that i can send over the tcp connection on which jacoco agent listens on, or is there any other way i can achieve this?

Marc Hoffmann

unread,
Nov 24, 2017, 10:06:58 AM11/24/17
to jac...@googlegroups.com
Hi,

first of all I wonder what the FTP method is. JaCoCo agent has no such
output method.

The JaCoCo agent parameters are for static configuration, reset is
something that is triggered at runtime. There are 3 options to request a
reset and/or dump at any point in time:

1) tcpclient/tcpserver output mode: When you run the agent in this
output mode you can use our Ant task or Maven goal 'dump'
2) JMX: When agent parameter jmx=true it can be triggered through the
JaCoCo MBean
3) Runtime API: From within the process under test you can use JaCoCo's
runtime API

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