I depends somewhat on how you are running the servlet code. Are you executing in some servlet or J2EE container? If so, the general approach to getting code coverage is described in the FAQ: http://emma.sourceforge.net/faq.html#q.runtime.appservers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have tried using the steps given in the FAQ. Iam using WSAD4,with a WAR containing a servlet in the source folder. Can you pls tell me the steps i need to follow to test the servlet.ie how exactly to use the 'instr' tool in the websphere.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
instr is an offline instrumentation tool whose usage does not depend on whether you are using WSAD or something else. instr is used either as a command line tool or as an ANT task.
Because you sound like this is your first attempt at using EMMA, I would recommend going through the user guide at
in order to understand the difference between on-the-fly and offline modes (the latter is where instr applies) and how EMMA tools work together.
Practicing on something easy is essential before dealing with the unwieldy monstrosity of Websphere. EMMA user guide relies on examples that are included in the full EMMA download and are out of the box-ready.
Vlad.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Iam trying emma to generate code coverage for servlets , Can anybody help me to resolve how can i use emma for generating reports on servlets
Thanks
Bhaskar
I depends somewhat on how you are running the servlet code. Are you executing in some servlet or J2EE container? If so, the general approach to getting code coverage is described in the FAQ: http://emma.sourceforge.net/faq.html#q.runtime.appservers
I have tried using the steps given in the FAQ. Iam using WSAD4,with a WAR containing a servlet in the source folder. Can you pls tell me the steps i need to follow to test the servlet.ie how exactly to use the 'instr' tool in the websphere.
instr is an offline instrumentation tool whose usage does not depend on whether you are using WSAD or something else. instr is used either as a command line tool or as an ANT task.
Because you sound like this is your first attempt at using EMMA, I would recommend going through the user guide at
http://emma.sourceforge.net/userguide/userguide.html
in order to understand the difference between on-the-fly and offline modes (the latter is where instr applies) and how EMMA tools work together.
Practicing on something easy is essential before dealing with the unwieldy monstrosity of Websphere. EMMA user guide relies on examples that are included in the full EMMA download and are out of the box-ready.
Vlad.
Hi,
Is it possible to use Emma for code coverage for cases for a web application, where there is reference of a Main method.
Regards
Aruneesh