SlideShare a Scribd company logo
1 of 23
Download to read offline
BDD Crash Course for Testers
Gaspar Nagy
coach • trainer • bdd addict • creator of specflow
@gasparnagy • gaspar@specsolutions.eu
QA Fest Kiev • 31/10/2015
Copyright © Gaspar Nagy
What is BDD?
Copyright © Gaspar Nagy
BDD?
BDD is a second-generation,
outside-in, pull-based, multiple-
stakeholder, multiple-scale, high-
automation, agile methodology.
It describes a cycle of interactions
with well-defined outputs, resulting
in the delivery of working, tested
software that matters.
Dan North, Agile Testing, Specifications and BDD Exchange 2009
Copyright © Gaspar Nagy
BDD
Behavior Driven
Development
TDD
Test Driven
Development
DDD
Domain Driven Design
ATDD
Acceptance Test
Driven Development
User Stories
Specification
by Example
Definition of
Done
Outside-In
Development
DSL
Domain Specific
Language
Copyright © Gaspar Nagy
FEAR
My Story
Agile
Engineering
(XP, TDD,
pairing)
Agile
Project
Mgmt.
(Scrum, Kanban)
Agile
Requirement
Analysis
(User Story,
Acceptance
Criteria)
Agile
Testing
(bug prevention,
exploratory
testing, context-
driven)
Bug Hunting → Bug Prevention
Copyright © Gaspar Nagy
Requirements vs. Tests
As formality increases, tests and
requirements become indistinguishable.
At the limit, tests and requirements are
equivalent.
Equivalence Hypothesis (Martin, Melnik)
Pic: Martin/Melnik: Requirements and Tests
Copyright © Gaspar Nagy
Specification-By-Example
Example Tests
Specifications
consist of
describe validate fulfillment
Source: Gojko Adzic – Bridging the Communication Gap
My Story
Agile
Engineering
(XP, TDD,
pairing)
Agile
Project
Mgmt.
(Scrum, Kanban)
Agile
Requirement
Analysis
(User Story,
Acceptance
Criteria)
Agile
Testing
(bug prevention,
exploratory
testing, context-
driven)
BDD
Copyright © Gaspar Nagy
BDD
BDD =
Product Ownership +
Collaboration +
Automation
on the product
of requirements
real
Team Foundation Server Version Control
TeamFoundation Server Workitems
SpecLog
Story Maps
Product
Backlog
Sprint
Backlog
Task Board
SpecFlow Scenarios
Test-
auto-
mation
Product
Living
Documen-
tation
Our Process
Source: TechTalk (www.techtalk.at)
Planning a story with acceptance
criteria
“Imagine this story is
already implemented:
How would you verify
it?”
“I would try to put a book
into the shopping cart …”
“I would try to remove a
book from the shopping
cart…”
“I’d check whether the shopping
cart is empty, when I enter the
shop …”
Shopping cart should be
empty when entering the
shop
Source: TechTalk (www.techtalk.at)
Gherkin Scenarios
Scenario: Books can be added to the shopping basket
Given the following books
|Author |Title |
|Martin Fowler |Analysis Patterns |
|Gojko Adzic |Bridging the Communication Gap |
And my shopping basket is empty
When I add the book “Analysis Patterns” to my shopping basket
Then my shopping basket should contain 1 copy of “Analysis Patterns”
Copyright © Gaspar Nagy
DEMO
SpecFlow in
Action
Copyright © Gaspar Nagy
Test automation is hard
Approach and Landing Tests
Source: https://en.Wikipedia.org/wiki/Approach_and_Landing_Tests
An example of using stubs…
Source: https://en.Wikipedia.org/wiki/Approach_and_Landing_Tests
Copyright © Gaspar Nagy
Test-first thinking in designing
complex applications helps a lot for
test automation efficiency
Copyright © Gaspar Nagy
Test-first is hard
• When we exploring new areas/technologies
• When we need to work with legacy systems
• When …
But this should not be an excuse but a source of
inspiration!
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
SpecFlow
Course
Kiev
9-11 November
Thank you!
See you at on scrummaster.com.ua's booth!
Gaspar Nagy
coach • trainer • bdd addict • creator of specflow
@gasparnagy • gaspar@specsolutions.eu

More Related Content

More from Gáspár Nagy

BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyGáspár Nagy
 
Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Gáspár Nagy
 
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)Gáspár Nagy
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Gáspár Nagy
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Gáspár Nagy
 
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Gáspár Nagy
 
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)Gáspár Nagy
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Gáspár Nagy
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Gáspár Nagy
 
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Gáspár Nagy
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Gáspár Nagy
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...Gáspár Nagy
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Gáspár Nagy
 

More from Gáspár Nagy (13)

BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing Strategy
 
Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023Ramp up your testing solution, ExpoQA 2023
Ramp up your testing solution, ExpoQA 2023
 
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
 
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
 
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
 
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
 

Recently uploaded

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Recently uploaded (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

BDD Crash Course for Testers (QA Fest Kiev, 31/10/2015)

  • 1. BDD Crash Course for Testers Gaspar Nagy coach • trainer • bdd addict • creator of specflow @gasparnagy • gaspar@specsolutions.eu QA Fest Kiev • 31/10/2015
  • 2. Copyright © Gaspar Nagy What is BDD?
  • 3. Copyright © Gaspar Nagy BDD? BDD is a second-generation, outside-in, pull-based, multiple- stakeholder, multiple-scale, high- automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters. Dan North, Agile Testing, Specifications and BDD Exchange 2009
  • 4. Copyright © Gaspar Nagy BDD Behavior Driven Development TDD Test Driven Development DDD Domain Driven Design ATDD Acceptance Test Driven Development User Stories Specification by Example Definition of Done Outside-In Development DSL Domain Specific Language
  • 6. My Story Agile Engineering (XP, TDD, pairing) Agile Project Mgmt. (Scrum, Kanban) Agile Requirement Analysis (User Story, Acceptance Criteria) Agile Testing (bug prevention, exploratory testing, context- driven)
  • 7. Bug Hunting → Bug Prevention
  • 8. Copyright © Gaspar Nagy Requirements vs. Tests As formality increases, tests and requirements become indistinguishable. At the limit, tests and requirements are equivalent. Equivalence Hypothesis (Martin, Melnik) Pic: Martin/Melnik: Requirements and Tests
  • 9. Copyright © Gaspar Nagy Specification-By-Example Example Tests Specifications consist of describe validate fulfillment Source: Gojko Adzic – Bridging the Communication Gap
  • 10. My Story Agile Engineering (XP, TDD, pairing) Agile Project Mgmt. (Scrum, Kanban) Agile Requirement Analysis (User Story, Acceptance Criteria) Agile Testing (bug prevention, exploratory testing, context- driven) BDD
  • 11. Copyright © Gaspar Nagy BDD BDD = Product Ownership + Collaboration + Automation on the product of requirements real
  • 12. Team Foundation Server Version Control TeamFoundation Server Workitems SpecLog Story Maps Product Backlog Sprint Backlog Task Board SpecFlow Scenarios Test- auto- mation Product Living Documen- tation Our Process Source: TechTalk (www.techtalk.at)
  • 13. Planning a story with acceptance criteria “Imagine this story is already implemented: How would you verify it?” “I would try to put a book into the shopping cart …” “I would try to remove a book from the shopping cart…” “I’d check whether the shopping cart is empty, when I enter the shop …” Shopping cart should be empty when entering the shop Source: TechTalk (www.techtalk.at)
  • 14. Gherkin Scenarios Scenario: Books can be added to the shopping basket Given the following books |Author |Title | |Martin Fowler |Analysis Patterns | |Gojko Adzic |Bridging the Communication Gap | And my shopping basket is empty When I add the book “Analysis Patterns” to my shopping basket Then my shopping basket should contain 1 copy of “Analysis Patterns”
  • 15. Copyright © Gaspar Nagy DEMO SpecFlow in Action
  • 16. Copyright © Gaspar Nagy Test automation is hard
  • 17. Approach and Landing Tests Source: https://en.Wikipedia.org/wiki/Approach_and_Landing_Tests
  • 18. An example of using stubs… Source: https://en.Wikipedia.org/wiki/Approach_and_Landing_Tests
  • 19. Copyright © Gaspar Nagy Test-first thinking in designing complex applications helps a lot for test automation efficiency
  • 20. Copyright © Gaspar Nagy Test-first is hard • When we exploring new areas/technologies • When we need to work with legacy systems • When … But this should not be an excuse but a source of inspiration!
  • 22. Copyright © Gaspar Nagy SpecFlow Course Kiev 9-11 November
  • 23. Thank you! See you at on scrummaster.com.ua's booth! Gaspar Nagy coach • trainer • bdd addict • creator of specflow @gasparnagy • gaspar@specsolutions.eu

Editor's Notes

  1. Start Time: 5min Expectation: People have heard of BDD Goal: Summary for common understanding 2001: Dan North invented the term (test -> “should”) -> JBehave (Java) -> RSpec (Ruby) -> Cucumber (Ruby) second generation: not original, evolved from lots of other stuff
  2. Dan North: BDD is a second generation agile methodology. The most important ones probably: Specification by Example, ATDD, TDD, DDD DDD (here): focus on problem domain, not technology We have another talk about explaining all the relations, but that is not the goal of this talk. … Just one Concept we want to highlight: Specfication by Example
  3. Paper published for IEEE, Robert C. Marting and Grigori Melnik Möbius strip Traditionally this is not recognized because RE and Testing are set up as different disciplines But they are about the same: how the system is used Wouldn’t it make sense to leverage some synergies?
  4. 1977, space shuttle (first real trip 1981) Landing: most critical; launch: most expensive Boeing 747 Shuttle Carrier Aircraft (SCA) 1977-ben az Űrsikló program előkészületei folytak (az első valódi űrutazás 1981-ben történt). Az űrutazás egyik legkritikusabb pontja a leszállás a felszállás viszont az egyik legköltségesebb. Tekintve, hogy a fel és leszállások száma – jó esetben kiegyenlíti egymást, szükség volt egy olyan megoldásra, amivel a leszállás tesztelhető a felszállás költségei nélkül. Ehhez végül egy jelentősen átalakított Boeing 747-est (kettőt) használtak, amely képes volt a tetejére erősített űrsiklót a levegőbe emelni.
  5. Boings were used to carry space shuttles to road shows later Nincsenek adatok, ennek költségeiről, de bizonyára sok pénzbe került. (A csatlakozási pontot vicces felirattal látták el, amiben jelölik, hogy az ürrepülőt „fekete felével lefelé” kell rögzíteni. Tesztautomatizálás közben is hasonló problémákba ütközhetünk. Tesztelni kell egy folyamatot, de a tesztelhetőség miatt komoly infrastruktúrát kell felépíteni, aminek az egyedüli szerepe a tesztelhetőség lehetővé tétele vagy hatékonyságának növelése. Ezeket mi stub-oknak hívjuk. Az átalakított boingeket később arra is használták, hogy az űrrepülőket múzeumokba vagy légiparádékra szállítsák – talán a mi stubjaink is jók lesznek valamire még?
  6. Boings were used to carry space shuttles to road shows later Nincsenek adatok, ennek költségeiről, de bizonyára sok pénzbe került. (A csatlakozási pontot vicces felirattal látták el, amiben jelölik, hogy az ürrepülőt „fekete felével lefelé” kell rögzíteni. Tesztautomatizálás közben is hasonló problémákba ütközhetünk. Tesztelni kell egy folyamatot, de a tesztelhetőség miatt komoly infrastruktúrát kell felépíteni, aminek az egyedüli szerepe a tesztelhetőség lehetővé tétele vagy hatékonyságának növelése. Ezeket mi stub-oknak hívjuk. Az átalakított boingeket később arra is használták, hogy az űrrepülőket múzeumokba vagy légiparádékra szállítsák – talán a mi stubjaink is jók lesznek valamire még?