如何将 Cucumber 测试添加到预先存在的 Gradle 项目 (Java)?

How add Cucumber tests to a pre-existing Gradle project (Java)?

我目前有一个大型 gradle 项目(使用 Java 和 IntelliJ),我想在其中添加 Cucumber 测试。我已经采取了这个 link:

概述的一些基本步骤

http://www.thinkcode.se/blog/2014/08/24/cucumberjvm-hello-world-with-gradle

例如向我的 build.gradle 文件添加依赖项和存储库设置,如下所示:

dependencies {
    testCompile 'info.cukes:cucumber-java:1.2.4'
    testCompile 'info.cukes:cucumber-junit:1.2.4'
    testCompile 'junit:junit:4.12'
}
test {
    testLogging.showStandardStreams = true
    systemProperties System.getProperties()
}

但是,我不确定如何从这里开始。我应该在某个位置创建我的 Cucumber 测试吗?

Boaz 上面的回答似乎有效。谢谢!

define your feature files under the resources subtree and your steps at the same location as normal junit tests - the tests subtree