Sub topic 7
Writing Testable Acceptance Criteria
Assume you already understand a game team's roles, basic gameplay design, and the idea of a feature spec. This chapter focuses on turning design rules into checks that QA, engineering, and design can all interpret the same way.
What makes criteria testable?
Acceptance criteria define the observable conditions that must be true before a feature is accepted. They are not implementation instructions. They describe behavior from the player's or user's point of view.
A useful criterion answers three questions:
- What state must exist before the test?
- What action or event occurs?
- What result can someone observe?
Avoid words such as “smooth,” “quick,” “appropriate,” or “works correctly” unless you define how to measure them. A tester should be able to run the scenario without asking what the writer meant.
Keep each criterion focused on one behavior. Separate normal behavior from blocked actions, interruptions, and boundary cases.
Use Given, When, Then
The Given/When/Then format makes the setup, trigger, and result explicit:
- Given describes the starting state or condition.
- When describes one player action or game event.
- Then describes the expected result.
For a dash ability, criteria might look like this:
Feature: Dash
Scenario: Dash in the input direction
Given the player is on the ground and Dash is available
When the player presses Dash while holding right
Then the player moves right at dash speed for the dash duration
Scenario: Dash uses the facing direction without movement input
Given the player is on the ground, facing left, and Dash is available
When the player presses Dash without holding a movement direction
Then the player moves left at dash speed for the dash duration
Scenario: Dash is blocked during cooldown
Given the player dashed less than the cooldown time ago
When the player presses Dash
Then no dash starts
Scenario: Damage interrupts a dash
Given the player is dashing
When the player takes damage
Then the dash ends immediatelyThe criteria refer to “dash speed,” “dash duration,” and “cooldown time” without hard-coding values. Those values belong in a tuning section or data file. The acceptance test can still verify them by reading the approved tuning values.
Cover states and transitions
A scenario should identify important states, such as grounded, airborne, stunned, dead, or on cooldown. State names must match the feature's rules.
A simple state flow helps reveal missing criteria:
Include criteria for transitions that could cause bugs. Test what happens when the player presses Dash at the edge of a platform, takes damage during the dash, or attempts a second dash before the cooldown ends.
Review criteria with the team
Use this checklist before sign-off:
| Check | Question |
|---|---|
| Observable | Can QA see or measure the result? |
| Atomic | Does the scenario test one behavior? |
| Complete | Are normal, blocked, and interrupted states covered? |
| Consistent | Do the terms match the rules and tuning data? |
Exercise
Rewrite this criterion so it is testable: “The dash should feel responsive.”
Show answer
Given the player is on the ground and Dash is available, when the player presses Dash, then the dash begins within the agreed input-response limit and moves the player in the selected direction.