Menu

Issues when getting runtime test coverage

2009-10-13
2013-05-09
  • charitha kankanamge

    Hi folks,

    We are using Emma to get runtime code coverage of a middleware server product. We have chosen Emma for getting test coverage because of its the ability to collect run time coverage stats. Emma instruments the necessary jars of our product first and generate meta data files (*.em). When we execute the automated test framework against our product (which is a web service application server built on OSGI), it gathers the run time coverage data and when the server is stopped, it creates the coverage data file (*.ec). Hence, when we stop the server, it quits the current coverage session. Therefore, we cannot restart server and continue getting the coverage. Some of our tests in the automated test framework requires us to restart server multiple times. Because of this issue, we cannot get coverage after the server is restarted.  We could not figure out a way to avoid this issue. We appreciate if anyone can help us to finding a solution.

    Thanks

    Charitha

     
  • Marc R. Hoffmann

    Hi Charitha,

    starting the OSGi framework (or any Java app) multiple times for code coverage should not be a problem. By default EMMA merges the results in the .ec file, see .

    If your OSGi implementation is based on Equinox, you might also check out the , which allows you to hook EMMA in any OSGi/Equinox app **without** instrumenting the JARs beforehand.

    Best regards,
    -marc

      : http://emma.sourceforge.net/reference_single/reference.html#prop-ref.table.file
      : http://www.eclemma.org/devdoc/headless.html

     
  • charitha kankanamge

    Thank you Marc for your quick response. We will try with your instructions and see.

     

Log in to post a comment.