I'm trying to integrate Cobertura into our test environment to be able to capture code coverage information. The tests are run from ant scripts using ANT junit tasks
, and there are more than 50 ant script files (build.xml) with one or more junit task definitions.
As per the Cobertura doc, the junit tests have to be given the path of the cobertura coverage data file through the sysproperty
nested element of the junit task. What it means to me is that I will need to update all those 50+ files to specify a sysproperty element for the junit tasks, which I plan to do as a last resort.
I'm running my tests in Linux (CentOS)
and I would like to know if there is a way to specify a global system property (-Dxxx=yyy)
so that the system property is made available to all java applications running in the system.
-EDIT-
The junit tests are run in a forked JVM. <junit fork="yes" ...