I would like to create custom reports and metrics.
Is there a good way to get line coverage information? The XML output only goes to method depth. Also, this is for a VERY large project. Is it possible to create multiple XML output files (maybe by package)?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, I haven't anticipated that XML report users would need line coverage data in the output.
It's a reasonable feature request, though, and I will consider it for the next minor version bump. Would you care to suggest what the new and improved XML format should be?
There is no direct way of doing what you want in the 2.0 version. The closest you can get is this:
- instrument the codebase in several steps, each time filtering by a different package
- collect coverage data
- produce several reports by coupling your coverage data with individual metadata chunks:
report -r xml -in metadata1.em,coverage.ec -Dreport.out.file=file1.xml
report -r xml -in metadata2.em,coverage.ec -Dreport.out.file=file2.xml
...
This isn't really the solution, it merely breaks your codebase in several independent packages.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to create custom reports and metrics.
Is there a good way to get line coverage information? The XML output only goes to method depth. Also, this is for a VERY large project. Is it possible to create multiple XML output files (maybe by package)?
Thanks
Hmm, I haven't anticipated that XML report users would need line coverage data in the output.
It's a reasonable feature request, though, and I will consider it for the next minor version bump. Would you care to suggest what the new and improved XML format should be?
There is no direct way of doing what you want in the 2.0 version. The closest you can get is this:
- instrument the codebase in several steps, each time filtering by a different package
- collect coverage data
- produce several reports by coupling your coverage data with individual metadata chunks:
report -r xml -in metadata1.em,coverage.ec -Dreport.out.file=file1.xml
report -r xml -in metadata2.em,coverage.ec -Dreport.out.file=file2.xml
...
This isn't really the solution, it merely breaks your codebase in several independent packages.
I just want to get access to the coverage data. Maybe XML isn't the best way.
Probably providing an API or Documentation so that I can access the coverage data would be better.
Thanks for the help!
XML would be great for me with the following addition of the "line"s...
<method name="find (int [], int): int">
<coverage type="method, %" value="100% (1/1)"/>
<coverage type="block, %" value="83% (20/24)"/>
<coverage type="line, %" value="67% (4/6)"/>
<line type="line" value="76" type="partial"/>
<line type="line" value="77" type="not"/>
<line type="block" value="10-20" type="not"/>
</method>