Code coverage issue

I have an application with two containers - 1 a webservice container and the other a portal server (JSR168). I turned on code coverage so I'd get info about the web service container, unfortunately during the build process it compiles the portlets, so they get the emma code inserted into the classes. I tried copying the emma jars into the portal server but it won't even start if I have them there (all sorts of errors).

So the question is: is there a way to launch an ant target and supress the emma code code coverage (modification of the class files) for that particular target? My targets are "clean portlets service". I want code coverage only on the service target.

Also, how do you guys do the emma stuff for a compile target? Do you just see a javac target and go in and find the classes directory and run a process on the compiled code?

1 comment
Comment actions Permalink

So the question is: is there a way to launch an ant
target and supress the emma code code coverage
(modification of the class files) for that particular
target? My targets are "clean portlets service". I
want code coverage only on the service target.


I can suggest to add a specific build configuration for webservice container only and enable code coverage for this build configuration.
When code coverage is enabled, all javac tasks are processed. The only way to exclude classes from instrumenting is to specify exclusion pattern in Emma instrumentation parameters setting.


Also, how do you guys do the emma stuff for a compile
target? Do you just see a javac target and go in and
find the classes directory and run a process on the
compiled code?


That's what we do.

Kind regards,
KIR

0

Please sign in to leave a comment.