IntelliJ won't show test overview when adding Gradle project property

Viewed 76

I have two IntelliJ Gradle run targets: One that simply executes the test task, and one that executes test -PmyProperty=true.

When I run the first target, IntelliJ properly runs the tests and shows the results in the familar tree. But when I run the second one, the tests are executed, a JUnit report is generated, but IntelliJ doesn't show the test overview.

If it matters, this is what Gradle does with the property:

test {
  useJUnit {
    if (project.properties["myProperty"] != "true") {
      excludeCategories("MyCategory")
    }
  }
}

How do I get IntelliJ to show the test results as normal?

0 Answers
Related