user3585215
user3585215

Reputation: 31

Cobertura 2.0.3 - unable to instrument

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,

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:

Upvotes: 3

Views: 1861

Answers (1)

Shubhangi
Shubhangi

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

Related Questions