Menu

have any one used emma with HTTPUnit

2004-09-21
2013-05-09
  • Nobody/Anonymous

    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

     
    • Vlad Roubtsov

      Vlad Roubtsov - 2004-09-21

      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?

       
    • Nobody/Anonymous

      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

       
      • Vlad Roubtsov

        Vlad Roubtsov - 2004-09-21

        How are you running your webapp and getting the coverage dump file?

        (The coverage dump file is normally created when the JVM exits)

         
        • Nobody/Anonymous

          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?

           
    • Nobody/Anonymous

      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

       
    • Nobody/Anonymous

      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

       
    • Nobody/Anonymous

      yes.

       
    • Nobody/Anonymous

      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

       
    • Vlad Roubtsov

      Vlad Roubtsov - 2004-09-21

      <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

       
    • Nobody/Anonymous

      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

       

Log in to post a comment.