JUnit Platform test execution test filtering

test-tag

(Eric Deandrea) #1

The new JUnit platform support in Gradle 4.6 is great. One thing I see though is the test selection/filtering.

Coming from a tool like IntelliJ, I can click the little triangle icon in an IntelliJ test class and IntelliJ will nicely run the task & show the test results for that test class (or even 1 specific test).

When moving to JUnit platform, IntelliJ is no longer running just the test or test class. Its running more than it should be, but not all of the tests in the project. I haven’t been able to figure out the pattern as to which tests its running.

The command IntelliJ runs when running a single class is

Executing tasks ':projectName:cleanTest :projectName:test --tests com.mycompany.somepackage.SomeTests'...

Gradle doesn’t seem to be respecting this.

I’ve also filed https://github.com/gradle/gradle/issues/4748