你如何處理用戶故事/接受測試,像這樣一個長鏈,那麼/什麼時候混合在一起?最好是將其分解成單獨的驗收測試,其中一個測試對話框出現,然後第二個測試對話框顯示後的行爲?混合然後和當在BDD用戶故事/驗收測試
Feature: Confirmation before removing products from cart
In order to avoid accidentally removing an item from my cart
As a Customer
I want a confirmation dialog to ask me if I'm sure I want to remove an item
Scenario: I want to remove an item from my cart
Given I have added item "xyz" to my cart
When I click "Remove"
Then a confirmation dialog pops up
And it asks "Are you sure you want to remove this from your cart"
When I click "Yes"
Then item "xyz" should be removed from my cart
這個測試被捆綁在GUI因爲「新功能「由驗收測試所描述的是在刪除購物車項目之前添加確認對話框。在我們的特殊情況下,我們開始使用黃瓜+ webrat + selenium,因爲我們想測試我們的用戶界面 – Jake 2010-08-19 18:22:17
啊,我明白了。我自己,我把它放在低級別的步驟中,讓其他人處於高級別 - 我不覺得有必要將情景與他們的父母故事緊密地聯繫起來。因人而異。 – Lunivore 2010-08-20 09:35:01