1

I use Maven to build a multi-component project. One of the components is a web app with HTML and JavaScript. Maven invokes NPM and Karma to run that component's unit and integration tests, written in QUnit. This yields two independent Cobertura coverage reports that I then combine into one with istanbul-combine.

As a final step, I'd like the Maven build to fail if that combined Cobertura report doesn't satisfy my coverage requirements. But how?

I've tried the Cobertura Maven Plugin, but it seems to be unfit to simply read an existing report and apply its check configuration. First, it needlessly repeats the build's tests ("Invokes the execution of the lifecycle phase test prior to executing itself."), then it finds that it cannot instrument the non-Java resources, then it simply stops, without any log output whatsoever.

Are there other plugins that fit? Could changing the report format help? (Doesn't have to be Cobertura.)

Florian
  • 4,821
  • 2
  • 19
  • 44

0 Answers0