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

标签 java gradle intellij-idea cucumber

我目前有一个大型gradle项目(使用Java和IntelliJ),我想在其中添加Cucumber测试。我已通过此链接概述了一些基本步骤:

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

关于java - 如何将Cucumber测试添加到预先存在的Gradle项目(Java)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51626018/

相关文章:

java - java中检查两个字符串是否相等

java - Jongo 解析 JSON 时出错

java - 从 Ant 迁移到Gradle-Macrodef替代品?

android - Flutter 运行(同步文件)未完成

intellij-idea - 使用 IntelliJ 查找具有特定参数类型的所有方法调用

java - Spring启动问题 "There was an unexpected error (type=Internal Server Error, status=500)."

java - 正则表达式捕获具有常见字符的组

java - com.google.gms.google-services 未添加类 GoogleSignInOptions

intellij-idea - Intellij“在类中找不到主类”

java - Android Dex :Unable to execute DX (IntelliJ), 如何解决?