我已經:我一直在用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」的插件。搜索並卸載。 「黃瓜適合爪哇」和「小黃瓜」應該足夠了。 –
嘿,你說得對。謝謝! – junecng
添加了一個答案,因爲似乎更多人對此感興趣。 –