is it possible to have the output html reports have highlighting where code was covered in a maven build? I know you can in standalone emma and with ant, but I haven't yet figured out how to do this with maven and emma. Thanks.
Jeff
is it possible to have the output html reports have highlighting where code was covered in a maven build? I know you can in standalone emma and with ant, but I haven't yet figured out how to do this with maven and emma. Thanks.
Jeff
You need to set the sourcepath=
attribute on the report
tag and you to specify at least(?) coverage depth="method"
on the html tag if I remember correctly.
I don't know if this is possible with the Emma Maven plugin, but this is the default behaviour for the Cobertura Maven plugin. It also gives you the number of times a line is hit, which can be useful in determining where your testing is minimal. See this report for an example of the output.
I find Cobertura and Emma to be largely interchangeable in terms of coverage checking, just that Cobertura has a better Maven plugin and Emma has a better Eclipse plugin in my opinion.
This is the default behaviour of the EMMA plugin if you run mvn emma:emma
or add it to the <reporting>
element. You can find a working example here: http://github.com/brettporter/centrepoint/blob/master/centrepoint/modules/pom.xml