Acceptance criteria are an essential part of the user story that define when the task is completed and what the testers should (at least) include in their testing. Unlike requirements, acceptance criteria is not a to-do list. It’s a list of conditions that must be met for the agreement to be considered finished.
To write acceptance criteria use the Given-When-Then formula as much as possible:
- (Given) some context
- (When) some action is carried out
- (Then) a particular set of observable consequences should obtain
- Given my bank account is in credit, and I made less then 3 withdrawals today
- When I attempt to withdraw an amount less than my account limit,
- Then the machine should provide the money without errors or warnings
- Given that the user has not yet completed the introduction tour, when he logs in to the system then the tour continues from the point he left of.
- Given that the last Task of the workflow (Send Invoice) in status open, when the project manager completes this task then the button "Archive project" becomes visible.
Criteria you should not include
We follow a pragmatic approach to acceptance criteria then therefore we do not include
- Criteria that are already in the Definition of Done
- Criteria that are visible in the UI Design (i.e. "Account balance is visible")
- Criteria for which there is very little reason to test for, i.e. "On profile screen the user email is the same as the email as stored in the database" or "The total at the end of the receipt is the sum of the item line totals"
Hints on what to think about
It is essential that the PM takes sufficient time to think through acceptance criteria. Some pointers:
- What should be happening in the background before the screen loads?
- What should be happening in the background after the user has filled a field or submitted a form?
- What happens when a completely new user does this user stories. What do you show when there is no content yet? Maybe you want to do a tour?
- What if a long time user uses this screen? Sorting by relevant / Filtering out archived items, etc.
- In what scenario's would we actual want an error to occur?
- Is every type of user allowed to do everything?