Search code examples
intellij-ideagradleintellij-14

Run JUnit test in IntelliJ IDEA 14 without choosing configuration type


In IntelliJ IDEA 14 with Gradle plugin I would like to run JUnit test without being asked about configuration type. Problem occurs when I run test for the first time - there is no configuration for this run. I never run tests with Gradle in IDE so it would be acceptable to disable running test with Gradle. How to run JUnit test directly?

IntelliJ IDEA 14 - run test


Solution

  • You can get rid of this annoying by adding

    idea.gradle.prefer.idea_test_runner=true
    

    to idea.properties file located in the bin directory of the IntelliJ IDEA installation. Then restart IDEA and enjoy.