I'm using cobertura to find out code c开发者_运维问答overage of my test suite, which tests a java based solution bundled through a jar file, cobertura cmd line reference
I have done the instrumentation part and obtained the instrument class files. For the second step, I'm not sure whether I need to re-bundle the instrumented class files into a jar file since my test suite uses this jar file or can I simply set my CLASSPATH variable to include the instrumented class file while continue to use original jar file (which contains the uninstrumented class files).
Thanks.
You have to include your instrumented files in the classpath BEFORE any other containers/Folders that may include the same compiled files.
In you case before the jar file with the instrumented files.
You don't need to rebundle.
Another possibility would be to instrument the jar file directly.
精彩评论