I am trying to use emma with httpunit. Here is my scenario.
I have started my webapp in tomcat
I have my httpunit testcases to test my webapp.I have included emma to get the code coverage, have instrumented the classes and my webapp jar file
When i run my httpunit testcase i get the coverage data but does not show the coverage details of the webapp.jar classes.
Am i missing anything here
Please help me
thanks
R
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What does "get the coverage data but does not show the coverage details of the webapp.jar classes" mean? You ARE getting some coverage data but only for classes other than the ones in webapp.jar?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do not stop the webapp, that might be the reason i am not getting the coverage data for the webapp.jar files.
I use seperate build.xml to start my webapp and run my httpunit testcases
i have added emma instrumentation and report for the httpunit testcases build.xml only.
should i add emma instrumentation in webapp-start build.xml file also?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<quote>
I do not stop the webapp, that might be the reason i am not getting the coverage data for the webapp.jar files.
I use seperate build.xml to start my webapp and run my httpunit testcases
i have added emma instrumentation and report for the httpunit testcases build.xml only.
should i add emma instrumentation in webapp-start build.xml file also?
</quote>
How and when you instrument the classes that get deployed is up to you, as long as they are instrumented when they are executed.
To get a coverage file dump you do need to terminate the JVM (i.e., stop your web app server).
thanks you very much for the help. i was able to successfully use emma with my webapp and httpunit.
I really appreciate the quick response to my queries.
thank you very much
R
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to use emma with httpunit. Here is my scenario.
I have started my webapp in tomcat
I have my httpunit testcases to test my webapp.I have included emma to get the code coverage, have instrumented the classes and my webapp jar file
When i run my httpunit testcase i get the coverage data but does not show the coverage details of the webapp.jar classes.
Am i missing anything here
Please help me
thanks
R
What does "get the coverage data but does not show the coverage details of the webapp.jar classes" mean? You ARE getting some coverage data but only for classes other than the ones in webapp.jar?
yes. I have some helper classes in my httpunit testcases, i am getting coverage data for these classes but not in the classes in webapp.jar
How are you running your webapp and getting the coverage dump file?
(The coverage dump file is normally created when the JVM exits)
I do not stop the webapp, that might be the reason i am not getting the coverage data for the webapp.jar files.
I use seperate build.xml to start my webapp and run my httpunit testcases
i have added emma instrumentation and report for the httpunit testcases build.xml only.
should i add emma instrumentation in webapp-start build.xml file also?
Yes. I have some helper classes in my httpunit testcases, i am getting coverage data for these classes but not in the classes in webapp.jar
yes. I have some helper classes in my httpunit testcases, i am getting coverage data for these classes but not in the classes in webapp.jar
yes.
yes I have some helper classes in my httpunit testcases, i am getting coverage data for these classes but not in the classes in webapp.jar
<quote>
I do not stop the webapp, that might be the reason i am not getting the coverage data for the webapp.jar files.
I use seperate build.xml to start my webapp and run my httpunit testcases
i have added emma instrumentation and report for the httpunit testcases build.xml only.
should i add emma instrumentation in webapp-start build.xml file also?
</quote>
How and when you instrument the classes that get deployed is up to you, as long as they are instrumented when they are executed.
To get a coverage file dump you do need to terminate the JVM (i.e., stop your web app server).
http://emma.sourceforge.net/faq.html#q.runtime.appservers
thanks you very much for the help. i was able to successfully use emma with my webapp and httpunit.
I really appreciate the quick response to my queries.
thank you very much
R