This happens when IDEA for some reason do not understand that this test is manager by Gradle. Try:
- Refresh all Gradle projects
- Make sure that Gradle run configuration is created, not an IDEA JUnit. If it's not, then:
- Remove that run configuration
- Check "Setting -> Build, Execution, Deployment -> Gradle -> Runner", tick "Delegate IDE build/run actions to gradle" and choose "Gradle Test Runner" in "Run tests using"
- Restart IDEA
- New configuration should be created as Gradle one now (which, hopefully, will fix the issue)