我最近开始使用 Cucumber 和 grails 尝试 BDD。我正在学习黄瓜食谱书中的教程,并创建了一个功能,但尚未创建步骤定义来实现测试。
Feature: Furious Fowl Game
@integration
Scenario: New Game
Given: I see 3 buildings
When: I slingshot a bird
Then: I should see 2 buildings
当我运行时grails test-app :cucumber
,我希望测试失败表明这些步骤尚未实施,但是测试结果是成功的:
Furious Fowl Game
A single test executed without a single error or failure!
System output
Feature: Furious Fowl Game
Scenario: New Game # Game.feature:4
Given: I see 3 buildings
When: I slingshot a bird
Then: I should see 2 buildings
我敢肯定这可能是显而易见的,但我很难过。如果您需要查看我上面未包含的任何内容,请告诉我。