Intellij IDEA - skip jaCoCo while running individual tests

Viewed 162

I have gradle JaCoCo configuration as advised by the docs:

test {
    finalizedBy jacocoTestReport
}
jacocoTestReport {
    dependsOn test
}

I have Intellij IDEA configuration to run tests with Gradle. Currently when I run individual tests from IDEA, it also launches jaCoCo coverage report, which takes time and I would like to avoid.

So I would like:

  1. to keep my gradle configuration so that coverage reports run every time I run build
  2. Do not run JaCoCo when running tests from IDEA

I have tried changing gradle tasks definition in IDEA to include -x jacocoTestReport, but it has no effect. I tried to change test run configuration, but its getting reset for every new test,

1 Answers

Please try to set the Run tests using to "Intellij IDEA" from Preferences/Settings | Build, Execution, Deployment | Build Tools | Gradle . enter image description here

Related