Menu

How to use emma for testing servlets

2005-01-07
2013-05-09
  • Nobody/Anonymous

    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

     
    • Vlad Roubtsov

      Vlad Roubtsov - 2005-01-08

      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

       
    • Nobody/Anonymous

      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.

       
    • Vlad Roubtsov

      Vlad Roubtsov - 2005-01-10

      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.

       
    • Nobody/Anonymous

      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

       

Log in to post a comment.