SlideShare a Scribd company logo
Behavior	
  Driven	
  Tes.ng	
  (BDT)	
  	
  
                in	
  	
  
               Agile	
  
What	
  is	
  Tes*ng	
  on	
  Agile	
  projects?	
  
Story	
  
                                      planning	
  and	
  
                                         wri/ng	
  
             Showcase	
                                        IPM	
  



 Automa/on	
  
  (execu/on,	
                                                           QA	
  kickoff	
  
 maintenance)	
  
                                 Agile	
  Tes.ng	
  	
  
                                in	
  an	
  Itera.on
 Manual	
  +	
  
Exploratory	
                                                              Story	
  kickoff	
  
  Tes/ng	
  



            BA	
  /	
  QA	
                                 Test	
  Scenario	
  
           Volleyball	
                                        Wri/ng	
  
                                       Implement	
  
                                          Test	
  
                                       Automa/on	
  
A	
  prac*ce	
  that	
  makes	
  Agile	
  Teams	
  	
  
                 successful?	
  




      Test	
  Automa.on	
  
A	
  prac*ce	
  that	
  makes	
  Agile	
  Teams	
  
              unsuccessful?	
  




     Test	
  Automa.on	
  
The	
  Test	
  Pyramid	
  
•  “Succeeding	
  with	
  Agile”	
  –	
  Mike	
  Cohn	
  

•  Mar*n	
  Fowler	
  –	
  Test	
  Pyramid	
  
    –  hCp://mar*nfowler.com/bliki/TestPyramid.html	
  
Ideal	
  Test	
  Pyramid	
  
                     Func/onal	
  Tests	
  (GUI)	
  
                     •  Developers	
  &	
  /	
  QA	
  team	
  

                     API	
  Tests	
  
                     •  Developers	
  &	
  /	
  QA	
  team	
  

                     Integra/on	
  tests	
  
                     •  Developers	
  

                     Component	
  tests	
  
                     •  Developers	
  

                     Unit	
  Tests	
  
                     •  Developers	
  

Cost	
  /	
  Effort	
                                              Time	
  
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Test	
  Pyramid	
  reality	
  




Development	
  team	
  
Test	
  Pyramid	
                 QA	
  team	
  
                              Test	
  Pyramid	
  
Test	
  Pyramid	
  –	
  An*	
  PaCern	
  
Evolu*on	
  of	
  Test	
  Frameworks	
  
                Behavior	
  
                 Driven	
  
              Development	
  
                 (BDD)	
  

               Op/mized	
  
                scripts	
  

                Record	
  &	
  
                Playback	
  	
  



                  Core	
  
               Framework	
  
Behavior	
  Driven	
  Development	
  	
  
               (BDD)	
  
RED	
  




REFACTOR	
               GREEN	
  
Behavior	
  Driven	
  Tes*ng	
  
          (BDT)	
  
Expected	
  Func/onality:	
  
	
  
The	
  customer	
  should	
  be	
  able	
  to	
  withdraw	
  
money	
  from	
  his	
  account	
  via	
  an	
  ATM	
  machine	
  
BDD	
  Example:	
  

Given	
  the	
  account	
  has	
  balance	
  of	
  5000	
  
When	
  the	
  customer	
  requests	
  1000	
  
Then	
  the	
  account	
  is	
  debited	
  by	
  1000	
  
BDT	
  Example:	
  
Given	
  the	
  account	
  is	
  in	
  credit	
  
And	
  the	
  dispenser	
  contains	
  cash	
  
	
  
When	
  the	
  customer	
  requests	
  cash	
  
	
  
Then	
  ensure	
  the	
  account	
  is	
  debited	
  
And	
  ensure	
  cash	
  is	
  dispensed	
  
And	
  ensure	
  the	
  card	
  is	
  returned	
  
New	
  Expected	
  Func/onality:	
  
	
  
The	
  customer	
  should	
  be	
  able	
  to	
  withdraw	
  
money	
  from	
  his	
  account	
  only	
  if	
  his	
  card	
  is	
  
valid	
  
BDT	
  Example	
  -­‐	
  updated:	
  
Given	
  the	
  account	
  is	
  in	
  credit	
  
And	
  the	
  card	
  is	
  valid	
  
And	
  the	
  dispenser	
  contains	
  cash	
  
	
  
When	
  the	
  customer	
  requests	
  cash	
  
	
  
Then	
  ensure	
  the	
  account	
  is	
  debited	
  
And	
  ensure	
  cash	
  is	
  dispensed	
  
And	
  ensure	
  the	
  card	
  is	
  returned	
  
Case	
  Study	
  
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Requirements	
  

•  Guest	
  User	
  is	
  able	
  to	
  search	
  for	
  a	
  flight	
  for	
  a	
  
   single	
  traveller	
  

•  Ability	
  to	
  specify	
  contact	
  informa*on	
  for	
  
   person	
  booking	
  the	
  flight	
  
Search	
        Contact	
  
Search	
  	
  
                 Results	
     Informa/on	
  
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Contact	
  Details	
  
Test	
  specifica*on	
  styles	
  

•  Impera*ve	
  
	
  
•  Declara*ve	
  
Impera*ve	
  style	
  
Given	
  I	
  am	
  a	
  guest	
  user	
  on	
  the	
  Indigo	
  home	
  page	
  
And	
  I	
  select	
  “round”	
  trip	
  op*on	
  
And	
  I	
  select	
  “Pune”	
  from	
  the	
  origin	
  dropdown	
  
And	
  I	
  select	
  “Bangalore”	
  from	
  the	
  des*na*on	
  drop	
  down	
  
And	
  I	
  select	
  departure	
  date	
  as	
  “5	
  July	
  2012”	
  
And	
  I	
  select	
  returning	
  date	
  as	
  “25	
  July	
  2012”	
  
	
  
When	
  I	
  click	
  on	
  Search	
  
	
  
Then	
  I	
  should	
  see	
  the	
  search	
  results	
  page	
  	
  
And	
  I	
  should	
  see	
  at	
  least	
  1	
  op*on	
  for	
  my	
  criteria	
  
	
  
...	
  
…	
  
When	
  I	
  select	
  the	
  “first”	
  op*on	
  
Then	
  I	
  am	
  on	
  the	
  Contact	
  Informa*on	
  page	
  
	
  
When	
  I	
  enter	
  first	
  name	
  as	
  “foo”	
  
And	
  I	
  enter	
  last	
  name	
  as	
  “bar”	
  
…	
  
…	
  
And	
  I	
  click	
  the	
  “Select	
  and	
  Con/nue”	
  buCon	
  
	
  
Then	
  I	
  should	
  be	
  on	
  the	
  next	
  page	
  
	
  
Declara*ve	
  style	
  
Given	
  I	
  am	
  a	
  guest	
  user	
  
	
  
When	
  I	
  search	
  for	
  flight	
  op*ons	
  for	
  a	
  “one-­‐way”	
  trip	
  
for	
  “1”	
  “Adult”	
  from	
  “Delhi”	
  to	
  “Bangalore”	
  
And	
  I	
  select	
  the	
  “first”	
  flight	
  
And	
  I	
  enter	
  “valid”	
  contact	
  details	
  for	
  “traveller1”	
  
	
  
Then	
  I	
  am	
  able	
  to	
  Save	
  and	
  Con*nue	
  
Func/onal	
  Tests	
  (GUI)	
  
•  Developers	
  &	
  /	
  QA	
  team	
  

API	
  Tests	
  
•  Developers	
  &	
  /	
  QA	
  team	
  

Integra/on	
  tests	
  
•  Developers	
  

Component	
  tests	
  
•  Developers	
  

Unit	
  Tests	
  
•  Developers	
  
What	
  does	
  BDT	
  do	
  for	
  me?	
  
What	
  BDT	
  does	
  NOT	
  do	
  for	
  me?	
  
•  Replace	
  tes*ng	
  granular	
  func*onality	
  	
  
   –  ONLY	
  when	
  it	
  has	
  just	
  been	
  developed	
  
Steps	
  to	
  follow	
  to	
  implement	
  BDT	
  
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Current	
  state	
  
Tests	
  running	
  on	
  Hudson	
  /	
  Jenkins	
     Since	
  1st	
  test	
  was	
  automated	
  


Feature	
  files	
                                      33	
  
Scenarios	
                                            65	
  
Smoke	
  tests	
  execu*on	
  *me	
                    15	
  minutes	
  
Regression	
  tests	
  execu*on	
  *me	
               45	
  minutes	
  


Test	
  case	
  repository	
  (manual	
  +	
           Cucumber	
  .feature	
  files	
  with	
  
automated)	
                                           appropriate	
  tagging	
  
Project	
  Management	
  tool	
                        Mingle	
  
Tools	
  to	
  enable	
  BDD	
  /	
  BDT	
  
•    Cucumber	
  
•    JBehave	
  
•    SpecFlow	
  
•    Twist	
  
Anand.Bagmar@thoughtworks.com	
  

      abagmar@gmail.com	
  
            ThoughtWorks®	
  

More Related Content

PDF
Hardware Accelerated 2D Rendering for Android
PDF
Integration testing with spring @snow one
PDF
Introduction to Java Programming Language
PPTX
Unit Testing Android Applications
PDF
The Art of Unit Testing - Towards a Testable Design
PPTX
The tests are trying to tell you something@VoxxedBucharest.pptx
PPTX
IoT診断入門
PDF
Sync async-blocking-nonblocking-io
Hardware Accelerated 2D Rendering for Android
Integration testing with spring @snow one
Introduction to Java Programming Language
Unit Testing Android Applications
The Art of Unit Testing - Towards a Testable Design
The tests are trying to tell you something@VoxxedBucharest.pptx
IoT診断入門
Sync async-blocking-nonblocking-io

What's hot (20)

PPTX
[C++ Korea] C++ 메모리 모델과 atomic 타입 연산들
PDF
Fun with Lambdas: C++14 Style (part 1)
PPTX
Important features of java
PDF
徹底解説 Unity Reflect【概要編 ver2.0】
PDF
Don't Be Mocked by your Mocks - Best Practices using Mocks
PDF
Unityで覚えるC#
PPTX
Exceptions in Java
PPTX
Blueprint Tips 30選
PDF
【Unite Tokyo 2018】さては非同期だなオメー!async/await完全に理解しよう
PDF
Clean code
PDF
Robot framework 을 이용한 기능 테스트 자동화
PPTX
UnityでUI開発を高速化した件
PDF
Kotest を使って 快適にテストを書こう - KotlinFest 2024
PPTX
REST API testing with SpecFlow
PDF
Intel AVX-512/富岳SVE用SIMDコード生成ライブラリsimdgen
PPTX
Overlapped IO와 IOCP 조사 발표
PPTX
Selenium Tutorial Java
PDF
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
PDF
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
PDF
Flutter 踩雷心得
[C++ Korea] C++ 메모리 모델과 atomic 타입 연산들
Fun with Lambdas: C++14 Style (part 1)
Important features of java
徹底解説 Unity Reflect【概要編 ver2.0】
Don't Be Mocked by your Mocks - Best Practices using Mocks
Unityで覚えるC#
Exceptions in Java
Blueprint Tips 30選
【Unite Tokyo 2018】さては非同期だなオメー!async/await完全に理解しよう
Clean code
Robot framework 을 이용한 기능 테스트 자동화
UnityでUI開発を高速化した件
Kotest を使って 快適にテストを書こう - KotlinFest 2024
REST API testing with SpecFlow
Intel AVX-512/富岳SVE用SIMDコード生成ライブラリsimdgen
Overlapped IO와 IOCP 조사 발표
Selenium Tutorial Java
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
김민욱, (달빛조각사) 엘릭서를 이용한 mmorpg 서버 개발, NDC2019
Flutter 踩雷心得
Ad

Viewers also liked (20)

PDF
Inverting The Testing Pyramid
PDF
Agile Testing Framework - The Art of Automated Testing
PPTX
Test pyramid agile pune conference
PPT
Automation testing strategy, approach & planning
PPT
Test Automation Strategies For Agile
PPT
Test Automation Framework Designs
PDF
Deliver anything, anywhere, anytime
PDF
Test pyramid
PDF
Advanced Topics in Agile Tsting: Focus on Automation
PDF
Test Driven Development via Agile Testing
PDF
Behavior Driven Testing - A paradigm shift
PDF
Inverting Test Pyramid - A First Hand Experience Report
PPTX
Testare Automata Laborator
PPTX
Testare Automata
PPTX
Implementing BDD at scale for agile and DevOps teams
PPT
James Tomaney - Automated Testing for the ATM Channel
KEY
Bahaviour Driven Development
PPT
Software testing
PPTX
Introduction to Behaviour Driven Development
PPTX
Build And Test Automation - Shortening the Feedback Loop
Inverting The Testing Pyramid
Agile Testing Framework - The Art of Automated Testing
Test pyramid agile pune conference
Automation testing strategy, approach & planning
Test Automation Strategies For Agile
Test Automation Framework Designs
Deliver anything, anywhere, anytime
Test pyramid
Advanced Topics in Agile Tsting: Focus on Automation
Test Driven Development via Agile Testing
Behavior Driven Testing - A paradigm shift
Inverting Test Pyramid - A First Hand Experience Report
Testare Automata Laborator
Testare Automata
Implementing BDD at scale for agile and DevOps teams
James Tomaney - Automated Testing for the ATM Channel
Bahaviour Driven Development
Software testing
Introduction to Behaviour Driven Development
Build And Test Automation - Shortening the Feedback Loop
Ad

Similar to Anand Bagmar - Behavior Driven Testing (BDT) in Agile (20)

PDF
Build the Right Regression Suite with Behavior-Driven Testing
PDF
Building the "right" regression suite using Behavior Driven Testing (BDT)
PDF
Agile testing principles and practices - Anil Karade
PDF
Build the "right" regression suite using Behavior Driven Testing (BDT)
PDF
​Build the ‘Right’ Regression Suite using Behavior Driven Testing (BDT)
PDF
Flexing your Agile Muscle - Agile Technical Concepts Explained
PDF
Agile Base Camp - Agile metrics
PPT
Behavior Driven Development by Example
PDF
Getting your mobile test automation process in place - using Cucumber and Cal...
PDF
Agile Software Development in Practice - A Developer Perspective
PPTX
Agile Testing: The Role Of The Agile Tester
PPTX
Agile Testing by Example
PPTX
Slow Down to Speed Up - Leveraging Quality to Enable Productivity and Speed w...
PDF
A/B Testing Framework Design
PDF
Iakiv Kramarenko: “Quality Driven Development”
PDF
Being Agile with Any Process Template in TFS 2012
PPTX
Agile Testing and Test Automation
PPTX
Cucumber_Training_ForQA
PPTX
Life Has Not Been That Rosy With Agile : Rahul Sudame
PDF
Engaging IV&V Testing Services for Agile Projects
Build the Right Regression Suite with Behavior-Driven Testing
Building the "right" regression suite using Behavior Driven Testing (BDT)
Agile testing principles and practices - Anil Karade
Build the "right" regression suite using Behavior Driven Testing (BDT)
​Build the ‘Right’ Regression Suite using Behavior Driven Testing (BDT)
Flexing your Agile Muscle - Agile Technical Concepts Explained
Agile Base Camp - Agile metrics
Behavior Driven Development by Example
Getting your mobile test automation process in place - using Cucumber and Cal...
Agile Software Development in Practice - A Developer Perspective
Agile Testing: The Role Of The Agile Tester
Agile Testing by Example
Slow Down to Speed Up - Leveraging Quality to Enable Productivity and Speed w...
A/B Testing Framework Design
Iakiv Kramarenko: “Quality Driven Development”
Being Agile with Any Process Template in TFS 2012
Agile Testing and Test Automation
Cucumber_Training_ForQA
Life Has Not Been That Rosy With Agile : Rahul Sudame
Engaging IV&V Testing Services for Agile Projects

More from Anand Bagmar (20)

PDF
The Path to Autonomous Testing - Anand Bagmar
PDF
My Journey With Appium @AppiumConf Sept 2024
PDF
Streamlining End-to-End Testing Automation
PDF
Eradicate Flaky Tests
PDF
Automating the real-user scenarios across multi-apps, and multi-devices
PDF
Visual Validation - The missing tip of the automation pyramid @GoT2022
PDF
Design Patterns in Automation
PDF
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
PDF
Rewrite vs Refactor (AgileIndia 2021)
PDF
Next Generation Functional & Visual Testing powered by AI
PDF
The Best Test Automation Framework is...
PDF
Eradicate Flaky Tests - AppiumConf 2021
PDF
Getting started with Appium 2.0
PDF
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
PDF
Selenium Deep Dive
PDF
Does your functional automation really add value?
PDF
Measuring Coverage From E2E Tests
PDF
Getting started with Visual Testing using Applitools - @TPC, Feb2020
PDF
Visual validation - The missing tip of the automation pyramid @ QA Symposium
PDF
Collaboration - A Taboo!
The Path to Autonomous Testing - Anand Bagmar
My Journey With Appium @AppiumConf Sept 2024
Streamlining End-to-End Testing Automation
Eradicate Flaky Tests
Automating the real-user scenarios across multi-apps, and multi-devices
Visual Validation - The missing tip of the automation pyramid @GoT2022
Design Patterns in Automation
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Rewrite vs Refactor (AgileIndia 2021)
Next Generation Functional & Visual Testing powered by AI
The Best Test Automation Framework is...
Eradicate Flaky Tests - AppiumConf 2021
Getting started with Appium 2.0
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Selenium Deep Dive
Does your functional automation really add value?
Measuring Coverage From E2E Tests
Getting started with Visual Testing using Applitools - @TPC, Feb2020
Visual validation - The missing tip of the automation pyramid @ QA Symposium
Collaboration - A Taboo!

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Chapter 3 Spatial Domain Image Processing.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
20250228 LYD VKU AI Blended-Learning.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
The Rise and Fall of 3GPP – Time for a Sabbatical?

Anand Bagmar - Behavior Driven Testing (BDT) in Agile

  • 1. Behavior  Driven  Tes.ng  (BDT)     in     Agile  
  • 2. What  is  Tes*ng  on  Agile  projects?  
  • 3. Story   planning  and   wri/ng   Showcase   IPM   Automa/on   (execu/on,   QA  kickoff   maintenance)   Agile  Tes.ng     in  an  Itera.on Manual  +   Exploratory   Story  kickoff   Tes/ng   BA  /  QA   Test  Scenario   Volleyball   Wri/ng   Implement   Test   Automa/on  
  • 4. A  prac*ce  that  makes  Agile  Teams     successful?   Test  Automa.on  
  • 5. A  prac*ce  that  makes  Agile  Teams   unsuccessful?   Test  Automa.on  
  • 6. The  Test  Pyramid   •  “Succeeding  with  Agile”  –  Mike  Cohn   •  Mar*n  Fowler  –  Test  Pyramid   –  hCp://mar*nfowler.com/bliki/TestPyramid.html  
  • 7. Ideal  Test  Pyramid   Func/onal  Tests  (GUI)   •  Developers  &  /  QA  team   API  Tests   •  Developers  &  /  QA  team   Integra/on  tests   •  Developers   Component  tests   •  Developers   Unit  Tests   •  Developers   Cost  /  Effort   Time  
  • 9. Test  Pyramid  reality   Development  team   Test  Pyramid   QA  team   Test  Pyramid  
  • 10. Test  Pyramid  –  An*  PaCern  
  • 11. Evolu*on  of  Test  Frameworks   Behavior   Driven   Development   (BDD)   Op/mized   scripts   Record  &   Playback     Core   Framework  
  • 13. RED   REFACTOR   GREEN  
  • 15. Expected  Func/onality:     The  customer  should  be  able  to  withdraw   money  from  his  account  via  an  ATM  machine  
  • 16. BDD  Example:   Given  the  account  has  balance  of  5000   When  the  customer  requests  1000   Then  the  account  is  debited  by  1000  
  • 17. BDT  Example:   Given  the  account  is  in  credit   And  the  dispenser  contains  cash     When  the  customer  requests  cash     Then  ensure  the  account  is  debited   And  ensure  cash  is  dispensed   And  ensure  the  card  is  returned  
  • 18. New  Expected  Func/onality:     The  customer  should  be  able  to  withdraw   money  from  his  account  only  if  his  card  is   valid  
  • 19. BDT  Example  -­‐  updated:   Given  the  account  is  in  credit   And  the  card  is  valid   And  the  dispenser  contains  cash     When  the  customer  requests  cash     Then  ensure  the  account  is  debited   And  ensure  cash  is  dispensed   And  ensure  the  card  is  returned  
  • 22. Requirements   •  Guest  User  is  able  to  search  for  a  flight  for  a   single  traveller   •  Ability  to  specify  contact  informa*on  for   person  booking  the  flight  
  • 23. Search   Contact   Search     Results   Informa/on  
  • 27. Test  specifica*on  styles   •  Impera*ve     •  Declara*ve  
  • 28. Impera*ve  style   Given  I  am  a  guest  user  on  the  Indigo  home  page   And  I  select  “round”  trip  op*on   And  I  select  “Pune”  from  the  origin  dropdown   And  I  select  “Bangalore”  from  the  des*na*on  drop  down   And  I  select  departure  date  as  “5  July  2012”   And  I  select  returning  date  as  “25  July  2012”     When  I  click  on  Search     Then  I  should  see  the  search  results  page     And  I  should  see  at  least  1  op*on  for  my  criteria     ...  
  • 29. …   When  I  select  the  “first”  op*on   Then  I  am  on  the  Contact  Informa*on  page     When  I  enter  first  name  as  “foo”   And  I  enter  last  name  as  “bar”   …   …   And  I  click  the  “Select  and  Con/nue”  buCon     Then  I  should  be  on  the  next  page    
  • 30. Declara*ve  style   Given  I  am  a  guest  user     When  I  search  for  flight  op*ons  for  a  “one-­‐way”  trip   for  “1”  “Adult”  from  “Delhi”  to  “Bangalore”   And  I  select  the  “first”  flight   And  I  enter  “valid”  contact  details  for  “traveller1”     Then  I  am  able  to  Save  and  Con*nue  
  • 31. Func/onal  Tests  (GUI)   •  Developers  &  /  QA  team   API  Tests   •  Developers  &  /  QA  team   Integra/on  tests   •  Developers   Component  tests   •  Developers   Unit  Tests   •  Developers  
  • 32. What  does  BDT  do  for  me?  
  • 33. What  BDT  does  NOT  do  for  me?   •  Replace  tes*ng  granular  func*onality     –  ONLY  when  it  has  just  been  developed  
  • 34. Steps  to  follow  to  implement  BDT  
  • 39. Current  state   Tests  running  on  Hudson  /  Jenkins   Since  1st  test  was  automated   Feature  files   33   Scenarios   65   Smoke  tests  execu*on  *me   15  minutes   Regression  tests  execu*on  *me   45  minutes   Test  case  repository  (manual  +   Cucumber  .feature  files  with   automated)   appropriate  tagging   Project  Management  tool   Mingle  
  • 40. Tools  to  enable  BDD  /  BDT   •  Cucumber   •  JBehave   •  SpecFlow   •  Twist  
  • 41. Anand.Bagmar@thoughtworks.com   abagmar@gmail.com   ThoughtWorks®