简体   繁体   中英

Run Gradle test and not Junit test in IntelliJ IDEA 15 when choosing configuration type to run with

我想要这个功能 I updated to Intellij 15.02 from 14 and wanted to run my tests using Gradle not JUnit, but I'm not getting the options anymore like the image you see here.

I want to be able to choose configuration type.

The thing that is happening now when I run a test is that it runs it as a JUnit test by default.

I have imported the gradle project with gradle by selecting the gradle file in the project. I have deleted each configuration entry at the top so everything is clean and empty when running a new test with Spock.

My current "fix" is to manually create a new config entry for the gradle test. Intellij is not intelligent enough to create that same Junit test as a Gralde test.

I'm confused.

I found the solution. They have changed the way you select this option in the new version of intellij 15.02.

You have to select Gradle Test Runner.

Please take a look: 在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM