gradle-cobertura-plugin icon indicating copy to clipboard operation
gradle-cobertura-plugin copied to clipboard

Add an option to defer build failure so that all test tasks run.

Open stevesaliman opened this issue 10 years ago • 0 comments

In version 1.x of the plugin, failures in test tasks were intercepted and delayed until after the coverage reports ran. This had the side effect of making sure all test tasks would run before generating the coverage report.

In version 2.0.0 of the plugin, I switched to the much simpler `finalizedBy`` mechanism of making sure reports would be generated after failed tests. When a test failure happens, Gradle won't run any new tasks, except for tasks needed to finalize tasks that have already run. This has the side effect of generating reports that exclude tests run from tasks downstream of the failed one.

I don't want to restore the old behavior as a default because I don't want to inject myself into Gradle's sense of what should run and what shouldn't, but I do want to restore the old behavior as an option for those who:

  1. Don't have anything of importance running between the tests and the report generation and;
  2. Want to make sure all tests run so that the coverage report is accurate with respect to all of the tests.

stevesaliman avatar Nov 16 '13 20:11 stevesaliman