我一直在用Cucumber在IntelliJ中得到错误“Unimplemented substep definition”?

问题描述:

我已经:我一直在用Cucumber在IntelliJ中得到错误“Unimplemented substep definition”?

  • 下载Cucumber JavaGherkin plugin
  • 我已经有the stepsfeatures目录:

我的目录结构是这样的:

- 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"}) 
+4

该问题可能来自一个名为“Substeps IntelliJ Plugin”的插件。搜索并卸载。 “黄瓜适合爪哇”和“小黄瓜”应该足够了。 –

+1

嘿,你说得对。谢谢! – junecng

+0

添加了一个答案,因为似乎更多人对此感兴趣。 –

的问题是从Substeps IntelliJ PluginIntelliJ建议您安装时,它找到了一个.feature文件的项目中。

enter image description here

弹出时,请忽略此扩展或卸载,如果你已经拥有了它。

Cucumber for Java and Gherkin应该足够了。

+0

如何从IDEA安装插件https://www.jetbrains.com/help/idea/installing-updating-and-uninstalling-repository-plugins.html#uninstall – vikramvi

+0

我卸载了子步骤IntelliJ插件,那么它工作的很棒!谢谢 :) –