1

I couldn't find anything in the documentation which could answer my question.

If I have 2 services (JVMs) running simultaneously on the same host, can they use the same JaCoCo destination file? E.g.: can I have these arguments for both of them?

-javaagent:/opt/coverage/lib/jacocoagent.jar=destfile=/opt/coverage/jacoco.exec

Or the append mode does not work concurrently and I must specify different destination files?

dfritsi
  • 1,224
  • 3
  • 14
  • 24
  • You question is over using Jacoco not integrated (in maven for example) while surefire executes? You want code coverage to check live running code? – pringi Feb 10 '22 at 11:54
  • Exactly. I'd like to instrument e2e testing. – dfritsi Feb 10 '22 at 12:07
  • I guess that you have to have one file per VM, and in the end aggregate the results (like in a multi module project when running Unit Tests). It appear to exist another option that is running the agent as TCP, but I've never try that: https://stackoverflow.com/questions/64081697/jacoco-instrumentation-using-tcp-server-method. – pringi Feb 10 '22 at 12:13

0 Answers0