I have a JAVA application without unit tests (I know, inherited code), and I need to get the coverage from several tests which are defined as executing the jar file with some presets.
I used to do it with Emma from console like this:
java -cp emma.jar emmarun -raw -ix +some.filter.* -out ./coverage/test001.em -jar MyJarFile.jar <application arguments>
The problem is the filtering with -ix argument. I wanted to get coverage only from my own packages, which are named com.mycompany.whatever.blah.blah.blah. Therefore, by inclussion filter is supposed to be just +com.mycompanyname.*. Nevertheless, I only get about half of the packages, and not even every class into each package.
I also tried other combinations, such as using only exclussion patterns to avoid all the non desirable packages, and the result is the same. I known I manages to do it somehow in the past, but I am afraid I am unable to remember how.
So that is why I am looking for a different coverage library which allows me to get coverage from jar files. I saw JMockit, Jacoco and even the impressing Sonar, but it seems that they don't allow jar-coverage and that they are designed for unit testing coverage.
Any suggestion?