SlideShare uma empresa Scribd logo
1 de 13
ATDD, BDD, TDD
Alexander van Trijffel
18-09-2013
The what, why and how
INTRODUCTION
• Behavior Driven Development & Acceptance Test Driven Development
• Building the Right Code
• Test Driven Development
• Building the Code Right
ACCEPTANCE TEST DRIVEN DEVELOPMENT
• What
• Process for defining automated acceptance tests early in the development process
• Why
• Ensure that all project members understand precisely what needs to be done and
implemented
• How
• Tools: Specflow (.NET), Jasmine (JavaScript), Cucumber (Ruby), Fitnesse+FitSharp
BEHAVIOR-DRIVEN DEVELOPMENT
• What
• Framework for defining automated acceptance tests to assert whether the system
does what it is supposed to do (is the expected functionality implemented?)
Given [condition], when [action], then [expectation]
• Why
• Provides guidance on organizing the conversation between developers, testers and
domain experts
SPECFLOW
• Tester, business analyst and developer discuss requirements and write feature with
Given [ ], When [ ], Then [ ] specification
• Developer writes step definitions (glue code) that act on the target system
• Tests are executed similar to unit tests
DEMO SPECFLOW
CASE MOVIE TICKETING SYSTEM
• Stories
• As an employee, I want to add groups of visitors so that ticket prices can be
calculated
• As an employee, I want to calculate total ticket prices for groups so that I can charge
the customer
• Ticket prices
Adult Children
€ 8,-- €5,--
TEST DRIVEN DEVELOPMENT
• What
• Writing automated tests to test whether code works correctly
• Why
• Improves code quality
• Automated regression tests support refactoring
• How
• TDD Cycle:
• a) Write executable, failing test
• b) Write minimum amount of code to make the test pass
• c) Refactor
DEMO SPECFLOW
THANKS

Mais conteúdo relacionado

Mais procurados

The WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecThe WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecBen Mabey
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentguestc8093a6
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefAhmed Shreef
 
Test driven development
Test driven developmentTest driven development
Test driven developmentShalabh Saxena
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven developmenttoteb5
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) CodeOps Technologies LLP
 
Test Driven Development Powered by LEGO
Test Driven Development Powered by LEGOTest Driven Development Powered by LEGO
Test Driven Development Powered by LEGOAgile Montréal
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010guest5639fa9
 
Test driven-development
Test driven-developmentTest driven-development
Test driven-developmentDavid Paluy
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!Kaizenko
 
TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionDionatan default
 
Introduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentIntroduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentSteven Mak
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)nedirtv
 

Mais procurados (20)

The WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecThe WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpec
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
TDD and Getting Paid
TDD and Getting PaidTDD and Getting Paid
TDD and Getting Paid
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed Shreef
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD)
 
Test Driven Development Powered by LEGO
Test Driven Development Powered by LEGOTest Driven Development Powered by LEGO
Test Driven Development Powered by LEGO
 
Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010Test Driven Development (TDD) Preso 360|Flex 2010
Test Driven Development (TDD) Preso 360|Flex 2010
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test driven-development
Test driven-developmentTest driven-development
Test driven-development
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!
 
TDD Flow: The Mantra in Action
TDD Flow: The Mantra in ActionTDD Flow: The Mantra in Action
TDD Flow: The Mantra in Action
 
TDD refresher
TDD refresherTDD refresher
TDD refresher
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Introduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentIntroduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven Development
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 

Destaque

Adopting a Standard: A More Agile Approach
Adopting a Standard: A More Agile ApproachAdopting a Standard: A More Agile Approach
Adopting a Standard: A More Agile ApproachEdwina Lui
 
Adopting Agile - a journey to agility
Adopting Agile - a journey to agilityAdopting Agile - a journey to agility
Adopting Agile - a journey to agilityVineesh U S
 
Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Brian Repko
 
ATDD And BDD The Great Beat Down…or…Debate
ATDD And BDD The Great Beat Down…or…DebateATDD And BDD The Great Beat Down…or…Debate
ATDD And BDD The Great Beat Down…or…DebateTEST Huddle
 
Agile Transition of a big medical software product development
Agile Transition of a big medical software product developmentAgile Transition of a big medical software product development
Agile Transition of a big medical software product developmentAndrea Heck
 

Destaque (6)

Adopting a Standard: A More Agile Approach
Adopting a Standard: A More Agile ApproachAdopting a Standard: A More Agile Approach
Adopting a Standard: A More Agile Approach
 
Adopting Agile - a journey to agility
Adopting Agile - a journey to agilityAdopting Agile - a journey to agility
Adopting Agile - a journey to agility
 
Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Agile Days Twin Cities 2011
Agile Days Twin Cities 2011
 
CFEngine 3
CFEngine 3CFEngine 3
CFEngine 3
 
ATDD And BDD The Great Beat Down…or…Debate
ATDD And BDD The Great Beat Down…or…DebateATDD And BDD The Great Beat Down…or…Debate
ATDD And BDD The Great Beat Down…or…Debate
 
Agile Transition of a big medical software product development
Agile Transition of a big medical software product developmentAgile Transition of a big medical software product development
Agile Transition of a big medical software product development
 

Semelhante a (A)TDD The what, why and how

Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
Test Early, Test Often, Test Left
Test Early, Test Often, Test LeftTest Early, Test Often, Test Left
Test Early, Test Often, Test LeftSmartBear
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
Software processes, procedures and life cycles
Software processes, procedures and life cyclesSoftware processes, procedures and life cycles
Software processes, procedures and life cyclesMutaz Ghuni
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkSteve Zhang
 
DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...
DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...
DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...DevSecCon
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...
Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...
Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...Stacey Whitney
 
Dev ops != Dev+Ops
Dev ops != Dev+OpsDev ops != Dev+Ops
Dev ops != Dev+OpsShalu Ahuja
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as CodeRobert Greiner
 
Roadmap to Enterprise Quality
Roadmap to Enterprise QualityRoadmap to Enterprise Quality
Roadmap to Enterprise QualityJeff Bramwell
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation ProjectsAmazon Web Services
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum
 
QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER Piyush Prakash
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
 
Definition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinementDefinition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinementChristian Vos
 
How to run an Enterprise PHP Shop
How to run an Enterprise PHP ShopHow to run an Enterprise PHP Shop
How to run an Enterprise PHP ShopJim Plush
 

Semelhante a (A)TDD The what, why and how (20)

Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
Test Early, Test Often, Test Left
Test Early, Test Often, Test LeftTest Early, Test Often, Test Left
Test Early, Test Often, Test Left
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Software processes, procedures and life cycles
Software processes, procedures and life cyclesSoftware processes, procedures and life cycles
Software processes, procedures and life cycles
 
DevOps intro
DevOps introDevOps intro
DevOps intro
 
Acceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot FrameworkAcceptance Test Driven Development and Robot Framework
Acceptance Test Driven Development and Robot Framework
 
DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...
DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...
DevSecCon Asia 2017 - Abhay Bhargav: Building an Application Vulnerability To...
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...
Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...
Mage Titans USA 2016 - Mathew Beane - Edit Fully Stacked: Less OOPS, More OPS...
 
Dev ops != Dev+Ops
Dev ops != Dev+OpsDev ops != Dev+Ops
Dev ops != Dev+Ops
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Roadmap to Enterprise Quality
Roadmap to Enterprise QualityRoadmap to Enterprise Quality
Roadmap to Enterprise Quality
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER QUALITY ASSURANCE and VALIDATION ENGINEER
QUALITY ASSURANCE and VALIDATION ENGINEER
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Definition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinementDefinition of Done and Product Backlog refinement
Definition of Done and Product Backlog refinement
 
Kku2011
Kku2011Kku2011
Kku2011
 
How to run an Enterprise PHP Shop
How to run an Enterprise PHP ShopHow to run an Enterprise PHP Shop
How to run an Enterprise PHP Shop
 

Último

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
+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...
 

(A)TDD The what, why and how

  • 1. ATDD, BDD, TDD Alexander van Trijffel 18-09-2013 The what, why and how
  • 2. INTRODUCTION • Behavior Driven Development & Acceptance Test Driven Development • Building the Right Code • Test Driven Development • Building the Code Right
  • 3. ACCEPTANCE TEST DRIVEN DEVELOPMENT • What • Process for defining automated acceptance tests early in the development process • Why • Ensure that all project members understand precisely what needs to be done and implemented • How • Tools: Specflow (.NET), Jasmine (JavaScript), Cucumber (Ruby), Fitnesse+FitSharp
  • 4.
  • 5. BEHAVIOR-DRIVEN DEVELOPMENT • What • Framework for defining automated acceptance tests to assert whether the system does what it is supposed to do (is the expected functionality implemented?) Given [condition], when [action], then [expectation] • Why • Provides guidance on organizing the conversation between developers, testers and domain experts
  • 6.
  • 7. SPECFLOW • Tester, business analyst and developer discuss requirements and write feature with Given [ ], When [ ], Then [ ] specification • Developer writes step definitions (glue code) that act on the target system • Tests are executed similar to unit tests
  • 9. CASE MOVIE TICKETING SYSTEM • Stories • As an employee, I want to add groups of visitors so that ticket prices can be calculated • As an employee, I want to calculate total ticket prices for groups so that I can charge the customer • Ticket prices Adult Children € 8,-- €5,--
  • 10. TEST DRIVEN DEVELOPMENT • What • Writing automated tests to test whether code works correctly • Why • Improves code quality • Automated regression tests support refactoring • How • TDD Cycle: • a) Write executable, failing test • b) Write minimum amount of code to make the test pass • c) Refactor
  • 12.

Notas do Editor

  1.  ATDD is a practice that emphasizes the importance of open communication and feedback within the teamIt focuses on progressively driving value out of the system, demonstrating how that value is delivered via automated acceptance criteria
  2. Given I have entered the following personsAnd the adult price is <AdultPrice> and the price for children is <ChildrenPrice>When I press calculateThen the total tick price should be <TotalPrice>
  3. Begun in 1999, introduced with XPWie heeft er weleens een unit test geschreven?Wie schrijft regelmatig unit testen in zijn huidige projectWie practiseert TDD (unit test voor implementatie schrijven)?Je bent een deskundige ontwikkelaar, je maakt weinig fouten en de klant is tevreden. Waarom zou je dan extra moeite nemen om extra code voor unit testen te gaan schrijven?Leidt tot beter design (dependencyinjection, single responsibility SOLID (wanneer je objecten eenvoudig te unit testen zijn zonder veel afhankelijkheden te moeten mocken/declareren) is je testdoelobject mooi geisoleerd denk aan Program klasse unit tests vergeleken met modelagent unit tests. Toon Program klasse en ProgramAgent klasse en laat zien dat er geen unit tests nodig zijn voor ProgramAgent)80% van de kosten gaan in onderhoud zitten. Met unit testen is de code beter aanpasbaar, voor jou maar helemaal voor toekomstige ontwikkelaars.Kwaliteit neemt toe, ook de edge cases kun je makkelijk testenRegressietestenondersteuning voor refactoringbest practiceswanneerereen defect wordtgevonden door een tester of gebruiker, schrijfdaneen unit test om het scenario tereproducerenfailing test, succeeding test, refactoralleenpubliekemethodentesten, consider moving the method to a separate classpitfalls* mock alleenklassen met eenafhankelijkheidnaareenexterne resource zoals repositories, file loaders, service agents. Nietklasses met logicazoals Calculators
  4. var result = 10/Math.Floor(0.5);mighty moosefluent assertionsmoq / nsubstitute /rhinomock / microsoft fakes ultimate question of life