Menu

No coverage data generated

2005-02-08
2013-05-09
  • Nobody/Anonymous

    I instrumented the .jar files and put in WEB-INF/lib directory. The app ran fine. I shut down Tomcat to get data coverage collected but can't find the file anywhere. Does anybody have the same problem. Anyhelp is very appreciated.

    I got this in the log when the app started.
    EMMA: collecting runtime coverage data ...

    Thanks,
    Lance

     
    • Vlad Roubtsov

      Vlad Roubtsov - 2005-02-09

      Did you get anything from EMMA in the log when the app  terminated?

       
    • Nobody/Anonymous

      No I did not. Should I expect to see something?

       
    • Vlad Roubtsov

      Vlad Roubtsov - 2005-02-09

      EMMA dumps coverage data in an exit hook thread. Those are supposed to run when the JVM exits.
      The message will show the absolute pathname of the coverage output file.

      It is possible that EMMA did write the file but System.out output got lost by Tomcat. Have you customized EMMA output file location? If you set it to a known absolute pathname, you will eliminate the uncertainty of what user.dir is inside Tomcat.

      See "I can't seem to find my coverage.ec file..." in the FAQ.

      Some people find the exit hook mechanism too flaky and use a JSP or servlet to force data dumps before JVM exit. See "Is it possible to force a coverage data dump prior to JVM exit?" in the FAQ.

       
    • Nobody/Anonymous

      Thanks much for the help

       

Log in to post a comment.