Reputation: 31
I am using Corbetura-2.0.3 with java 1.7 and I am trying to instrument the classes in our build system via command line. Stuck at instrumenting classes. Please assist.
Here is the command:
./cobertura-instrument.sh
--basedir /ariba/9r2_sourcing/roots-S49r2/install/classes/ariba.app.approvable.zip
--destination /ariba/9r2_sourcing/Instrument
-auxClasspath /ariba/9r2_sourcing/roots-S49r2/install/classes
Wherein,
/ariba/9r2_sourcing/roots-S49r2/install/classes/ariba.app.approvable.zip
– zip containing classes which I would like to instrument/ariba/9r2_sourcing/Instrument
– Folder to save instrumented classes/ariba/9r2_sourcing/roots-S49r2/install/classes
– path where all other reference classes are present.Output:
-bash-4.1$ ./cobertura-instrument.sh --basedir /ariba/9r2_sourcing/roots-S49r2/install/classes/ariba.app.approvable.zip --destination /ariba/9r2_sourcing/Instrument -auxClasspath /ariba/9r2_sourcing/roots-S49r2/install/classes
Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Apr 29, 2014 4:53:27 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler loadCoverageData
INFO: Cobertura: Loaded information on 0 classes.
Apr 29, 2014 4:53:27 AM net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler saveCoverageData
INFO: Cobertura: Saved information on 0 classes.
Also tried with:
archivesdepth
parameter as well; it gives the same above error.cobertura-instrument.sh
file with the right versions of jars present in Cobertura installed location.Upvotes: 3
Views: 1861
Reputation: 2264
I see , in command you have not mentioned classes which you need to instrument.
Example: Below command works.
sh cobertura-instrument.sh --basedir `pwd` GenerateReports.class My_lib.class
Note:
Classes need to be mentioned as complete filename (e.g. mycls.class)
-auxClasspath : Add any classes/jars that cobertura is unable to find during instrumentation i.e. classes to exclude from coverage
Upvotes: 0