tags:

views:

334

answers:

2

Hi Friends I am trying to generate Emma Code Coverage Report from Hudson. I have added "Record Emma coverage report" plugin in Hudson This plug-in needs a path where generated emma xml report will be placed. I have added that path "/opt/dfte/hudson" but it is saying that Recording Emma reports /opt/dfte/hudson/emma.xml Finished: FAILURE Did I missed any steps?? Please help me. Thanks

A: 

Your build needs to generate the Emma report. Hudson then picks up the XML file generated by the Emma run from your build, and renders it nicely.

Michael Donohue
A: 

You first need to integrate EMMA into your Maven or Ant build by following these instructions: http://wiki.hudson-ci.org//display/HUDSON/Emma+Plugin. If you are using Maven you can test these build changes by running "mvn emma:emma" -- if it's working you should have an emma directory under your site directories containing a coverage.xml and html files. While I haven't tried it with Ant, I believe it should be a similar process and output.

Once that is happening, you just need to enable the Hudson EMMA plugin by checking "Record Emma coverage report" in your job configuration. For the Maven example above (and likely Ant) you do not need to specify the file path as it will automatically find coverage.xml files in your modules. Make sure this Hudson job also executes your tests. You will then get a nice chart on your job's page showing % trends for class, method, block, and line coverage.

Chris B.

related questions