I am trying to use Jacoco to measure test coverage of our small number of tests. I am using Buildr along with the JAVA_OPTS set to "-javaagent:/path/to/jacocoagent.jar". The defaults for Jacoco creates a new jacoco.exec file in the current directory. However this file is empty with 0 bytes. If I use the classdumpdir option, I do see the various test classes placed into the dump directory.
Why then, is the jacoco.exec file not getting filled with data? I have seen one other place mentioning that jvm needs to be shutdown in order to dump the data to that file. Does anyone else have experience with Jacoco through the java agent. We do not use Maven or Ant, as Buildr is what we use for our builds and tests.
Side question - I understand that Jacoco is the freshest method to use for Java test coverage, as opposed to others such as Cobertura and Clover. Is Jacoco the best way to go?
Thank you.
Aucun commentaire:
Enregistrer un commentaire