how does jacoco agent save coverage information in testing remote service

43 views
Skip to first unread message

Aaron zhang

unread,
Dec 10, 2019, 11:24:29 PM12/10/19
to JaCoCo and EclEmma Users
hi :

Thanks in advance!

We use tcp mode to get coverage from remote service with jacoco agent. we find that coverage will be empty by re-deploy server. 
      
     How do we save each of coverages and but don't empty it, then merge coverage from previous coverage to current result?

     In additionally, how does jacoco agent save coverage in remote server? in memory or file? if file, where is location?

BR,
Aaron

Marc Hoffmann

unread,
Dec 10, 2019, 11:28:52 PM12/10/19
to jac...@googlegroups.com
Hi Aaron,


JaCoCo agent holds coverage information in-memory. Therefore if you stop the JVM without dumping the data it will be lost.

In you’re case you need to collect coverage data over tcp before you re-deploy.

Regards,
-marc

--
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/ab3acfda-a535-415a-aa3e-53e5299d3aeb%40googlegroups.com.

Aaron zhang

unread,
Dec 11, 2019, 4:16:34 AM12/11/19
to JaCoCo and EclEmma Users
hi marc,

We use tcp mode to get coverage by socket with jacoco agent, and save jacoco.exec file in local

Do you know what API can merge multiple jacoco.exec files? I think that we can save every jacoco.exec files of deployed service.

If exist the API, we will do it very simple.

在 2019年12月11日星期三 UTC+8下午12:28:52,Marc R. Hoffmann写道:
Hi Aaron,


JaCoCo agent holds coverage information in-memory. Therefore if you stop the JVM without dumping the data it will be lost.

In you’re case you need to collect coverage data over tcp before you re-deploy.

Regards,
-marc
On 11. Dec 2019, at 05:24, Aaron zhang <aaron_z...@msn.com> wrote:

hi :

Thanks in advance!

We use tcp mode to get coverage from remote service with jacoco agent. we find that coverage will be empty by re-deploy server. 
      
     How do we save each of coverages and but don't empty it, then merge coverage from previous coverage to current result?

     In additionally, how does jacoco agent save coverage in remote server? in memory or file? if file, where is location?

BR,
Aaron

--
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 jac...@googlegroups.com.

Aaron zhang

unread,
Dec 11, 2019, 4:17:53 AM12/11/19
to JaCoCo and EclEmma Users
thanks! 

BR,
Aaron

在 2019年12月11日星期三 UTC+8下午5:16:34,Aaron zhang写道:

Marc Hoffmann

unread,
Dec 11, 2019, 4:38:50 AM12/11/19
to JaCoCo and EclEmma Users
Hi Aaron,

for example the JaCoCo CLI allows merging of multiple exec files:


If you want to implement it in Java ExecFileLoader is the API you’re looking for. The CLI implementation might serve as an example:


Regards,
-marc


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/71206b87-af5d-46ca-807c-13c347b987be%40googlegroups.com.

Aaron zhang

unread,
Dec 11, 2019, 6:28:19 AM12/11/19
to JaCoCo and EclEmma Users
Thanks!

在 2019年12月11日星期三 UTC+8下午5:38:50,Marc R. Hoffmann写道:
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages