我最近开始使用黄瓜和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
我确信这可能是显而易见的,但我很难过。如果您需要查看我上面未包含的任何内容,请与我们联系。