scoverage/scoverage-maven-plugin

Run instrumented jar

wasiek opened this issue · 1 comments

Hi

I would like to do verification tests using robot framework on a jar aritfact and get the coverage.
I have produced instrumented jar by scoverage:package.
The scoverage-*.jar file is in target directory and I am able to start it, but i cannot get the report file (scoverage.xml). The instrumented file needs to have scoverage-data dir is that a proper behavior if I'm dealing with jar file?
Can you please share documentation how to generate report from such external execution?

scala-scoverage-plugin 1.2.0

Important technical information:
The full, absolute path to target/scoverage-data directory is contained in the instrumented classes.

The consequence is that identical path must exist on the system, where you are testing.

The simplest scenario (I don't know, if it' your case) is to:

  • generate instrumented file (scoverage:package)
  • test it on the same, or "path-compatible" machine, the same absolute path to target/scoverage-data directory must exist, scoverage.coverage.xml file is not needed, just a directory
  • after testing, copy/move target/scoverage-data/scoverage-measurements.* files back to the project and generate reports.

I need more information, how exactly are you performing your tests, where you generate reports and what exactly problems you have.