SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Perl web programming
Perl web programmingPerl web programming
Perl web programming
Johnny Pork
 
* 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
Linuxmalaysia Malaysia
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
guestbd1cdca
 

What's hot (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
 

Viewers also liked

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
Property 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
 
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
RM83
 
MPI Quarterly Newsletter - April 2011
MPI Quarterly Newsletter - April 2011MPI Quarterly Newsletter - April 2011
MPI Quarterly Newsletter - April 2011
iProperty Malaysia
 
Introduction to Property Management
Introduction to Property ManagementIntroduction to Property Management
Introduction to Property Management
shahrilcang
 

Viewers also liked (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
 

Similar to Behaviour Driven Development

Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
Lindsay Holmwood
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
Vikas Sarin
 

Similar to 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
 

Recently uploaded

+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

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
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
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
 
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...
 
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 New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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?
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+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...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

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