バックグラウンドが失敗すると、キュウリは終了コード0(私が知る限り「OK」を意味します)を返します。
失敗したステップはおそらくバックグラウンドにあるべきではありません(せいぜい「前」フックにあると思います??)。しかし、この終了コードを返す哲学を知っている人はいますか? それはバグですか、それとも機能ですか?
付録: より具体的な例: このコードがパスしたとしましょう:
Feature: Figuring out how Cucumber works
As a developer
I want to find out why cuccies fail, but my build doesnt
In order to have more confidence in my build
Background: logging in into the system
Given I am logged in
Scenario: creating a new test set
When I do something
Then I should see "you've done something"
終了コード 0 で戻ります。失敗させましょう。
Background: logging in into the system
Given I am logged in
Scenario: creating a new test set
Then I should see "there's no way you see this"
When I do something
Then I should see "you've done something"
出力に失敗したステップが表示され、失敗したステップをバックグラウンドに移動すると、終了コード 1 が返されます。
Background: logging in into the system
Given I am logged in
Then I should see "there's no way you see this"
Scenario: creating a new test set
When I do something
Then I should see "you've done something"
出力はまだ失敗したことを示していますが、終了コード 0 で戻ります