SlideShare a Scribd company logo
Approaching
ATDD/BDD
Compiled By Dhaval Dalal
https://dhavaldalal.wordpress.com
@softwareartisan
Note
• To bring all this material in one place, I have
compiled it from various sources and work
done by many people.
• References are either explicitly mentioned
on the slide and/or in the References
section.
• This is presented as a journey.
Testing
Testing
Testing
Testing
Testing Testers
Focus
😟
Testing Testers
Focus
😟
Testers
Focus
😀
Testing
Testing
Testing
TestQuadrants
Functional
Acceptance
Tests
Usability Testing
Exploratory Testing
System Tests
Integration Tests
Unit Tests
(Design)
Non-Functional
Acceptance Tests
(Performance, Scaling, …)
Technology Facing
Business Facing
CritiqueProduct
SupportingtheTeam
Automated Manual or Automated
ManualAutomated
Diagram by Brian Marick
Double Loop Approach
• Underneath AT, follow the Unit Level test/
implement/refactor cycle - TDD cycle.
• Start by writing an Acceptance Test (AT) that
exercises the functionality to be built.
• Failing AT shows that the
system does not yet
implement that feature.
• Passing it - means we are
done.
• Outer loop focuses on meeting customer’s
expectations and supporting them.
Double Loop Approach
• Inner loop focuses on meeting developers’
expectations and supporting them.
Is BDD == TDD?
• TDD captures behaviours and intention - So with
BDD.
• TDD specs start their journey as a guide and
subsequently continue as a sentry preventing
regression - So with BDD.
• TDD is for low-level requirements (at class/model
level), BDD is for high-level requirements (at UI/
Services level)
• TDD vocabulary is test-based, BDD vocabulary is
English-like.
http://neelnarayan.blogspot.in/2010/07/bdd-is-more-than-tdd-done-right.html
Is BDD == TDD?
• TDD captures behaviours and intention - So with
BDD.
• TDD specs start their journey as a guide and
subsequently continue as a sentry preventing
regression - So with BDD.
• TDD is for low-level requirements (at class/model
level), BDD is for high-level requirements (at UI/
Services level)
• TDD vocabulary is test-based, BDD vocabulary is
English-like.
http://neelnarayan.blogspot.in/2010/07/bdd-is-more-than-tdd-done-right.html
But, BDD != TDD
• BDD is mainly about…
• Conversation
• Collaboration
• Devs and QAs collaborating changes the game from
finding defects to preventing defects
• Devs, BAs and QAs collaborating together helps define
executable, verifiable and unambiguous requirements
• And With Examples!
• Leverage BDD and TDD using the double
loop approach
• Business facing nature demands use of natural
language to express intentions.
• Express requirements as user stories using the BDD
(grammar & structure) collaboratively with the three amigos
- BAs, Devs and Testers.
• Write user stories (features & scenarios).
• Implementation demands use of a general purpose
programming language to express test mechanics.
• Write code (fixtures) that maps the stories to specs.
• Write production code, use TDD to make the specs pass.
RSpec
https://cucumber.io/blog/2014/03/03/the-worlds-most-misunderstood-collaboration-tool
<<preamble>>
Feature
<<system interaction>>
Scenario
<<setup repetition>>
Background
<<data repetition>>
Outline
<<involved setup>>
Inline Tables
One feature
per file
1..*
0..1
0..1
0..*
• Parse Input using
• @XStreamConverter, @Transform -
Converter
• @Delimiter - Split to List
• @Format - Dates etc...
Whats the difference
between ATDD & BDD?
• ATDD
• Focus is on code meeting customer/stakeholder
expectations.
• Focus is to drive development to deliver the ‘right thing’
• BDD
• Focus is on the discovery of stuff we didn’t know about,
particularly around the contexts in which scenarios take
place.
• Enabled Conversations between users and stakeholders
Does the difference matter?
https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/
Elisabeth responds:
As for differences between ATDD and TDR, FTDD, BDD, and STDD, I think we’re
all talking about more or less the same thing just using different names. And
honestly, I don’t have a strong attachment to any particular name. I do, however,
have a strong attachment to some subtle elements of the technique as I describe it.
To me, the essential characteristics of ATDD, by whatever name you want to call it,
are:
. We use test ideas to elicit details from the business stakeholder(s) about their
expectations. By proactively discussing test ideas – like boundary conditions or
configurations or varying sequences of user actions, etc – we can come to a
shared understanding of the business stakeholder’s real expectations for the
system instead of having testers file a whole bunch of bugs late in the process.
. We distill acceptance criteria into automatable tests expressed in a natural
language rather than a programming language. This enables us to completely
separate the articulation of expectations from any technical details or
dependencies.
. We write fixtures or libraries to wire the keywords in the tests to the software
under development during implementation. That’s wiring, not translating. And
doing it as part of the implementation effort, not attempting to retrofit automation
after the code is written.
Does the difference matter?
http://testobsessed.com/2008/12/acceptance-test-driven-development-atdd-an-overview/
What can go wrong?
• Lack of attention while expressing intent.
• Exhaustive acceptance tests.
• Absence of continuous curation of tests.
• Acceptance tests are solely testers
responsibility.
• ATs are second-class citizens.
Maintainable Acceptance Tests - Agile India 2013 - Jez Humble and Badrinath Janakiraman
Inverted Pyramid
UI
Tests
Unit
Tests
Acceptance
Tests
Sustenance
Value
Effort
Low Value
High Effort
High Value
High Effort
Low Value
Low Effort
High Value
Low Effort
The Test Pyramid
Technology Facing
Business
Facing
Unit
Tests
UI
Tests
Acceptance
Tests
End-to-End Tests
Workflow Tests
Journey Tests
Feature Tests
Integration Tests
Adapted from Naresh Jain’s Test Pyramid
Continuous Curation
Continuous Curation
Features
(Acceptance Tests)
Continuous Curation
Features
(Acceptance Tests)
Journeys
(Journey Tests)
Extract and evolve
Continuous Curation
Features
(Acceptance Tests)
Journeys
(Journey Tests)
Workflows
(Workflow Tests)
Extract and evolve
Extract and evolve
An Appropriate Perspective
• Everyone owns the acceptance tests.
• Quality is everybody’s responsibility.
• Passing ATs are necessary (but insufficient)
for “done”.
• Continuous Curation by Devs and QAs
together.
• Test code is a first-class citizen like
production code.
Maintainable Acceptance Tests - Agile India 2013 - Jez Humble and Badrinath Janakiraman
Breaking Test Quadrants
https://gojko.net/2013/10/21/lets-break-the-agile-testing-quadrants/
References
• Growing Object-Oriented Software - Steve Freeman and Nat Pryce
• Maintainable Acceptance Tests - Agile India 2013 - Jez Humble & Badrinath Janakiraman
• BDD in Java and Groovy -Venkat Subramaniam
• Inverted Test Pyramid and Test Pyramid - Naresh Jain
• http://neelnarayan.blogspot.in/2010/07/bdd-is-more-than-tdd-done-right.html
• https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-
stuff/
• https://www.infoq.com/news/2011/02/BDD-ATDD
• http://testobsessed.com/2008/12/acceptance-test-driven-development-atdd-an-
overview/
• https://cucumber.io/blog/2015/12/08/example-mapping-introduction
• https://cucumber.io/blog/2014/03/03/the-worlds-most-misunderstood-collaboration-
tool

More Related Content

PDF
Agile Testing Framework - The Art of Automated Testing
PPTX
Agile and ATDD the perfect couple
PDF
Enterprise Systems Development
PPT
Best practices in enterprise applications
PPTX
(A)TDD The what, why and how
KEY
Getting Comfortable with BDD
PDF
Specification by Example - Agile India 2015
PDF
Testers Career Development Vaidyanathan Ramalingam
Agile Testing Framework - The Art of Automated Testing
Agile and ATDD the perfect couple
Enterprise Systems Development
Best practices in enterprise applications
(A)TDD The what, why and how
Getting Comfortable with BDD
Specification by Example - Agile India 2015
Testers Career Development Vaidyanathan Ramalingam

What's hot (20)

DOC
PDF
Specification-by-Example: A Cucumber Implementation
PPTX
PHPConf.asia 2016 - BDD with Behat for Beginners
PDF
Software testing career growth path explained
PDF
Specification by example - course summary
PDF
Code quality as a built-in process
PDF
Practical way to experience of Specification by Example
PPTX
Software testing
PPTX
TDD - Agile
PDF
TDD with Ruby
PDF
Unit test in a nutshell
PPTX
TDD That Was Easy!
PDF
Writing Testable Code
PDF
BDD in Action - Automated Web Testing with WebDriver and Serenity
PPT
Test Automation Principles
PDF
Solid principles
PDF
Introduction of unit test to management
PDF
Lessons learned with Bdd: a tutorial
PPT
Introduction to Test Driven Development
DOCX
Automation test lead
Specification-by-Example: A Cucumber Implementation
PHPConf.asia 2016 - BDD with Behat for Beginners
Software testing career growth path explained
Specification by example - course summary
Code quality as a built-in process
Practical way to experience of Specification by Example
Software testing
TDD - Agile
TDD with Ruby
Unit test in a nutshell
TDD That Was Easy!
Writing Testable Code
BDD in Action - Automated Web Testing with WebDriver and Serenity
Test Automation Principles
Solid principles
Introduction of unit test to management
Lessons learned with Bdd: a tutorial
Introduction to Test Driven Development
Automation test lead
Ad

Similar to Approaching ATDD/BDD (20)

PPTX
Tdd and bdd
PDF
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
PDF
Making the Move to Behavior-Driven Development
PDF
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
PPTX
Making the Move to Behavior Driven Development
PDF
TDD vs BDD_ Which Development Approach is Best for Your Project.pdf
PDF
TDD vs. BDD: A Practical Comparison for Modern Development Teams
PDF
Inside Behavior Driven Development
PPTX
Journey of atdd
PDF
How BDD enables True CI/CD
PDF
TDD and BDD and ATDD
PPTX
Topic tdd-and-bdd b4usolution
PPTX
Myths and Challenges of Behaviour Driven Development
PDF
TDD for Testers Workshop
PDF
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
PPTX
Behavior Driven Development with AngularJS & Jasmine
PPT
Test Driven Development
PPTX
Test driven development v1.0
PPTX
Quality Jam: BDD, TDD and ATDD for the Enterprise
PDF
Expo qa from user stories to automated acceptance tests with bdd
Tdd and bdd
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
Making the Move to Behavior-Driven Development
Tdd vs bdd vs atdd — developers’ methodologies to navigate complex developmen...
Making the Move to Behavior Driven Development
TDD vs BDD_ Which Development Approach is Best for Your Project.pdf
TDD vs. BDD: A Practical Comparison for Modern Development Teams
Inside Behavior Driven Development
Journey of atdd
How BDD enables True CI/CD
TDD and BDD and ATDD
Topic tdd-and-bdd b4usolution
Myths and Challenges of Behaviour Driven Development
TDD for Testers Workshop
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Behavior Driven Development with AngularJS & Jasmine
Test Driven Development
Test driven development v1.0
Quality Jam: BDD, TDD and ATDD for the Enterprise
Expo qa from user stories to automated acceptance tests with bdd
Ad

More from Dhaval Dalal (20)

PDF
Sri-Aurobindos-Integral-Education-Principles.pdf
PDF
Test Pyramid in Microservices Context
PDF
Code Retreat
PDF
Booting into functional programming
PDF
Currying and Partial Function Application (PFA)
PDF
Creating Lazy stream in CSharp
PDF
Json Viewer Stories
PDF
Value Objects
PDF
Mars rover-extension
PDF
How Is Homeopathy Near To Yoga?
PDF
Paradigms Code jugalbandi
PDF
Data Reconciliation
PDF
DRYing to Monad in Java8
PDF
CodeRetreat
PDF
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
PDF
Jumping-with-java8
PDF
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
PDF
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
PDF
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
PDF
The tao-of-transformation-workshop
Sri-Aurobindos-Integral-Education-Principles.pdf
Test Pyramid in Microservices Context
Code Retreat
Booting into functional programming
Currying and Partial Function Application (PFA)
Creating Lazy stream in CSharp
Json Viewer Stories
Value Objects
Mars rover-extension
How Is Homeopathy Near To Yoga?
Paradigms Code jugalbandi
Data Reconciliation
DRYing to Monad in Java8
CodeRetreat
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
Jumping-with-java8
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
The tao-of-transformation-workshop

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Monthly Chronicles - July 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
Empathic Computing: Creating Shared Understanding
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks

Approaching ATDD/BDD

  • 1. Approaching ATDD/BDD Compiled By Dhaval Dalal https://dhavaldalal.wordpress.com @softwareartisan
  • 2. Note • To bring all this material in one place, I have compiled it from various sources and work done by many people. • References are either explicitly mentioned on the slide and/or in the References section. • This is presented as a journey.
  • 12. TestQuadrants Functional Acceptance Tests Usability Testing Exploratory Testing System Tests Integration Tests Unit Tests (Design) Non-Functional Acceptance Tests (Performance, Scaling, …) Technology Facing Business Facing CritiqueProduct SupportingtheTeam Automated Manual or Automated ManualAutomated Diagram by Brian Marick
  • 13. Double Loop Approach • Underneath AT, follow the Unit Level test/ implement/refactor cycle - TDD cycle. • Start by writing an Acceptance Test (AT) that exercises the functionality to be built. • Failing AT shows that the system does not yet implement that feature. • Passing it - means we are done.
  • 14. • Outer loop focuses on meeting customer’s expectations and supporting them. Double Loop Approach • Inner loop focuses on meeting developers’ expectations and supporting them.
  • 15. Is BDD == TDD? • TDD captures behaviours and intention - So with BDD. • TDD specs start their journey as a guide and subsequently continue as a sentry preventing regression - So with BDD. • TDD is for low-level requirements (at class/model level), BDD is for high-level requirements (at UI/ Services level) • TDD vocabulary is test-based, BDD vocabulary is English-like. http://neelnarayan.blogspot.in/2010/07/bdd-is-more-than-tdd-done-right.html
  • 16. Is BDD == TDD? • TDD captures behaviours and intention - So with BDD. • TDD specs start their journey as a guide and subsequently continue as a sentry preventing regression - So with BDD. • TDD is for low-level requirements (at class/model level), BDD is for high-level requirements (at UI/ Services level) • TDD vocabulary is test-based, BDD vocabulary is English-like. http://neelnarayan.blogspot.in/2010/07/bdd-is-more-than-tdd-done-right.html
  • 17. But, BDD != TDD • BDD is mainly about… • Conversation • Collaboration • Devs and QAs collaborating changes the game from finding defects to preventing defects • Devs, BAs and QAs collaborating together helps define executable, verifiable and unambiguous requirements • And With Examples! • Leverage BDD and TDD using the double loop approach
  • 18. • Business facing nature demands use of natural language to express intentions. • Express requirements as user stories using the BDD (grammar & structure) collaboratively with the three amigos - BAs, Devs and Testers. • Write user stories (features & scenarios). • Implementation demands use of a general purpose programming language to express test mechanics. • Write code (fixtures) that maps the stories to specs. • Write production code, use TDD to make the specs pass. RSpec
  • 20. <<preamble>> Feature <<system interaction>> Scenario <<setup repetition>> Background <<data repetition>> Outline <<involved setup>> Inline Tables One feature per file 1..* 0..1 0..1 0..* • Parse Input using • @XStreamConverter, @Transform - Converter • @Delimiter - Split to List • @Format - Dates etc...
  • 21. Whats the difference between ATDD & BDD? • ATDD • Focus is on code meeting customer/stakeholder expectations. • Focus is to drive development to deliver the ‘right thing’ • BDD • Focus is on the discovery of stuff we didn’t know about, particularly around the contexts in which scenarios take place. • Enabled Conversations between users and stakeholders
  • 22. Does the difference matter? https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/
  • 23. Elisabeth responds: As for differences between ATDD and TDR, FTDD, BDD, and STDD, I think we’re all talking about more or less the same thing just using different names. And honestly, I don’t have a strong attachment to any particular name. I do, however, have a strong attachment to some subtle elements of the technique as I describe it. To me, the essential characteristics of ATDD, by whatever name you want to call it, are: . We use test ideas to elicit details from the business stakeholder(s) about their expectations. By proactively discussing test ideas – like boundary conditions or configurations or varying sequences of user actions, etc – we can come to a shared understanding of the business stakeholder’s real expectations for the system instead of having testers file a whole bunch of bugs late in the process. . We distill acceptance criteria into automatable tests expressed in a natural language rather than a programming language. This enables us to completely separate the articulation of expectations from any technical details or dependencies. . We write fixtures or libraries to wire the keywords in the tests to the software under development during implementation. That’s wiring, not translating. And doing it as part of the implementation effort, not attempting to retrofit automation after the code is written. Does the difference matter? http://testobsessed.com/2008/12/acceptance-test-driven-development-atdd-an-overview/
  • 24. What can go wrong? • Lack of attention while expressing intent. • Exhaustive acceptance tests. • Absence of continuous curation of tests. • Acceptance tests are solely testers responsibility. • ATs are second-class citizens. Maintainable Acceptance Tests - Agile India 2013 - Jez Humble and Badrinath Janakiraman
  • 26. Sustenance Value Effort Low Value High Effort High Value High Effort Low Value Low Effort High Value Low Effort
  • 27. The Test Pyramid Technology Facing Business Facing Unit Tests UI Tests Acceptance Tests End-to-End Tests Workflow Tests Journey Tests Feature Tests Integration Tests Adapted from Naresh Jain’s Test Pyramid
  • 31. Continuous Curation Features (Acceptance Tests) Journeys (Journey Tests) Workflows (Workflow Tests) Extract and evolve Extract and evolve
  • 32. An Appropriate Perspective • Everyone owns the acceptance tests. • Quality is everybody’s responsibility. • Passing ATs are necessary (but insufficient) for “done”. • Continuous Curation by Devs and QAs together. • Test code is a first-class citizen like production code. Maintainable Acceptance Tests - Agile India 2013 - Jez Humble and Badrinath Janakiraman
  • 34. References • Growing Object-Oriented Software - Steve Freeman and Nat Pryce • Maintainable Acceptance Tests - Agile India 2013 - Jez Humble & Badrinath Janakiraman • BDD in Java and Groovy -Venkat Subramaniam • Inverted Test Pyramid and Test Pyramid - Naresh Jain • http://neelnarayan.blogspot.in/2010/07/bdd-is-more-than-tdd-done-right.html • https://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related- stuff/ • https://www.infoq.com/news/2011/02/BDD-ATDD • http://testobsessed.com/2008/12/acceptance-test-driven-development-atdd-an- overview/ • https://cucumber.io/blog/2015/12/08/example-mapping-introduction • https://cucumber.io/blog/2014/03/03/the-worlds-most-misunderstood-collaboration- tool