If you are using Gradle, go to Settings | Build, Execution, Deployment | Build Tools | Gradle, and in "Run tests using" select IntelliJ IDEA