假設您有一個可以創建新用戶的表單。 你如何編寫你的黃瓜場景?用於設計表格的黃瓜場景的最佳BDD實踐
1)
Given I am logged in as admin
When I create a new user
Then I should see "Successfully created user"
2)
Given I am logged in as admin
When I go to Create new user
And I fill in "Name" with "Name111"
And I fill in "Password" with "Password111"
And I press "Create new user"
Then I should see "Successfully created user"
如果選擇1)你在哪裏記錄需求的用戶(用戶應該有一個名和密碼) 。我發現BDD是關於行爲的,但在某些時候,您和利益相關者必須指定用戶應該擁有的屬性,不是嗎?
我很新的BDD所以我很感謝任何意見...