File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes How  to run Jboss under Emma to find code coverage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How  to run Jboss under Emma to find code coverage" Watch "How  to run Jboss under Emma to find code coverage" New topic
Author

How to run Jboss under Emma to find code coverage

Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

We are working on run time code coverage calculation of a web application. For this purpose we are using Emma (a free open source code coverage tool).
To find the coverage of an application the application should run under emma tool like

java -jar emma.jar emmarun -jar Application.jar

this is working for normal jar files but when we are running jboss's run.jar under emma we are getting below exception :




command we are using is


all the dependencies are in the class path and run.jar is running fine if we run it directly from command prompt. We are using linux box.

Please provide your advice.

Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 508
    
    6
Hi,

It seems most likely that this is due to using on-the-fly instrumentation approach. Even if you get it to somehow run, your coverage reports will have lot of irrelevant entries for all the classes loaded by jboss including its own libraries and other applications.
I feel you should instead instrument only your specific application jar offline and deploy the instrumented jar.
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

We have already done this. We have deployed the instrumented war file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run Jboss under Emma to find code coverage