java 选择要运行的配置类型时,在 IntelliJ IDEA 15 中运行 Gradle 测试而不是 Junit 测试
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34332580/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Run Gradle test and not Junit test in IntelliJ IDEA 15 when choosing configuration type to run with
提问by SamTheGoodOne
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.
我从 14 更新到 Intellij 15.02 并想使用 Gradle 而不是 JUnit 运行我的测试,但我不再像您在此处看到的图像那样获得选项。
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.
当我运行测试时,现在发生的事情是它默认将它作为 JUnit 测试运行。
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.
我已经通过选择项目中的 gradle 文件导入了带有 gradle 的 gradle 项目。我已经删除了顶部的每个配置条目,因此在使用 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.
我目前的“修复”是为 gradle 测试手动创建一个新的配置条目。Intellij 不够智能,无法创建与 Gralde 测试相同的 Junit 测试。
I'm confused.
我糊涂了。