SlideShare uma empresa Scribd logo
1 de 14
Behaviour Driven Development Or “how I learned to stop worrying and love the business” Andy Kelk @andykelk   @iproperty_it
All the Ds -> TDD, DDD, BDD Test Driven Development (or Design) Write tests first, then write your code, then refactor When all of your tests pass, you’re done Domain Driven Design A common language between “tech” and “biz” The code structures and product elements align BehaviourDriven Development Eliminates the gap between business expectations and development output Uses business language to test software “Executable specs”
What is BDD? A way of writing tests using natural language that business stakeholders can understand Feature:Search results In order to find some listings As a consumer I want to do a search   Scenario:I do a default search     Given I am on the homepage     When I click "Search"     Then I will see 10 listings
Why natural language? Collaboration The business folk understand what the tech folk are doing and can see what is being developed Self-documenting The tests are the specification; they are updated as the implementation changes; they are known to be correct. Ubiquitous language Is it a “property” or a “listing”,an “agent” or an “agency”?
How does it deliver business value? Encourages “full-slice” development Full  slice UI Display the date “As a user, so that I can decide if a property suits my needs, I want to be able to view the date it was built” Front end database Add a field for the date Replicate the date field Replication layer Back end database Add a field for the date Allow date to be added Data entry system http://www.flickr.com/photos/litlnemo/4159389584/
Involves QA from day 1 – they can be pairing with devs to write the tests Integrates with TDD: Red Green Refactor Integrates with continuous integration; can be used when implementing continuous deployment How does it fit with the development process?
BDD in action: Cucumber features Cucumber is a BDD framework written in Ruby Using Capybara and Selenium, you can test a web page Here’s a simple example feature file: Feature:Search results In order to find some listings As a consumer I want to do a search   Scenario:I do a default search     Given I am on the homepage     When I click "Search"     Then I will see 10 listings
BDD in action: the steps Step definitions convert the feature to executable code: Given/^I am on the homepage$/do   visit('http://www.iproperty.com.sg/') end When/^I click "([^quot;]*)"$/do |button| click_on(button) end Then/^I will see (+)listings$/do |expected_num|   all(".searchlistingtitle").count.should ==expected_num.to_i end Capybara regular expression Capybara regular expression Capybara assertion
BDD in action: running the test Capybara drives Selenium to launch a browser for testing:
BDD in action: results ,[object Object],$ cucumber features Feature: Search results   In order to find some listings   As a consumer   I want to do a search   Scenario: Do a default search # features/search.feature:6 Given I am on the homepage  # features/step_definitions/steps.rb:4 When I click "Search"       # features/step_definitions/steps.rb:8 Then I will see 10 listings # features/step_definitions/steps.rb:12 1 scenario (1 passed) 3 steps (3 passed) 0m35.449s
The language: Given The given clause sets up the initial state for the scenario we are testing.  As such, it may interact with the system But should not perform interactions relevant to the scenario itself Also it should be expressed as a pre-existing condition But should not be expressed like an action Given a registered user 'bob' Source: http://www.jroller.com/perryn/entry/given_when_then_and_how
The language: When The when clause describes the things that the user (or some other actor) does to the system. As such, it should describe what the user does But should not describe things that the system does The and clause can be used as a synonym to avoid repeating when When a user navigates to the Sign In pageAnd the user signs in as 'bob' Source: http://www.jroller.com/perryn/entry/given_when_then_and_how
The language: Then The then clause describes the things that the system is expected to do. (in response to something done in a when clause) As such, it should describe what the system should do But should not describe things that the user does Then the profile page for 'bob' will be displayed Source: http://www.jroller.com/perryn/entry/given_when_then_and_how
Resources http://dannorth.net/introducing-bdd/ http://cukes.info/ - written in Ruby http://jbehave.org/ - written in Java http://www.specflow.org/ - written in .Net http://www.pragprog.com/titles/achbd/the-rspec-book Agile Malaysia Group: http://www.meetup.com/Agile-Malaysia/ Andy Kelk: @andykelk@itproperty_it

Mais conteúdo relacionado

Mais procurados

Double Loop: TDD & BDD Done Right
Double Loop: TDD & BDD Done RightDouble Loop: TDD & BDD Done Right
Double Loop: TDD & BDD Done RightJessica Mauerhan
 
Comments: Why not What
Comments: Why not WhatComments: Why not What
Comments: Why not WhatSean Kelly
 
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Petko Mikhailov
 
Behat - Beyond the Basics (2016 - SunshinePHP)
Behat - Beyond the Basics (2016 - SunshinePHP)Behat - Beyond the Basics (2016 - SunshinePHP)
Behat - Beyond the Basics (2016 - SunshinePHP)Jessica Mauerhan
 
Perl web programming
Perl web programmingPerl web programming
Perl web programmingJohnny Pork
 
Dumb and smart components + redux (1)
Dumb and smart components + redux (1)Dumb and smart components + redux (1)
Dumb and smart components + redux (1)Brecht Billiet
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, DeveloperLinuxmalaysia Malaysia
 
Behavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and javaBehavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and javaNaveen Kumar Singh
 
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyPDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyJohn McCaffrey
 
Agular in a microservices world
Agular in a microservices worldAgular in a microservices world
Agular in a microservices worldBrecht Billiet
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggetsguestbd1cdca
 
Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min. Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min. David Gómez García
 
An Introduction to Behaviour Driven Development with Cucumber Java
An Introduction to Behaviour Driven Development with Cucumber JavaAn Introduction to Behaviour Driven Development with Cucumber Java
An Introduction to Behaviour Driven Development with Cucumber JavaQaiser Mazhar
 
Javascript interview questions and answers
Javascript interview questions and answersJavascript interview questions and answers
Javascript interview questions and answersFeedGoCode
 

Mais procurados (16)

ANT
ANTANT
ANT
 
Ruby, Meet iPhone
Ruby, Meet iPhoneRuby, Meet iPhone
Ruby, Meet iPhone
 
Double Loop: TDD & BDD Done Right
Double Loop: TDD & BDD Done RightDouble Loop: TDD & BDD Done Right
Double Loop: TDD & BDD Done Right
 
Comments: Why not What
Comments: Why not WhatComments: Why not What
Comments: Why not What
 
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
 
Behat - Beyond the Basics (2016 - SunshinePHP)
Behat - Beyond the Basics (2016 - SunshinePHP)Behat - Beyond the Basics (2016 - SunshinePHP)
Behat - Beyond the Basics (2016 - SunshinePHP)
 
Perl web programming
Perl web programmingPerl web programming
Perl web programming
 
Dumb and smart components + redux (1)
Dumb and smart components + redux (1)Dumb and smart components + redux (1)
Dumb and smart components + redux (1)
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
Behavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and javaBehavior driven development - cucumber, Junit and java
Behavior driven development - cucumber, Junit and java
 
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffreyPDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
PDF Generation in Rails with Prawn and Prawn-to: John McCaffrey
 
Agular in a microservices world
Agular in a microservices worldAgular in a microservices world
Agular in a microservices world
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
 
Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min. Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min.
 
An Introduction to Behaviour Driven Development with Cucumber Java
An Introduction to Behaviour Driven Development with Cucumber JavaAn Introduction to Behaviour Driven Development with Cucumber Java
An Introduction to Behaviour Driven Development with Cucumber Java
 
Javascript interview questions and answers
Javascript interview questions and answersJavascript interview questions and answers
Javascript interview questions and answers
 

Destaque

Asia Sentiment Findings - Malaysia
Asia Sentiment Findings - MalaysiaAsia Sentiment Findings - Malaysia
Asia Sentiment Findings - MalaysiaiProperty Malaysia
 
How to Grow Your New Homes Developer Business
How to Grow Your New Homes Developer BusinessHow to Grow Your New Homes Developer Business
How to Grow Your New Homes Developer BusinessProperty Portal Watch
 
PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...
PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...
PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...Property Portal Watch
 
The Challenge of Launching a New Portal in an Emerging and Highly Competitive...
The Challenge of Launching a New Portal in an Emerging and Highly Competitive...The Challenge of Launching a New Portal in an Emerging and Highly Competitive...
The Challenge of Launching a New Portal in an Emerging and Highly Competitive...Property Portal Watch
 
Turning $20m into $500m – the iproperty group story
Turning $20m into $500m – the iproperty group storyTurning $20m into $500m – the iproperty group story
Turning $20m into $500m – the iproperty group storyProperty Portal Watch
 
Global trends in the property portal industry
Global trends in the property portal industry Global trends in the property portal industry
Global trends in the property portal industry Property Portal Watch
 
Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...
Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...
Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...Daniele Gambero
 
Agent Appreciation Gathering in JB (23rd February 2016)
Agent Appreciation Gathering in JB (23rd February 2016)Agent Appreciation Gathering in JB (23rd February 2016)
Agent Appreciation Gathering in JB (23rd February 2016)Jini Rajendran
 
Top Free Real Estate And House Hunting Apps
Top Free Real Estate And House Hunting AppsTop Free Real Estate And House Hunting Apps
Top Free Real Estate And House Hunting AppsRM83
 
Changing Nature of the Online Real Estate Market and Who to Watch and Learn From
Changing Nature of the Online Real Estate Market and Who to Watch and Learn FromChanging Nature of the Online Real Estate Market and Who to Watch and Learn From
Changing Nature of the Online Real Estate Market and Who to Watch and Learn FromProperty Portal Watch
 
MPI Quarterly Newsletter - April 2011
MPI Quarterly Newsletter - April 2011MPI Quarterly Newsletter - April 2011
MPI Quarterly Newsletter - April 2011iProperty Malaysia
 
iProperty.com Malaysia - 2011 Global + Malaysia Internet Trends
iProperty.com Malaysia - 2011 Global + Malaysia Internet TrendsiProperty.com Malaysia - 2011 Global + Malaysia Internet Trends
iProperty.com Malaysia - 2011 Global + Malaysia Internet TrendsiProperty.com For Agents
 
Introduction to Property Management
Introduction to Property ManagementIntroduction to Property Management
Introduction to Property Managementshahrilcang
 
How Online Crowdfunding is going to Change the Real Estate Landscape
How Online Crowdfunding is going to Change the Real Estate LandscapeHow Online Crowdfunding is going to Change the Real Estate Landscape
How Online Crowdfunding is going to Change the Real Estate LandscapeDBSBusinessClass
 

Destaque (16)

Asia Sentiment Findings - Malaysia
Asia Sentiment Findings - MalaysiaAsia Sentiment Findings - Malaysia
Asia Sentiment Findings - Malaysia
 
How to Grow Your New Homes Developer Business
How to Grow Your New Homes Developer BusinessHow to Grow Your New Homes Developer Business
How to Grow Your New Homes Developer Business
 
PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...
PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...
PropertyGuru - Lessons in Building a Leading Property Portal Group in Sth Eas...
 
The Challenge of Launching a New Portal in an Emerging and Highly Competitive...
The Challenge of Launching a New Portal in an Emerging and Highly Competitive...The Challenge of Launching a New Portal in an Emerging and Highly Competitive...
The Challenge of Launching a New Portal in an Emerging and Highly Competitive...
 
Turning $20m into $500m – the iproperty group story
Turning $20m into $500m – the iproperty group storyTurning $20m into $500m – the iproperty group story
Turning $20m into $500m – the iproperty group story
 
Global trends in the property portal industry
Global trends in the property portal industry Global trends in the property portal industry
Global trends in the property portal industry
 
Social media presentation
Social media presentationSocial media presentation
Social media presentation
 
Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...
Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...
Ipoh's PROPENOMICS: The Haven, an iconic project that is reshaping Ipoh's Pro...
 
Agent Appreciation Gathering in JB (23rd February 2016)
Agent Appreciation Gathering in JB (23rd February 2016)Agent Appreciation Gathering in JB (23rd February 2016)
Agent Appreciation Gathering in JB (23rd February 2016)
 
Investor presentation
Investor presentationInvestor presentation
Investor presentation
 
Top Free Real Estate And House Hunting Apps
Top Free Real Estate And House Hunting AppsTop Free Real Estate And House Hunting Apps
Top Free Real Estate And House Hunting Apps
 
Changing Nature of the Online Real Estate Market and Who to Watch and Learn From
Changing Nature of the Online Real Estate Market and Who to Watch and Learn FromChanging Nature of the Online Real Estate Market and Who to Watch and Learn From
Changing Nature of the Online Real Estate Market and Who to Watch and Learn From
 
MPI Quarterly Newsletter - April 2011
MPI Quarterly Newsletter - April 2011MPI Quarterly Newsletter - April 2011
MPI Quarterly Newsletter - April 2011
 
iProperty.com Malaysia - 2011 Global + Malaysia Internet Trends
iProperty.com Malaysia - 2011 Global + Malaysia Internet TrendsiProperty.com Malaysia - 2011 Global + Malaysia Internet Trends
iProperty.com Malaysia - 2011 Global + Malaysia Internet Trends
 
Introduction to Property Management
Introduction to Property ManagementIntroduction to Property Management
Introduction to Property Management
 
How Online Crowdfunding is going to Change the Real Estate Landscape
How Online Crowdfunding is going to Change the Real Estate LandscapeHow Online Crowdfunding is going to Change the Real Estate Landscape
How Online Crowdfunding is going to Change the Real Estate Landscape
 

Semelhante a Behaviour Driven Development

How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)Asier Barrenetxea
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 
Driven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumDriven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumAdam Englander
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersAdam Englander
 
BDD with SpecFlow and Selenium
BDD with SpecFlow and SeleniumBDD with SpecFlow and Selenium
BDD with SpecFlow and SeleniumLiraz Shay
 
Behat - human-readable automated testing
Behat - human-readable automated testingBehat - human-readable automated testing
Behat - human-readable automated testingnyccamp
 
BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32OpenEBS
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesSauce Labs
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructureLindsay Holmwood
 
Top 20 cucumber interview questions for sdet
Top 20 cucumber interview questions for sdetTop 20 cucumber interview questions for sdet
Top 20 cucumber interview questions for sdetDevLabs Alliance
 
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance
 
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsErik Osterman
 
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 Behaviour Driven Development (20)

How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)How to Deliver the Right Software (Specification by example)
How to Deliver the Right Software (Specification by example)
 
Cucumber_Training_ForQA
Cucumber_Training_ForQACucumber_Training_ForQA
Cucumber_Training_ForQA
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
Driven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on ScrumDriven Development - Closing the Loop on Scrum
Driven Development - Closing the Loop on Scrum
 
PHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for BeginnersPHPConf.asia 2016 - BDD with Behat for Beginners
PHPConf.asia 2016 - BDD with Behat for Beginners
 
BDD with SpecFlow and Selenium
BDD with SpecFlow and SeleniumBDD with SpecFlow and Selenium
BDD with SpecFlow and Selenium
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
Behat - human-readable automated testing
Behat - human-readable automated testingBehat - human-readable automated testing
Behat - human-readable automated testing
 
BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32BDD Testing Using Godog - Bangalore Golang Meetup # 32
BDD Testing Using Godog - Bangalore Golang Meetup # 32
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
 
Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
BDD, Behat & Drupal
BDD, Behat & DrupalBDD, Behat & Drupal
BDD, Behat & Drupal
 
Top 20 cucumber interview questions for sdet
Top 20 cucumber interview questions for sdetTop 20 cucumber interview questions for sdet
Top 20 cucumber interview questions for sdet
 
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
 
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
cucumber harpal.pdf
cucumber harpal.pdfcucumber harpal.pdf
cucumber harpal.pdf
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
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

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Behaviour Driven Development

  • 1. Behaviour Driven Development Or “how I learned to stop worrying and love the business” Andy Kelk @andykelk @iproperty_it
  • 2. All the Ds -> TDD, DDD, BDD Test Driven Development (or Design) Write tests first, then write your code, then refactor When all of your tests pass, you’re done Domain Driven Design A common language between “tech” and “biz” The code structures and product elements align BehaviourDriven Development Eliminates the gap between business expectations and development output Uses business language to test software “Executable specs”
  • 3. What is BDD? A way of writing tests using natural language that business stakeholders can understand Feature:Search results In order to find some listings As a consumer I want to do a search   Scenario:I do a default search Given I am on the homepage     When I click "Search"     Then I will see 10 listings
  • 4. Why natural language? Collaboration The business folk understand what the tech folk are doing and can see what is being developed Self-documenting The tests are the specification; they are updated as the implementation changes; they are known to be correct. Ubiquitous language Is it a “property” or a “listing”,an “agent” or an “agency”?
  • 5. How does it deliver business value? Encourages “full-slice” development Full slice UI Display the date “As a user, so that I can decide if a property suits my needs, I want to be able to view the date it was built” Front end database Add a field for the date Replicate the date field Replication layer Back end database Add a field for the date Allow date to be added Data entry system http://www.flickr.com/photos/litlnemo/4159389584/
  • 6. Involves QA from day 1 – they can be pairing with devs to write the tests Integrates with TDD: Red Green Refactor Integrates with continuous integration; can be used when implementing continuous deployment How does it fit with the development process?
  • 7. BDD in action: Cucumber features Cucumber is a BDD framework written in Ruby Using Capybara and Selenium, you can test a web page Here’s a simple example feature file: Feature:Search results In order to find some listings As a consumer I want to do a search   Scenario:I do a default search Given I am on the homepage     When I click "Search"     Then I will see 10 listings
  • 8. BDD in action: the steps Step definitions convert the feature to executable code: Given/^I am on the homepage$/do visit('http://www.iproperty.com.sg/') end When/^I click "([^quot;]*)"$/do |button| click_on(button) end Then/^I will see (+)listings$/do |expected_num| all(".searchlistingtitle").count.should ==expected_num.to_i end Capybara regular expression Capybara regular expression Capybara assertion
  • 9. BDD in action: running the test Capybara drives Selenium to launch a browser for testing:
  • 10.
  • 11. The language: Given The given clause sets up the initial state for the scenario we are testing.  As such, it may interact with the system But should not perform interactions relevant to the scenario itself Also it should be expressed as a pre-existing condition But should not be expressed like an action Given a registered user 'bob' Source: http://www.jroller.com/perryn/entry/given_when_then_and_how
  • 12. The language: When The when clause describes the things that the user (or some other actor) does to the system. As such, it should describe what the user does But should not describe things that the system does The and clause can be used as a synonym to avoid repeating when When a user navigates to the Sign In pageAnd the user signs in as 'bob' Source: http://www.jroller.com/perryn/entry/given_when_then_and_how
  • 13. The language: Then The then clause describes the things that the system is expected to do. (in response to something done in a when clause) As such, it should describe what the system should do But should not describe things that the user does Then the profile page for 'bob' will be displayed Source: http://www.jroller.com/perryn/entry/given_when_then_and_how
  • 14. Resources http://dannorth.net/introducing-bdd/ http://cukes.info/ - written in Ruby http://jbehave.org/ - written in Java http://www.specflow.org/ - written in .Net http://www.pragprog.com/titles/achbd/the-rspec-book Agile Malaysia Group: http://www.meetup.com/Agile-Malaysia/ Andy Kelk: @andykelk@itproperty_it