一個使用者故事是一個小塊有價值的實用功能,用於規劃和優先排序敏捷團隊的工作。
一個好的使用者故事應該
- 交付一個可展示的實用功能
- 具有可測試的接受標準
並且是
- I獨立的
- N可協商的
- V有價值的
- E可估計的
- S小的
- T可測試的
故事格式
一個好的使用者故事應該描述誰(<actor>
),什麼(<feature>
)和為什麼(<benefit>
)。
As an <actor>
I want a <feature>
So that <benefit>
範例
As an mobile bank customer
I want to see balance on my accounts
So that I can make better informed decisions about my spending
使用 Cucumber 語言的接受標準
接受標準是(軟體)產品必須滿足的條件,才能被使用者、客戶或其他利害關係人接受。
這些最好使用 Cucumber 語言和 Gherkin 語法編寫。
Feature: Some important feature
Scenario: Get something
Given I have something
When I do something
Then I get something else
Scenario: Get something different
Given I have something
And I have also some other thing
When I do something different
Then I get something different
…等等,根據需要添加更多情境。
範例
Feature: Some important feature
Scenario: Do not show balance if not logged in
Given I am not logged on to the mobile banking app
When I open the mobile banking app
Then I can see a login page
And I do not see account balance
Scenario: Show balance on the accounts page after logging in
Given I have just logged on to the mobile banking app
When I load the accounts page
Then I can see account balance for each of my accounts