我在我的java / maven eclipse项目上成功运行了Cucumber测试。但是当我添加我的项目时,Jenkins我总是得到以下错误“cucumber.runtime.CucumberException:[]没有找到任何功能。
我在这篇帖子Setting cucumber-jvm options in Maven from the command line中读到:
...测试在单独的JVM中运行,因此您需要在测试插件配置中指定该系统属性(即pom.xml中的surefire或failsafe插件配置)
但我不太清楚该怎么做。任何人都可以帮助我吗?
PS:我正在使用“cucumber-java”和“cucumber-junit”依赖。
答案 0 :(得分:0)
如果您使用的是surefire,插件文档页面http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html会显示几个可以尝试设置系统属性的选项
例如,您可以尝试 systemPropertyVariables 插件设置
答案 1 :(得分:0)
您是否在Jenkins奴隶的目标文件夹中看到了这些功能文件?也许你的* .feature文件被排除了,因为Maven资源排除/包含的配置不正确?