I am trying to integrate Cobertura in our test environment in order to be able to capture code coverage information. 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.
According to the Cobertura doc , junit tests must be provided for the cobertura coverage data file through the sysproperty nested element of the sysproperty task. For me, this means that I will need to update all of these 50+ files to indicate the sysproperty element for junit tasks, which I plan to do as a last resort.
I run my tests on 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 available to all java applications running on the system.
-EDIT-
Junit tests run in a forked JVM. <junit fork="yes" ...
source share