35

I want this feature back 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.

4

2 回答 2

51

我找到了解决方案。他们改变了您在新版 intellij 15.02 中选择此选项的方式。

您必须选择 Gradle Test Runner。

请看一下: 在此处输入图像描述

于 2015-12-17T11:35:19.467 回答
17

在 IntelliJ 的现代版本(我有 Ultimate 2019.2.3)中,您需要更新以下内容: 更改 gradle 设置

从“Gradle”更新为“IntelliJ IDEA”

于 2019-10-02T18:08:33.160 回答