0

I am using eclipse 2019-12 in a JDK8 project and I want to check the coverage as I am using a web application through web Browser. For this I have configured Tomcat Server 8 in eclipse and launched with two options (both OK):

  • -javaagent:"/tools/eclipse/dropins/jacoco-0.8.7/lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1,port=8011,includes=com.mypckg.*"
  • -javaagent:"C:\finconsum\tools\eclipse\dropins\jacoco-0.8.7\lib\jacocoagent.jar=output=file,destfile=/tmp/jacoco.exec,append=true,includes=com.mypckg.*"

As I need to check what I am coveraging during the execution AND store the results for future reviews, is there any option to combine both outputs for the same execution?

inquirymind
  • 135
  • 1
  • 11
  • In the _Coverage_ view, in the right-click menu there is _Export Session..._ and _Import Session..._. Is that what you're looking for? – howlger May 13 '21 at 15:02

1 Answers1

1

is there any option to combine both outputs for the same execution?

according to https://www.jacoco.org/jacoco/trunk/doc/agent.html valid values for output option are

  • file
  • tcpserver
  • tcpclient
  • none

so there is no "combined", however in case of execution

-javaagent:"/tools/eclipse/dropins/jacoco-0.8.7/lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1,port=8011,includes=com.mypckg.*"

after connection to server your client can retrieve data and store it also in file.

Godin
  • 9,801
  • 2
  • 39
  • 76