Anand Bagmar - Behavior Driven Testing (BDT)
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Anand Bagmar - Behavior Driven Testing (BDT)

on

  • 6,930 views

What is Behavior Driven Testing (BDT)? How does it differ from Behavior Driven Development? What tools support this kind of testing? The value proposition BDT offers. - Anand Bagmar

What is Behavior Driven Testing (BDT)? How does it differ from Behavior Driven Development? What tools support this kind of testing? The value proposition BDT offers. - Anand Bagmar

Statistics

Views

Total Views
6,930
Views on SlideShare
6,930
Embed Views
0

Actions

Likes
4
Downloads
90
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Anand Bagmar - Behavior Driven Testing (BDT) Presentation Transcript

  • 1. Behavior Driven Testing (BDT) Anand Bagmar Software Quality Evangelist ThoughtWorks
  • 2. Case Study • Multiple, long running projects • Legacy applications • Integrated
  • 3. Testing Challenges• No Automation - Long regression cycle• Mini-Waterfall• Huge cost of fixing defects
  • 4. • No visibility into what is tested• Outdated tests in QC• Brittle• Little / less value• Maintenance nightmare
  • 5. • Remove the ambiguity• Same visibility for all roles on the team
  • 6. Evolution of Test Frameworks Behavior Driven Development (BDD) Optimized scripts Record & Playback Core Framework
  • 7. Behavior Driven Development (BDD)• Specify the behavior looking at the system from the outside.• Collaborate and come up with a good and clear set of Acceptance Criteria
  • 8. Behavior Driven Development (BDD)• BDD is an extension of TDD – primarily a development practice• Developers translate the Acceptance Criteria into product functionality
  • 9. Expected Functionality:The customer should be able to withdrawmoney from his accountGiven the account has balance of INR 5000When the customer requests INR 1000Then the account is debited by INR 1000
  • 10. Behavior Driven Testing (BDT)• It is an approach to testing• Work towards the big picture
  • 11. Given the account is in creditAnd the dispenser contains cashWhen the customer requests cashThen ensure the account is debitedAnd ensure cash is dispensedAnd ensure the card is returned
  • 12. New Expected Functionality:The customer should be able to withdrawmoney from his account only if his card isvalid
  • 13. Given the account is in creditAnd the card is validAnd the dispenser contains cashWhen the customer requests cashThen ensure the account is debitedAnd ensure cash is dispensedAnd ensure the card is returned
  • 14. Imperative ScenarioReference: http://watirmelon.com/2010/12/10/cucumber-imperative-or-declarative-that-is-the-question/
  • 15. Declarative ScenarioReference: http://watirmelon.com/2010/12/10/cucumber-imperative-or-declarative-that-is-the-question/
  • 16. What does this do for me?• Identify the different user flows / behaviors for the product• Determine how the functionality under test affects / impacts the above user flows• Incrementally build up your user flows
  • 17. What does this do for me?• Provide visibility• Automate the right set of tests• Make your testing efforts more effective
  • 18. How did we accomplish this?
  • 19. Who is doing the action?What is the business functionality?Actions and verifications / assertionshappen implicitlyLong running tests
  • 20. Current stateTestes running on Hudson / Jenkins Since 1st test was automatedFeature files 33Scenarios 65Smoke tests execution time 15 minutesRegression tests execution time 45 minutesTest case repository (manual + Cucumber .feature files withautomated) appropriate taggingProject Management tool Mingle
  • 21. Its not what Isaid, its what I mean!
  • 22. Are you doing BDD or BDT?Pattern Testing TypeThe QA team does Test Automation along with BDTother testing responsibilities.The QA team focuses on defining acceptance BDDcriteria, doing manual / ad-hoc / exploratorytesting, etc. and the development team itselfwill do Functional Test Automation.The QA team focuses on defining acceptance BDD + BDTcriteria, doing manual / ad-hoc / exploratorytesting, etc. and pairs with the developmentteam to do Functional Test Automation.
  • 23. Tools to enable BDD / BDT• Cucumber• JBehave• SpecFlow• Twist
  • 24. Anand.Bagmar@thoughtworks.com abagmar@gmail.com