SlideShare a Scribd company logo
1 of 40
Download to read offline
Test	
  Driven	
  Development	
  
              via	
  
         Agile	
  Tes2ng	
  
What	
  is	
  Tes*ng	
  on	
  Agile	
  projects?	
  
Itera&on	
  0	
            Itera&on	
  1	
          Itera&on	
  2	
          Itera&on	
  3	
   ..	
     ..	
     Itera&on	
  n	
  

    Story	
  test	
                                     Showcase	
               Showcase	
                           Showcase	
  
   analysis	
  for	
               IPM	
               Itera2on	
  1,	
         Itera2on	
  2,	
                    Itera2on	
  n-­‐1,	
  
   Itera2on	
  1	
                                         IPM	
                    IPM	
                                IPM	
  

             Test	
                                      Support	
                 Support	
                          Support	
  
                              Itera&on	
  1	
  
   Automa&on	
                                         Itera2on	
  1	
           Itera2on	
  2	
                   Itera2on	
  n-­‐1	
  
                             Story	
  tes&ng	
  
    -­‐	
  strategy,	
  
   framework	
  
    setup,	
  etc.	
  
                               Story	
  test	
         Itera&on	
  2	
          Itera&on	
  3	
                     Itera&on	
  n	
  
                              analysis	
  for	
       Story	
  tes&ng	
        Story	
  tes&ng	
                   Story	
  tes&ng	
  
                              Itera2on	
  2	
  

                                                          Test	
                   Test	
                              Test	
  
                                                       Automa&on	
              Automa&on	
                         Automa&on	
  
                                                         maint.,	
                maint.,	
                           maint.,	
  
                                                        execu&on	
               execu&on	
                          execu&on	
  

                                                        Story	
  test	
          Story	
  test	
                      Story	
  test	
  
                                                       analysis	
  for	
        analysis	
  for	
                    analysis	
  for	
  
                                                       Itera2on	
  3	
          Itera2on	
  4	
                     Itera2on	
  n+1	
  
Story	
  planning	
  
                                        and	
  wri&ng	
  

               Showcase	
                                        IPM	
  




 Automa&on	
  
  (execu&on,	
                                                             QA	
  kickoff	
  
 maintenance)	
  

                                  Agile	
  Tes2ng	
  	
  
                                 in	
  an	
  Itera2on
 Manual	
  +	
  
Exploratory	
                                                                 Story	
  kickoff	
  
  Tes&ng	
  




             BA	
  /	
  QA	
                                   Test	
  Scenario	
  
            Volleyball	
                                          Wri&ng	
  

                                       Implement	
  Test	
  
                                         Automa&on	
  
What	
  makes	
  Agile	
  Teams	
  	
  
        successful?	
  




Test	
  Automa2on	
  
What	
  makes	
  Agile	
  Tes*ng	
  
       unsuccessful?	
  




Test	
  Automa2on	
  
The	
  Test	
  Pyramid	
  
•  “Succeeding	
  with	
  Agile”	
  –	
  Mike	
  Cohn	
  

•  Mar*n	
  Fowler	
  –	
  Test	
  Pyramid	
  
    –  hCp://mar*nfowler.com/bliki/TestPyramid.html	
  
Ideal	
  Test	
  Pyramid	
  
Test	
  Pyramid	
  reality	
  




Development	
  team	
  
Test	
  Pyramid	
                 QA	
  team	
  
                              Test	
  Pyramid	
  
Test	
  Pyramid	
  –	
  An*	
  PaCern	
  
Case	
  Study	
  


                    •  Mul*ple,	
  long	
  
                       running	
  projects	
  

                    •  Legacy	
  
                       applica*ons	
  

                    •  Integrated	
  
Its	
  not	
  what	
  I	
  
said,	
  its	
  what	
  I	
  
        mean!	
  
•  Remove	
  the	
  ambiguity	
  
•  Same	
  visibility	
  for	
  all	
  
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	
  INR	
  5000	
  
When	
  the	
  customer	
  requests	
  INR	
  1000	
  
Then	
  the	
  account	
  is	
  debited	
  by	
  INR	
  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	
  
Test	
  specifica*on	
  styles	
  

Story:	
  Animal	
  Submission	
  
	
  
As	
  a	
  Zoologist	
  
I	
  want	
  to	
  add	
  a	
  new	
  animal	
  to	
  the	
  site	
  
So	
  that	
  I	
  can	
  share	
  my	
  animal	
  knowledge	
  
with	
  the	
  community	
  
Impera*ve	
  Scenario	
  
Given	
  I	
  am	
  on	
  the	
  animal	
  crea*on	
  page	
  
	
  
When	
  I	
  fill	
  in	
  Name	
  with	
  ‘Alligator’	
  
And	
  fill	
  in	
  Genus	
  with	
  ‘Alligator’	
  
And	
  check	
  Lay	
  Eggs	
  
And	
  click	
  the	
  Create	
  buCon	
  
	
  
Then	
  I	
  should	
  see	
  the	
  no*ce	
  ‘Thank	
  you	
  for	
  your	
  animal	
  
submission!’	
  
And	
  the	
  page	
  should	
  include	
  the	
  animal’s	
  name,	
  genus	
  and	
  
lay’s	
  eggs	
  
Reference:	
  
hCp://wa*rmelon.com/2010/12/10/cucumber-­‐impera*ve-­‐or-­‐declara*ve-­‐that-­‐is-­‐the-­‐ques*on/	
  
Declara*ve	
  Scenario	
  

Given	
  I	
  am	
  on	
  the	
  animal	
  crea*on	
  page	
  
	
  
When	
  I	
  add	
  a	
  new	
  animal	
  
	
  
Then	
  I	
  animal	
  should	
  be	
  created	
  successfully	
  




Reference:	
  
hCp://wa*rmelon.com/2010/12/10/cucumber-­‐impera*ve-­‐or-­‐declara*ve-­‐that-­‐is-­‐the-­‐ques*on/	
  
What	
  does	
  this	
  do	
  for	
  me?	
  
How	
  did	
  we	
  accomplish	
  this?	
  
Given	
  auc&oneer	
  creates	
  a	
  sale	
  
And	
  5	
  items	
  are	
  added	
  to	
  the	
  
                                                   Who	
  is	
  doing	
  the	
  
sale	
                                             ac*on?	
  
	
  	
  	
  	
  	
  
When	
  auc&oneer	
  starts	
  the	
               What	
  is	
  the	
  business	
  
sale	
                                             func*onality?	
  
And	
  auc&oneer	
  sets	
  a	
  star*ng	
  
                                                   Ac*ons	
  and	
  
bid	
  of	
  5000	
                                verifica*ons	
  happen	
  
And	
  buyer_1	
  bids	
                           implicitly	
  
And	
  buyer_2	
  bids	
                           Depicts	
  a	
  user	
  flow	
  
	
  
Then	
  auc&oneer	
  Sells	
  the	
  item	
  
And	
  buyer_2	
  wins	
  the	
  item	
  
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

Similar to Test Driven Development via Agile Testing

Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
Michael Palotas
 
How to live with agile - Aware in BugDay Bangkok 2012
How to live with agile - Aware in BugDay Bangkok 2012How to live with agile - Aware in BugDay Bangkok 2012
How to live with agile - Aware in BugDay Bangkok 2012
Prathan Dansakulcharoenkit
 
Qtp8 student handboo
Qtp8 student handbooQtp8 student handboo
Qtp8 student handboo
Jenny Nguyen
 
Testing is Fun @Confoo.ca 2012
Testing is Fun @Confoo.ca  2012Testing is Fun @Confoo.ca  2012
Testing is Fun @Confoo.ca 2012
Gourav Tiwari
 
Qtp92 Presentation
Qtp92 PresentationQtp92 Presentation
Qtp92 Presentation
a34sharm
 
How we Test at eBay Europe
How we Test at eBay EuropeHow we Test at eBay Europe
How we Test at eBay Europe
Michael Palotas
 

Similar to Test Driven Development via Agile Testing (20)

Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar - Behavior Driven Testing (BDT) in AgileAnand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
 
Agile QA Process
Agile QA ProcessAgile QA Process
Agile QA Process
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
How to live with agile - Aware in BugDay Bangkok 2012
How to live with agile - Aware in BugDay Bangkok 2012How to live with agile - Aware in BugDay Bangkok 2012
How to live with agile - Aware in BugDay Bangkok 2012
 
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAUTest Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
 
Qtp8 student handboo
Qtp8 student handbooQtp8 student handboo
Qtp8 student handboo
 
Agile requirements
Agile requirementsAgile requirements
Agile requirements
 
Testing is Fun @Confoo.ca 2012
Testing is Fun @Confoo.ca  2012Testing is Fun @Confoo.ca  2012
Testing is Fun @Confoo.ca 2012
 
ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat and Selenium (LDNSE6)
 
Review of an open source unit test tool- Cucumber_Presentation
Review of an open source unit test tool- Cucumber_PresentationReview of an open source unit test tool- Cucumber_Presentation
Review of an open source unit test tool- Cucumber_Presentation
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2
 
Qtp92 Presentation
Qtp92 PresentationQtp92 Presentation
Qtp92 Presentation
 
Qtp - Introduction to synchronization
Qtp -  Introduction to synchronizationQtp -  Introduction to synchronization
Qtp - Introduction to synchronization
 
Automation Testing Project and Framework Details
Automation Testing Project and Framework DetailsAutomation Testing Project and Framework Details
Automation Testing Project and Framework Details
 
Faster apps. faster time to market. faster mean time to repair
Faster apps. faster time to market. faster mean time to repairFaster apps. faster time to market. faster mean time to repair
Faster apps. faster time to market. faster mean time to repair
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Agile Estimating and Planning Using Scrum
Agile Estimating and Planning Using ScrumAgile Estimating and Planning Using Scrum
Agile Estimating and Planning Using Scrum
 
How we Test at eBay Europe
How we Test at eBay EuropeHow we Test at eBay Europe
How we Test at eBay Europe
 

More from Anand Bagmar

More from Anand Bagmar (20)

Eradicate Flaky Tests
Eradicate Flaky TestsEradicate Flaky Tests
Eradicate Flaky Tests
 
Automating the real-user scenarios across multi-apps, and multi-devices
Automating the real-user scenarios across multi-apps, and multi-devicesAutomating the real-user scenarios across multi-apps, and multi-devices
Automating the real-user scenarios across multi-apps, and multi-devices
 
Visual Validation - The missing tip of the automation pyramid @GoT2022
Visual Validation - The missing tip of the automation pyramid @GoT2022Visual Validation - The missing tip of the automation pyramid @GoT2022
Visual Validation - The missing tip of the automation pyramid @GoT2022
 
Design Patterns in Automation
Design Patterns in AutomationDesign Patterns in Automation
Design Patterns in Automation
 
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Change Tyres In A Moving Car - Make Functional Test Automation Effective KeynoteChange Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
 
Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)
 
Next Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AINext Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AI
 
The Best Test Automation Framework is...
The Best Test Automation Framework is...The Best Test Automation Framework is...
The Best Test Automation Framework is...
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021
 
Getting started with Appium 2.0
Getting started with Appium 2.0Getting started with Appium 2.0
Getting started with Appium 2.0
 
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
 
Selenium Deep Dive
Selenium Deep DiveSelenium Deep Dive
Selenium Deep Dive
 
Does your functional automation really add value?
Does your functional automation really add value?Does your functional automation really add value?
Does your functional automation really add value?
 
Measuring Coverage From E2E Tests
Measuring Coverage From E2E TestsMeasuring Coverage From E2E Tests
Measuring Coverage From E2E Tests
 
Getting started with Visual Testing using Applitools - @TPC, Feb2020
Getting started with Visual Testing using Applitools - @TPC, Feb2020Getting started with Visual Testing using Applitools - @TPC, Feb2020
Getting started with Visual Testing using Applitools - @TPC, Feb2020
 
Visual validation - The missing tip of the automation pyramid @ QA Symposium
Visual validation - The missing tip of the automation pyramid @ QA SymposiumVisual validation - The missing tip of the automation pyramid @ QA Symposium
Visual validation - The missing tip of the automation pyramid @ QA Symposium
 
Collaboration - A Taboo!
Collaboration - A Taboo!Collaboration - A Taboo!
Collaboration - A Taboo!
 
Visual Validation - The Missing Tip of the Automation Pyramid
Visual Validation - The Missing Tip of the Automation PyramidVisual Validation - The Missing Tip of the Automation Pyramid
Visual Validation - The Missing Tip of the Automation Pyramid
 
Measuring Consumer Quality - The Missing Feedback Loop
Measuring Consumer Quality - The Missing Feedback LoopMeasuring Consumer Quality - The Missing Feedback Loop
Measuring Consumer Quality - The Missing Feedback Loop
 
What is Agile Testing? How does Automation help?
What is Agile Testing? How does Automation help?What is Agile Testing? How does Automation help?
What is Agile Testing? How does Automation help?
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 

Test Driven Development via Agile Testing

  • 1. Test  Driven  Development   via   Agile  Tes2ng  
  • 2. What  is  Tes*ng  on  Agile  projects?  
  • 3. Itera&on  0   Itera&on  1   Itera&on  2   Itera&on  3   ..   ..   Itera&on  n   Story  test   Showcase   Showcase   Showcase   analysis  for   IPM   Itera2on  1,   Itera2on  2,   Itera2on  n-­‐1,   Itera2on  1   IPM   IPM   IPM   Test   Support   Support   Support   Itera&on  1   Automa&on   Itera2on  1   Itera2on  2   Itera2on  n-­‐1   Story  tes&ng   -­‐  strategy,   framework   setup,  etc.   Story  test   Itera&on  2   Itera&on  3   Itera&on  n   analysis  for   Story  tes&ng   Story  tes&ng   Story  tes&ng   Itera2on  2   Test   Test   Test   Automa&on   Automa&on   Automa&on   maint.,   maint.,   maint.,   execu&on   execu&on   execu&on   Story  test   Story  test   Story  test   analysis  for   analysis  for   analysis  for   Itera2on  3   Itera2on  4   Itera2on  n+1  
  • 4. Story  planning   and  wri&ng   Showcase   IPM   Automa&on   (execu&on,   QA  kickoff   maintenance)   Agile  Tes2ng     in  an  Itera2on Manual  +   Exploratory   Story  kickoff   Tes&ng   BA  /  QA   Test  Scenario   Volleyball   Wri&ng   Implement  Test   Automa&on  
  • 5. What  makes  Agile  Teams     successful?   Test  Automa2on  
  • 6. What  makes  Agile  Tes*ng   unsuccessful?   Test  Automa2on  
  • 7. The  Test  Pyramid   •  “Succeeding  with  Agile”  –  Mike  Cohn   •  Mar*n  Fowler  –  Test  Pyramid   –  hCp://mar*nfowler.com/bliki/TestPyramid.html  
  • 9.
  • 10. Test  Pyramid  reality   Development  team   Test  Pyramid   QA  team   Test  Pyramid  
  • 11. Test  Pyramid  –  An*  PaCern  
  • 12. Case  Study   •  Mul*ple,  long   running  projects   •  Legacy   applica*ons   •  Integrated  
  • 13.
  • 14.
  • 15. Its  not  what  I   said,  its  what  I   mean!  
  • 16.
  • 17.
  • 18. •  Remove  the  ambiguity   •  Same  visibility  for  all  
  • 19.
  • 20. Evolu*on  of  Test  Frameworks   Behavior   Driven   Development   (BDD)   Op*mized   scripts   Record  &   Playback     Core   Framework  
  • 22. RED   REFACTOR   GREEN  
  • 24. Expected  Func&onality:     The  customer  should  be  able  to  withdraw   money  from  his  account  via  an  ATM  machine  
  • 25. BDD  Example:   Given  the  account  has  balance  of  INR  5000   When  the  customer  requests  INR  1000   Then  the  account  is  debited  by  INR  1000  
  • 26. 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  
  • 27. New  Expected  Func&onality:     The  customer  should  be  able  to  withdraw   money  from  his  account  only  if  his  card  is   valid  
  • 28. 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  
  • 29. Test  specifica*on  styles   Story:  Animal  Submission     As  a  Zoologist   I  want  to  add  a  new  animal  to  the  site   So  that  I  can  share  my  animal  knowledge   with  the  community  
  • 30. Impera*ve  Scenario   Given  I  am  on  the  animal  crea*on  page     When  I  fill  in  Name  with  ‘Alligator’   And  fill  in  Genus  with  ‘Alligator’   And  check  Lay  Eggs   And  click  the  Create  buCon     Then  I  should  see  the  no*ce  ‘Thank  you  for  your  animal   submission!’   And  the  page  should  include  the  animal’s  name,  genus  and   lay’s  eggs   Reference:   hCp://wa*rmelon.com/2010/12/10/cucumber-­‐impera*ve-­‐or-­‐declara*ve-­‐that-­‐is-­‐the-­‐ques*on/  
  • 31. Declara*ve  Scenario   Given  I  am  on  the  animal  crea*on  page     When  I  add  a  new  animal     Then  I  animal  should  be  created  successfully   Reference:   hCp://wa*rmelon.com/2010/12/10/cucumber-­‐impera*ve-­‐or-­‐declara*ve-­‐that-­‐is-­‐the-­‐ques*on/  
  • 32. What  does  this  do  for  me?  
  • 33.
  • 34.
  • 35. How  did  we  accomplish  this?  
  • 36.
  • 37. Given  auc&oneer  creates  a  sale   And  5  items  are  added  to  the   Who  is  doing  the   sale   ac*on?             When  auc&oneer  starts  the   What  is  the  business   sale   func*onality?   And  auc&oneer  sets  a  star*ng   Ac*ons  and   bid  of  5000   verifica*ons  happen   And  buyer_1  bids   implicitly   And  buyer_2  bids   Depicts  a  user  flow     Then  auc&oneer  Sells  the  item   And  buyer_2  wins  the  item  
  • 38. 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  
  • 39. Tools  to  enable  BDD  /  BDT   •  Cucumber   •  JBehave   •  SpecFlow   •  Twist  
  • 40. Anand.Bagmar@thoughtworks.com   abagmar@gmail.com   ThoughtWorks®