我有以下问题。我的功能文件如下:
Feature: Serve coffee
Coffee should not be served until paid for
Coffee should not be served until the button has been pressed
If there is no coffee left then money should be refunded
Scenario: Buy last coffee
Given there are 1 coffees left in the machine
And I have deposited 1$
When I press the coffee button
Then I should be served a coffee
InteliJ 突出显示 Given 等作为缺少的步骤定义。我生成定义,但 InteliJ 仍然无法识别它们。我正在使用具有以下配置的Cucumber gradle 插件:
cucumber {
formats = ['pretty','json:build/cucumber.json','junit:build/cucumber.xml']
glueDirs = ['src/test/resources/step_definitions']
featureDirs = ['src/test/resources/features']
}
我真的不确定我在那里做错了什么。提前感谢您的任何建议!