2017-08-29 34 views
10

我已經:我一直在用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

添加了一個答案,因爲似乎更多人對此感興趣。 –

回答

24

的問題是從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插件,那麼它工作的很棒!謝謝 :) –

相關問題