Writing Clear Acceptance Criteria | BDD Format Guide
Write acceptance criteria that eliminate ambiguity. Learn Given-When-Then, checklist, and rules formats. GitScrum stores criteria in task checklists.
7 min read
Acceptance criteria define when a user story is complete. Clear criteria prevent "I thought it meant..." conversations, reduce rework, and help testers know what to verify. Good acceptance criteria are specific, testable, and agreed upon before development starts.
Criteria Formats
| Format | Best For | Example |
|---|---|---|
| Given-When-Then | Behavior scenarios | Login flows |
| Checklist | Simple features | Form fields |
| Rules | Constraints | Validation |
Given-When-Then
Scenario Format
GIVEN-WHEN-THEN FORMAT
ββββββββββββββββββββββ
STRUCTURE:
βββββββββββββββββββββββββββββββββββββ
GIVEN: Starting state/context
WHEN: Action taken
THEN: Expected outcome
EXAMPLE - Login:
βββββββββββββββββββββββββββββββββββββ
Story: As a user, I want to log in
so I can access my account.
Criteria:
GIVEN a registered user
WHEN they enter valid email and password
THEN they are logged in and see dashboard
GIVEN a registered user
WHEN they enter wrong password
THEN they see "Invalid credentials" error
AND they remain on login page
GIVEN a registered user
WHEN they enter wrong password 5 times
THEN their account is locked for 15 minutes
AND they see lockout message
GIVEN a user on login page
WHEN they click "Forgot password"
THEN they see password reset form
BENEFITS:
βββββββββββββββββββββββββββββββββββββ
βββ Behavior-focused
βββ Easy to convert to tests
βββ Covers happy and sad paths
βββ Clear cause and effect
βββ Reduces ambiguity
βββ QA can automate directly
Writing Good Scenarios
SCENARIO BEST PRACTICES
βββββββββββββββββββββββ
SPECIFIC OUTCOMES:
βββββββββββββββββββββββββββββββββββββ
β Vague:
THEN the user is notified
β
Specific:
THEN user sees toast: "Payment successful"
AND confirmation email is sent
AND order appears in order history
COVER EDGE CASES:
βββββββββββββββββββββββββββββββββββββ
Don't just write happy path.
Ask: What could go wrong?
βββ Invalid input
βββ Empty state
βββ Network error
βββ Permission denied
βββ Concurrent access
βββ Boundary values
βββ Each deserves scenario
EXAMPLE - FILE UPLOAD:
βββββββββββββββββββββββββββββββββββββ
Happy path:
GIVEN user on upload page
WHEN they select valid PDF under 10MB
THEN file uploads successfully
AND filename appears in list
Edge cases:
GIVEN user selects file over 10MB
WHEN they click upload
THEN they see "File too large" error
AND upload does not proceed
GIVEN user selects .exe file
WHEN they click upload
THEN they see "Invalid file type" error
GIVEN upload is in progress
WHEN network disconnects
THEN they see "Upload failed. Retry?"
AND can retry without reselecting file
Checklist Format
Simple Requirements
CHECKLIST FORMAT
ββββββββββββββββ
WHEN TO USE:
βββββββββββββββββββββββββββββββββββββ
βββ Simple features
βββ CRUD operations
βββ Form requirements
βββ When scenarios are overkill
βββ Quick validation list
STRUCTURE:
βββββββββββββββββββββββββββββββββββββ
β Requirement 1
β Requirement 2
β Requirement 3
...
EXAMPLE - USER PROFILE:
βββββββββββββββββββββββββββββββββββββ
Story: As a user, I want to edit my profile.
Acceptance Criteria:
β Display name field (max 50 chars)
β Bio field (max 500 chars)
β Avatar upload (JPEG/PNG, max 2MB)
β Save button updates profile
β Success message on save
β Cancel discards changes
β Validation errors shown inline
β Profile URL shows updated info
EXAMPLE - SEARCH:
βββββββββββββββββββββββββββββββββββββ
Story: As a user, I want to search products.
Acceptance Criteria:
β Search input in header
β Minimum 2 characters to search
β Results update as user types (debounced)
β Show "No results" for empty results
β Results show: image, name, price
β Click result goes to product page
β Clear button resets search
β Search term highlighted in results
Rules-Based Criteria
Business Constraints
RULES FORMAT
ββββββββββββ
WHEN TO USE:
βββββββββββββββββββββββββββββββββββββ
βββ Business rules
βββ Validation logic
βββ Calculations
βββ Constraints
βββ Regulatory requirements
STRUCTURE:
βββββββββββββββββββββββββββββββββββββ
Rule 1: [condition] β [behavior]
Rule 2: [condition] β [behavior]
...
EXAMPLE - PRICING:
βββββββββββββββββββββββββββββββββββββ
Story: As a customer, I want accurate pricing.
Rules:
1. Base price Γ quantity = subtotal
2. Orders > $100 get free shipping
3. Premium members get 10% discount
4. Discount applies before shipping
5. Sales tax applies based on state
6. Tax calculated on (subtotal - discount)
7. Minimum order: $5
EXAMPLE - PASSWORD:
βββββββββββββββββββββββββββββββββββββ
Story: As a user, I want secure passwords.
Rules:
1. Minimum 8 characters
2. Must contain uppercase letter
3. Must contain lowercase letter
4. Must contain number
5. Must contain special character (!@#$%^&*)
6. Cannot contain username
7. Cannot match last 5 passwords
8. Show strength indicator as user types
Writing Process
Collaborative Refinement
ACCEPTANCE CRITERIA PROCESS
βββββββββββββββββββββββββββ
STEP 1: PO DRAFTS
βββββββββββββββββββββββββββββββββββββ
Product Owner writes initial criteria.
βββ Based on requirements
βββ User perspective
βββ Main scenarios
βββ Known constraints
βββ Draft, not final
STEP 2: TEAM REVIEWS
βββββββββββββββββββββββββββββββββββββ
In grooming session:
βββ Developers review for feasibility
βββ QA reviews for testability
βββ Questions surface gaps
βββ Edge cases added
βββ Refinement discussion
Questions to ask:
βββ "What if the user does X?"
βββ "What happens when Y fails?"
βββ "Is this testable as written?"
βββ "What's the boundary here?"
βββ "How do we know this works?"
βββ Challenge assumptions
STEP 3: AGREEMENT
βββββββββββββββββββββββββββββββββββββ
Team agrees on final criteria.
βββ Everyone understands meaning
βββ PO confirms intent
βββ Developers can build
βββ QA can verify
βββ Documented in story
STEP 4: REFERENCE
βββββββββββββββββββββββββββββββββββββ
During development:
βββ Build to criteria
βββ Test against criteria
βββ Demo matches criteria
βββ Done when criteria pass
βββ Source of truth
Common Mistakes
What to Avoid
ACCEPTANCE CRITERIA ANTI-PATTERNS
βββββββββββββββββββββββββββββββββ
VAGUE CRITERIA:
βββββββββββββββββββββββββββββββββββββ
β "System should be fast"
β "User gets feedback"
β "Data is displayed nicely"
β "Works on mobile"
β
"Page loads in < 2 seconds"
β
"Toast notification for 3 seconds"
β
"Table with sortable columns"
β
"Responsive down to 375px width"
TOO DETAILED:
βββββββββββββββββββββββββββββββββββββ
β "Button is #238636 with 4px radius"
β "Use React useState for form"
This is implementation, not criteria.
Let developers decide how.
TOO FEW:
βββββββββββββββββββββββββββββββββββββ
β "User can create account"
Missing: Validation? Error handling?
Email confirmation? Password rules?
Ask: "What else must work?"
UNTESTABLE:
βββββββββββββββββββββββββββββββββββββ
β "User experience is good"
β "System is secure"
β "Performance is acceptable"
How do you verify? If you can't test,
you can't know it's done.
NOT AGREED:
βββββββββββββββββββββββββββββββββββββ
β PO writes, team never sees
β Different interpretations
β Arguments at demo time
Everyone must agree before building.
GitScrum Integration
Storing Criteria
ACCEPTANCE CRITERIA IN GITSCRUM
βββββββββββββββββββββββββββββββ
TASK DESCRIPTION:
βββββββββββββββββββββββββββββββββββββ
Story: As a user, I want to...
Acceptance Criteria:
β Criterion 1
β Criterion 2
β Criterion 3
[Markdown formatting supported]
CHECKLIST FEATURE:
βββββββββββββββββββββββββββββββββββββ
Task β Checklist
βββ Add criteria as checklist items
βββ Check off during development
βββ Progress visible
βββ Done when all checked
βββ Visual completion indicator
CUSTOM FIELD:
βββββββββββββββββββββββββββββββββββββ
Custom field: "Acceptance Criteria"
βββ Text area for criteria
βββ Visible in task detail
βββ Template available
βββ Consistent location
VERIFICATION:
βββββββββββββββββββββββββββββββββββββ
During code review / QA:
βββ Reference criteria
βββ Verify each point
βββ Comments if issues
βββ Complete when verified
βββ Criteria = checklist
Best Practices
For Acceptance Criteria
Anti-Patterns
CRITERIA MISTAKES:
β Vague language
β Too implementation-focused
β Only happy path
β Not reviewed by team
β Changed during development
β Too few or too many
β Untestable conditions
β Written after development