我一直在用Cucumber在IntelliJ中得到错误“Unimplemented substep definition”?
我已经:我一直在用Cucumber在IntelliJ中得到错误“Unimplemented substep definition”?
- 下载
Cucumber Java
,Gherkin plugin
- 我已经有
the steps
和features
目录:
我的目录结构是这样的:
- test
- java
- features
- featureSet1
- oneFeature.feature
- anotherFeature.feature
- featuresSet2
- twoFeature.feature
- CucumberTests.java
- steps
- step1.java
- step2.java
下功能文件夹,我有一个名为的文件。我能够通过mvn test
运行测试,但红色的错误标记真的让我恼火。
我在CucumberTest.java
这些标记,这是应该运行测试:
@RunWith(Cucumber.class)
@CucumberOptions(plugin = { "pretty", "html:target/surefire-
reports/cucumber", "json:target/surefire-
reports/cucumberOriginal.json"},
features = {"src/test/java/features/featuresSet1",
"src/test/java/features/featuresSet2",
},
tags = {"[email protected]"},
glue = {"steps"})
的问题是从Substeps IntelliJ Plugin
是IntelliJ
建议您安装时,它找到了一个.feature
文件的项目中。
弹出时,请忽略此扩展或卸载,如果你已经拥有了它。
Cucumber for Java
and Gherkin
应该足够了。
如何从IDEA安装插件https://www.jetbrains.com/help/idea/installing-updating-and-uninstalling-repository-plugins.html#uninstall – vikramvi
我卸载了子步骤IntelliJ插件,那么它工作的很棒!谢谢 :) –
该问题可能来自一个名为“Substeps IntelliJ Plugin”的插件。搜索并卸载。 “黄瓜适合爪哇”和“小黄瓜”应该足够了。 –
嘿,你说得对。谢谢! – junecng
添加了一个答案,因为似乎更多人对此感兴趣。 –