This patch is towards allowing the gathering of per-test coverage data for JUnit tests.
Added ability to specify the save file for flushing coverage data. Added ability to use an Ant <fileset> in the <cobertura-report> task to facilitate reports for multiple files. Added support for this to the two XML reports. Created JUnit listeners in three forms to do the flushing. One is a JUnit 3 listener, one is a JUnit 4 listener and one is a JUnitTestFormatter (extended JUnit 3 listener) for use in the <junit> Ant task.
I'm unsure about licensing issues and have put the Apache license text at the top of newly added files. Please advise on whether this is correct.
SVN Diff of Changes
Updated Patch
Submitted a new patch which allows a threaded save in the test case context but a blocking save in other contexts like the shutdown hook or web app flusher. Added a few test cases, more to come. This passes the current test suite including coverage and branch coverage requirements.
Updated Patch, Copyrights and Save Threading
Another patch update (cobertura.per-test.20090408). This is mostly correction of the copyright notice on new files which was copied from the header of existing files in the previous uploads. There is one significant change in ProjectData which now synchronizes the saving threads to prevent issues with multiple threads waiting to save the same file.