Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#165 datafile argument of 'cobertura-instrument' ignored

open
nobody
None
5
2011-07-20
2011-07-20
svaens
No

The path to the data-file (by default named cobertura.ser) can be specified via the "datafile" arguments of the
'cobertura-instrument' and 'cobertura-report' tasks.

It is expected, that by providing a value for 'datafile' argument for both these tasks;
1. The cobertura.ser file will be initially written at the invokation of the 'cobertura-instrument' task
2. on running of the junit tests, the 'cobertura.ser' file will be updated with results
3. on running of the task 'cobertura-report' the same file will be used to generate the report

However,
only 1 and 3 get done.
When the junit tests are running, unless you set the property : 'net.sourceforge.cobertura.datafile'
to the same location, the results are updated to yet another file at the working directory
(which is then not used for the generation of the report).

There is a fundamental inconsistency here. One of two things should be true here:

1. If they will not be used, there should be no 'datafile' argument to the cobertura tasks, only the property should be used, OR
2. the datafile argument setting should be respected, and take priority over any property set

To provide an argument to these tasks, and then ignore it for some of the functionality, and not others, is inconsistent, and confusing.

Discussion

  • svaens
    svaens
    2011-07-24

    I forgot to mention,
    i'm using what I think is the latest release:
    v cobertura-1.9.4.1