SlideShare a Scribd company logo
Requirements Delivery –
Using Examples
About Us
Bharti Rupani
@bhartir24
brupani@enterprise-knowledge.com
https://www.linkedin.com/in/bhartir
Wyn Van Devanter
@wynv
wyn.vandevanter@excella.com
https://www.linkedin.com/in/wyntuition
http://www.slideshare.net/wynvandevanter
Terminology
‱ Specification by Example
‱ Executable Specifications
‱ Automated Acceptance Tests (AAT)
‱ Behavior Driven Development (BDD)
‱ Acceptance Test Driven Development
(ATDD)
‱ Testable Requirements
“Specifications
by examples
are acceptance
tests”
- Gajko Adzic
Testable Requirements
‱ User Journeys
‱ Deliver business value
‱ Clear examples
‱ Executable
Why should you care?
‱ Clearly communicate the specifications
‱ No functional gaps
‱ Verify business rules
‱ Build the right thing
6
Building Quality
Plan Collaborate Deliver
Build the
right thing
Build the thing
right
Developing Examples
Collaboration
Prioritized
Backlog
Business Goals User
Journey
User Story
2
Acceptance
Criteria 1
Example 1
User Story
1
Acceptance
Criteria 1
Example 1
Acceptance
Criteria 2
Example 1
Collaborate How do I
code this
feature?What are
the details
of this
feature?
How do I
validate
that this
work is
done?
Three Amigos
‱ Business Analyst, Developers and Testers
‱ Collaborate
‱ Share knowledge
‱ Think about the desired outcome
‱ Shared understanding
User Journey
You are a Business Analyst that is looking for a
conference to attend.
Example of using an Example
Attend BA
Conference
View Results
Region Date
View
DCBADD
Details
View
information
about IIBADC
View speaker
profiles
View Cost
Select
DCBADD
Register via
Eventbrite
Determine
Discounts
User Story
As a business analyst, I want to review the various
IIBA discounts available so that I can pay a
reduced ticket price for DCBADD.
What is Gherkin?
‱ Business readable, domain specific language
‱ Connects human concept of cause and effect to software
concept of input/process/output
‱ Can be interpreted by automation tools to drive
acceptance tests
Gherkin Syntax
Source: Jeffrey Davidson
Scenarios
Scenario: Standard Rate
Given I am purchasing a
ticket to DCBADD
And I am not an IIBA
member
When I view my ticket price
Then I see the full rate of
$200
Scenario: IIBA Rate
Given I am purchasing a
ticket to DCBADD
And I am an IIBA member
When I view my ticket price
Then I see the discounted
rate of $150
Example
Scenario Outline: Determine DCBADD ticket price
Given I am purchasing a ticket to DCBADD
And I am a “<membership type>”
When I view my ticket price
Then I see the discounted “<ticket price>”
Examples:
membership price
nonmember $200
IIBA national $150
IIBA DC $125
Example
Using tables as arguments as input to a Given or as expected output
from a Then:
Scenario: Validate Order Total
Given I am a business analyst
And I am purchasing multiple tickets with varying “<membership type>”
to DCBADD:
When I view my total
Then I see my “<total>”
ticket number & type price
2 nonmember $400
1 IIBA national $150
Guidelines
‱ Be precise
‱ Make sure it’s testable
‱ Focus on business functionality
‱ Avoid specific details
‱ Use active voice, not passive
‱ Have a single action trigger the expected behavior
(WHEN condition)
‱ Use parameters for concise expression of examples (i.e.
scenario outlines)
Automating the scenarios
Automated Acceptance Tests
(AATs)
‱ Code automates them
‱ They run constantly
Why Have AATs? (Pros)
Communication
‱ Helps specify behavior of the system in plain text
‱ Provides a medium for non-tech and devs to agree on
Are we
talking
about
the right
system?
Seams, unit test mistakes
Automation
“There’s no place for
human beings to be
doing regression testing
manually.”
-Jez Humble
Speedier deployments
Save resources
More testing during development
Why NOT Have AATs?
(Cons)
Why don’t more people use them?
Why NOT have AATs?
‱ Maintenance
‱ Speed
‱ High false negatives, non-determinism
Impediments
‱ Poor adoption
‱ Bandwidth/Velocity
‱ Learning Curve/Experience
‱ Business users won’t write specifications
‱ Developers won’t automate them
‱ Brittle if recorded
Solutions
Acceptance Test Strategy
‱ Happy paths
‱ Major unhappy paths
‱ Legacy
‱ Regression
Minimize # of end-to-end tests
‱ AATs for journeys, not stories
‱ Is your new story entirely new?
‱ Balance high # of unit tests + selected end-to-end &
acceptance
Gherkin
Specs shouldn’t have much setup code
Given my friend ‘Bob’ typed ‘I’m excited’ into the text box
And clicks the Post button on my timeline
When I press the Like link on the post
Then the screen should say ‘Like’
And should include my name as liking it
Given my friend ‘Bob’ has posted ‘I’m excited’
And I am on my timeline
When I like on the post
Then the post should be liked by me
General Tips
‱ Create different levels of suites depending on depth/level
of feedback desired:
‱ Smoke, Current iteration/sprint, Regression
‱ Run AATs as close to the real environment as possible
When Acceptances Tests catches a
bug
‱ See why bug got through unit/integration tests
‱ Add unit, integration tests
‱ Prune AATs?
UI tests
‱ Sometimes tests will fail if the page doesn’t have enough
time to load. Use implicit waits, and explicit when really
needed
‱ Capture screen shots when tests fail
‱ Selenium IDE
AAT Workflow
AAT workflow
‱ Start with a scenario(s)
Given my friend ‘Bob’ has posted ‘I’m excited’
And I am on my timeline
When I like on the post
Then the post should be liked by me
What can you write them in?
Vim
Sublime
Text
Tracking AATs
Tracking AATs
Conclusion
‱ Worth the investment if done properly
‱ Very expensive and wasteful if not
‱ Requires collaboration between analysts, testers,
developers
‱ Developers automate the gherkin
‱ Focus on journey and scenarios as opposed to stories
Resources:
Books:
‱ Continuous Delivery, Jez Humble, David Farley
‱ Growing Object-Oriented Software, Guided By Tests, Steve
Freeman, Nat Pryce
‱ Specification by Example, Gajko Adzic
Articles:
‱ Automated Acceptance Tests,
http://www.thoughtworks.com/insights/articles/automated-
acceptance-tests
‱ Using SpecFlow with the Page Object,
http://blogs.lessthandot.com/index.php/EnterpriseDev/application-
lifecycle-management/using-specflow-to
‱ Maintaining Automated Acceptance Tests (ThoughtWorks),
http://www.youtube.com/watch?v=uf0EVbH5hdA
‱ Creating Maintainable Automated Acceptance Test Suites, Jez
Humble,
‱ http://www.youtube.com/watch?v=v-L_2y6g5DI
Thanks!
Bharti Rupani
@bhartir24
brupani@enterprise-knowledge.com
https://www.linkedin.com/in/bhartir
Wyn Van Devanter
@wynv
wyn.vandevanter@excella.com
https://www.linkedin.com/in/wyntuition
http://www.slideshare.net/wynvandevanter

More Related Content

PPTX
Automated Acceptance Test Practices and Pitfalls
PDF
Producing Testable Requirements
PDF
Eradicate Flaky Tests - AppiumConf 2021
PPTX
UI Automation Quirks
PPTX
Improving the Quality of Existing Software
PDF
Test Automation and Innovation with Open Source Tools
PPTX
Improving the Quality of Existing Software
PPTX
Improving the Quality of Existing Software - DevIntersection April 2016
Automated Acceptance Test Practices and Pitfalls
Producing Testable Requirements
Eradicate Flaky Tests - AppiumConf 2021
UI Automation Quirks
Improving the Quality of Existing Software
Test Automation and Innovation with Open Source Tools
Improving the Quality of Existing Software
Improving the Quality of Existing Software - DevIntersection April 2016

What's hot (20)

PPTX
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
PPTX
How to scale your Test Automation
PPTX
Improving The Quality of Existing Software
PDF
Selenium Deep Dive
PPTX
Improving the Quality of Existing Software
PPTX
Breaking Dependencies to Allow Unit Testing
PDF
Measuring Coverage From E2E Tests
PPT
Behavior Driven Development (BDD) and Agile Testing
PDF
Testing for Agility: Bringing Testing into Everything
PDF
WE are Doing it Wrong - Dmitry Sharkov
PPTX
Design patterns in test automation
PDF
Automate Debugging with git bisect
PDF
Automated UI test on mobile - with Cucumber/Calabash
PDF
Implementing Testing for Behavior-Driven Development Using Cucumber
PPTX
Behavior driven development - cucumber, Junit and java
PPT
Agile Testing
PDF
Behavior Driven Development with Cucumber
PPT
Patterns in Testing and a claim - iCheckWebsite
PDF
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
PPTX
Grading the Quality of Selenium Tests
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
How to scale your Test Automation
Improving The Quality of Existing Software
Selenium Deep Dive
Improving the Quality of Existing Software
Breaking Dependencies to Allow Unit Testing
Measuring Coverage From E2E Tests
Behavior Driven Development (BDD) and Agile Testing
Testing for Agility: Bringing Testing into Everything
WE are Doing it Wrong - Dmitry Sharkov
Design patterns in test automation
Automate Debugging with git bisect
Automated UI test on mobile - with Cucumber/Calabash
Implementing Testing for Behavior-Driven Development Using Cucumber
Behavior driven development - cucumber, Junit and java
Agile Testing
Behavior Driven Development with Cucumber
Patterns in Testing and a claim - iCheckWebsite
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Grading the Quality of Selenium Tests
Ad

Similar to Testable requirements (20)

PDF
Testable Requirements
PDF
Build the Right Regression Suite with Behavior-Driven Testing
PDF
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
PPT
TDD - Ketan Soni
PDF
Growing software from examples
PPTX
Pull_Request_PAW_Shared_Rohit.pptx
PDF
Agile testing
PPTX
SDLC. BA Role
PDF
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
PPTX
Automated Acceptance Tests in .NET
PDF
presentation.pdf
PPTX
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
PDF
Specification-by-Example: A Cucumber Implementation
PPTX
Agile testingandautomation
PPT
VodQA3_ATDD_KetanSoni
 
PPT
VodQA3_ATDD_KetanSoni
 
PPTX
Agile Testing and Test Automation
PDF
Tuhin Mitra: How I Automate My Negative Tests
PPTX
Modeling Requirements Using Examples
PPTX
90 days to make a difference - approach
Testable Requirements
Build the Right Regression Suite with Behavior-Driven Testing
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
TDD - Ketan Soni
Growing software from examples
Pull_Request_PAW_Shared_Rohit.pptx
Agile testing
SDLC. BA Role
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Automated Acceptance Tests in .NET
presentation.pdf
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
Specification-by-Example: A Cucumber Implementation
Agile testingandautomation
VodQA3_ATDD_KetanSoni
 
VodQA3_ATDD_KetanSoni
 
Agile Testing and Test Automation
Tuhin Mitra: How I Automate My Negative Tests
Modeling Requirements Using Examples
90 days to make a difference - approach
Ad

More from Wyn B. Van Devanter (7)

PPTX
Container orchestration overview
PPTX
Developer workflow with docker
PPTX
AWS Elastic Container Service (ECS) with a CI Pipeline Overview
PPTX
Benefits from AATs
PPTX
Developer workflow with docker
PPTX
.Net Core 1.0 vs .NET Framework
PPTX
Performance tuning an Object-Relational Mapper (ORM)
Container orchestration overview
Developer workflow with docker
AWS Elastic Container Service (ECS) with a CI Pipeline Overview
Benefits from AATs
Developer workflow with docker
.Net Core 1.0 vs .NET Framework
Performance tuning an Object-Relational Mapper (ORM)

Recently uploaded (20)

PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Transform Your Business with a Software ERP System
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
history of c programming in notes for students .pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
L1 - Introduction to python Backend.pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administraation Chapter 3
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
PDF
medical staffing services at VALiNTRY
PPT
Introduction Database Management System for Course Database
PTS Company Brochure 2025 (1).pdf.......
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Navsoft: AI-Powered Business Solutions & Custom Software Development
Online Work Permit System for Fast Permit Processing
Transform Your Business with a Software ERP System
CHAPTER 2 - PM Management and IT Context
Softaken Excel to vCard Converter Software.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
ManageIQ - Sprint 268 Review - Slide Deck
VVF-Customer-Presentation2025-Ver1.9.pptx
Design an Analysis of Algorithms II-SECS-1021-03
history of c programming in notes for students .pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
L1 - Introduction to python Backend.pptx
ai tools demonstartion for schools and inter college
System and Network Administraation Chapter 3
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
medical staffing services at VALiNTRY
Introduction Database Management System for Course Database

Testable requirements

  • 2. About Us Bharti Rupani @bhartir24 brupani@enterprise-knowledge.com https://www.linkedin.com/in/bhartir Wyn Van Devanter @wynv wyn.vandevanter@excella.com https://www.linkedin.com/in/wyntuition http://www.slideshare.net/wynvandevanter
  • 3. Terminology ‱ Specification by Example ‱ Executable Specifications ‱ Automated Acceptance Tests (AAT) ‱ Behavior Driven Development (BDD) ‱ Acceptance Test Driven Development (ATDD) ‱ Testable Requirements
  • 5. Testable Requirements ‱ User Journeys ‱ Deliver business value ‱ Clear examples ‱ Executable
  • 6. Why should you care? ‱ Clearly communicate the specifications ‱ No functional gaps ‱ Verify business rules ‱ Build the right thing 6
  • 7. Building Quality Plan Collaborate Deliver Build the right thing Build the thing right
  • 8. Developing Examples Collaboration Prioritized Backlog Business Goals User Journey User Story 2 Acceptance Criteria 1 Example 1 User Story 1 Acceptance Criteria 1 Example 1 Acceptance Criteria 2 Example 1
  • 9. Collaborate How do I code this feature?What are the details of this feature? How do I validate that this work is done?
  • 10. Three Amigos ‱ Business Analyst, Developers and Testers ‱ Collaborate ‱ Share knowledge ‱ Think about the desired outcome ‱ Shared understanding
  • 11. User Journey You are a Business Analyst that is looking for a conference to attend.
  • 12. Example of using an Example Attend BA Conference View Results Region Date View DCBADD Details View information about IIBADC View speaker profiles View Cost Select DCBADD Register via Eventbrite Determine Discounts
  • 13. User Story As a business analyst, I want to review the various IIBA discounts available so that I can pay a reduced ticket price for DCBADD.
  • 14. What is Gherkin? ‱ Business readable, domain specific language ‱ Connects human concept of cause and effect to software concept of input/process/output ‱ Can be interpreted by automation tools to drive acceptance tests
  • 16. Scenarios Scenario: Standard Rate Given I am purchasing a ticket to DCBADD And I am not an IIBA member When I view my ticket price Then I see the full rate of $200 Scenario: IIBA Rate Given I am purchasing a ticket to DCBADD And I am an IIBA member When I view my ticket price Then I see the discounted rate of $150
  • 17. Example Scenario Outline: Determine DCBADD ticket price Given I am purchasing a ticket to DCBADD And I am a “<membership type>” When I view my ticket price Then I see the discounted “<ticket price>” Examples: membership price nonmember $200 IIBA national $150 IIBA DC $125
  • 18. Example Using tables as arguments as input to a Given or as expected output from a Then: Scenario: Validate Order Total Given I am a business analyst And I am purchasing multiple tickets with varying “<membership type>” to DCBADD: When I view my total Then I see my “<total>” ticket number & type price 2 nonmember $400 1 IIBA national $150
  • 19. Guidelines ‱ Be precise ‱ Make sure it’s testable ‱ Focus on business functionality ‱ Avoid specific details ‱ Use active voice, not passive ‱ Have a single action trigger the expected behavior (WHEN condition) ‱ Use parameters for concise expression of examples (i.e. scenario outlines)
  • 21. Automated Acceptance Tests (AATs) ‱ Code automates them ‱ They run constantly
  • 22. Why Have AATs? (Pros)
  • 23. Communication ‱ Helps specify behavior of the system in plain text ‱ Provides a medium for non-tech and devs to agree on Are we talking about the right system?
  • 24. Seams, unit test mistakes
  • 25. Automation “There’s no place for human beings to be doing regression testing manually.” -Jez Humble
  • 28. More testing during development
  • 29. Why NOT Have AATs? (Cons)
  • 30. Why don’t more people use them?
  • 31. Why NOT have AATs? ‱ Maintenance ‱ Speed ‱ High false negatives, non-determinism
  • 32. Impediments ‱ Poor adoption ‱ Bandwidth/Velocity ‱ Learning Curve/Experience ‱ Business users won’t write specifications ‱ Developers won’t automate them ‱ Brittle if recorded
  • 34. Acceptance Test Strategy ‱ Happy paths ‱ Major unhappy paths ‱ Legacy ‱ Regression
  • 35. Minimize # of end-to-end tests ‱ AATs for journeys, not stories ‱ Is your new story entirely new? ‱ Balance high # of unit tests + selected end-to-end & acceptance
  • 36. Gherkin Specs shouldn’t have much setup code Given my friend ‘Bob’ typed ‘I’m excited’ into the text box And clicks the Post button on my timeline When I press the Like link on the post Then the screen should say ‘Like’ And should include my name as liking it Given my friend ‘Bob’ has posted ‘I’m excited’ And I am on my timeline When I like on the post Then the post should be liked by me
  • 37. General Tips ‱ Create different levels of suites depending on depth/level of feedback desired: ‱ Smoke, Current iteration/sprint, Regression ‱ Run AATs as close to the real environment as possible
  • 38. When Acceptances Tests catches a bug ‱ See why bug got through unit/integration tests ‱ Add unit, integration tests ‱ Prune AATs?
  • 39. UI tests ‱ Sometimes tests will fail if the page doesn’t have enough time to load. Use implicit waits, and explicit when really needed ‱ Capture screen shots when tests fail ‱ Selenium IDE
  • 41. AAT workflow ‱ Start with a scenario(s) Given my friend ‘Bob’ has posted ‘I’m excited’ And I am on my timeline When I like on the post Then the post should be liked by me
  • 42. What can you write them in? Vim Sublime Text
  • 45. Conclusion ‱ Worth the investment if done properly ‱ Very expensive and wasteful if not ‱ Requires collaboration between analysts, testers, developers ‱ Developers automate the gherkin ‱ Focus on journey and scenarios as opposed to stories
  • 46. Resources: Books: ‱ Continuous Delivery, Jez Humble, David Farley ‱ Growing Object-Oriented Software, Guided By Tests, Steve Freeman, Nat Pryce ‱ Specification by Example, Gajko Adzic Articles: ‱ Automated Acceptance Tests, http://www.thoughtworks.com/insights/articles/automated- acceptance-tests ‱ Using SpecFlow with the Page Object, http://blogs.lessthandot.com/index.php/EnterpriseDev/application- lifecycle-management/using-specflow-to ‱ Maintaining Automated Acceptance Tests (ThoughtWorks), http://www.youtube.com/watch?v=uf0EVbH5hdA ‱ Creating Maintainable Automated Acceptance Test Suites, Jez Humble, ‱ http://www.youtube.com/watch?v=v-L_2y6g5DI
  • 47. Thanks! Bharti Rupani @bhartir24 brupani@enterprise-knowledge.com https://www.linkedin.com/in/bhartir Wyn Van Devanter @wynv wyn.vandevanter@excella.com https://www.linkedin.com/in/wyntuition http://www.slideshare.net/wynvandevanter