Elabor8 consultants, Trish, Charlotte and Saad presented this in Sydney's Agile BA/PO meetup. Apart from the story of minions' arrival in Sydney, the session covered topics like:
- Building the right thing by creating better specifications
- Difference between acceptance criteria and scenarios
- Tips to writing better acceptance criteria + scenarios
- What's an executable specification and how are scenarios converted in to automated tests
15. Tips - Writing better acceptance criteria
• Connection to database established
• Database populated with email data
• Integration with mailing server
established
• Email sent by mailing server based on
data fetched from database
• Email received as soon as new
meetup is scheduled
1. Describe WHAT, not HOW:
Don’t mix purpose of the test with the mechanics of test execution
Start
Write user story
Write acceptance
criteria
17. Tips - Writing better acceptance criteria
2. SHADED FIGS
Path Possible testing Ideas
Scary What if same email gets sent multiple times? (from user’s perspective)
Is there a situation where a meetup is scheduled and no email is sent (from meetup
organizer’s perspective)
Happy Receiving email as soon as a new meetup is scheduled
Angry Can a customer get email for a wrong meetup?
Delinquent Can organizer see the email read receipts? Can a user see who else has received an invite?
Embarrassing An email with empty body? Incorrect recipient's name, for example
Desolate Will a user get email for a meetup by default? (first time user)
Forgetful What if user opts in for notifications but does not save changes?
Indecisive A user who keeps on changing his notification settings – On/off then on
Greedy What if organizer wants to send email to everyone on meetup.com and not just that
particular meetup members
Stressful Will the email be sent to ALL members of the group within 1 minute?
Start
Write user story
Write acceptance
criteria
18. Acceptance criteria in checklist - example
✓An email is sent to all meetup members as soon as new
meetup is scheduled (Happy)
✓Members receive an email only if they opted-in for the
notifications (Happy)
✓No email notification should be sent to non-members
(Angry)
✓Don’t re-send email if email delivery fails (Scary)
✓New meetup members to receive email by default
(Desolate)
✓Email sent to ALL members of the group within 1 minute
(Stressful)
Start
Write user story
Write acceptance
criteria
21. What How
When Why
Gherkin
Start
Write user story
Write acceptance
criteria
• Language that most test tools
understand.
• Used for documentation and
automated tests.
Can be used for both acceptance
criteria and scenarios.
Allows requirements and tests to
utilise the same approach.
GIVEN <<input>>
WHEN <<action>>
THEN <<output>>
33. Scenarios – example
Background:
Given a meetup.com member named ‘Saad’,
And ‘Saad’ signed up using ‘saad@email.com.au’
Scenario: Notification is received from the Agile
BA/PO meetup
Given Saad has joined the Agile BA/PO meetup,
And global notification is turned on
And the notification for Agile BA/PO meetup is
turned on,
When the Agile BA/PO meetup is scheduled,
Then the email notification for the Agile BA/PO
meetup will be sent.
Start
Write user story
Write acceptance
criteria
Create scenarios
34. Scenarios – example
Scenario: Notification is not received when
Saad’s mailbox is full
Given Saad has joined the Agile BA/PO
meetup,
And global notification is turned on
And the notification for Agile BA/PO meetup
Is turned on,
And Saad’s mailbox is full,
When the Agile BA/PO meetup is scheduled,
Then Saad will not receive the email
notification for the Agile BA/PO meetup.
And email will not be re-sent.
Start
Write user story
Write acceptance
criteria
Create scenarios
35. Scenarios – example:
Background:
Given a meetup.com member named ‘Saad’,
And ‘Saad’ signed up using ‘saad@email.com.au’
Scenario:
Given Saad has joined <Meetup group>,
And global notification is <Global notification>,
And <Individual setting>,
When the Agile BA/PO meetup is scheduled,
Then email is <Result> to Saad’s email address.
Scenario Meetup group Global notification Individual setting Result
1 Agile BA_PO On On Sent
2 Agile BA_PO On Off Not sent
3 Agile BA_PO Off On Not sent
4 Agile BA_PO Off Off Not sent
5 Agile Coaching On On Sent
Start
Write user story
Write acceptance
criteria
Create scenarios