0
votes

I am new to Cobertura and I am trying to instrument classes from compliled jar file.
After unpacking I run the following command:

D:\cobertura-1.9.4.1\7.6.300.01>D:\cobertura-1.9.4.1\cobertura-instrument.bat --basedir D:\cobertura-1.9.4.1\7.6.300.01
Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Instrumenting 0 files
Cobertura: Saved information on 0 classes.
Instrument time: 0ms

In D:\cobertura-1.9.4.1\7.6.300.01 class files are located.
Why can't cobertura find them?

1

1 Answers

1
votes

See http://cobertura.sourceforge.net/commandlinereference.html. You didn't specify the classes to instrument.

cobertura-instrument.bat [--basedir dir] [--datafile file] [--destination dir] [--ignore regex] classes [...]

Note: Classes may be specified individually, or as a directory tree containing multiple classes. Example:

cobertura-instrument.bat --destination C:\MyProject\build\instrumented C:\MyProject\build\classes

(emphasis mine)