SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Website	
  acceptance	
  
testing	
  –	
  a	
  case	
  study	
  
Eemeli	
  Kantola	
  
10.11.2012	
  
›  Eemeli	
  Kantola	
  
                  ›  Web	
  dev,	
  consulting,	
  
About	
  me	
        lean/agile	
  enthusiasm	
  
                  ›  Customer	
  projects	
  in	
  
                     Futurice	
  
I	
  like	
  to	
  create	
  awesome	
  web	
  apps	
  for	
  
                     (human)	
  end	
  users	
  
ATDD	
  
ATDD:	
  “The	
  practice	
  of	
  expressing	
  
   functional	
  story	
  requirements	
  as	
  
concrete	
  examples	
  or	
  expectations	
  prior	
  
        to	
  story	
  development”	
  
 –	
  Jennitta	
  Andrea,	
  http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectId=16315	
  	
  	
  
›  Crystallize	
  acceptance	
  
                                                                                 criteria:	
  shared	
  
                                                                                 understanding	
  of	
  reqs	
  
                                                                                 and	
  def.	
  of	
  done	
  [1]	
  
                                      Goals	
                                 ›  Win	
  bug	
  battle	
  with	
  
                                                                                 complicated	
  systems	
  
                                                                                 [2]:	
  early	
  regression	
  
                                                                                 detection	
  
[1]	
  E.	
  Hendrickson,	
  http://testobsessed.com/blog/2008/12/08/acceptance-­‐test-­‐driven-­‐development-­‐atdd-­‐an-­‐overview	
  	
  
[2]	
  J.	
  E.	
  Boal,	
  http://testdrivendeveloper.com/2011/12/27/AutomatedTestsAreTheKeyToScalingAgile.aspx	
  
Steps	
  
                                                                                                             Implement:	
  hammer	
  the	
  
                                                     Design	
  how	
  to	
  fulfill	
                         keyboard	
  until	
  all	
  tests	
  
                                                     the	
  requirement	
                                    pass	
  (incl.	
  other	
  tests)	
  



                                                                                              Write	
  
                                Story	
                           Design	
                                                 Code	
  
                                                                                              tests	
  




          Find	
  out	
  most	
  important	
                                     Formulate	
  test	
  cases,	
  
          thing	
  to	
  do,	
  write	
  a	
  user	
  story	
                    most	
  probable	
  path	
  first	
  



10.11.2012	
     Futurice	
                                                                                                                          34	
  
Case	
  study	
  
Steps	
  in	
  real	
  life	
  
Jenkins	
  CI	
  
»  Open-­‐source	
  continuous	
  integration	
  server	
  
»  Java	
  based,	
  lotsa	
  plugins	
  and	
  stuff	
  
»  Distributed	
  test	
  running	
  
»  Getting	
  started:	
  download	
  .war	
  and	
  fire	
  up	
  




10.11.2012	
     Futurice	
                                          37	
  
Selenium	
  
»  Automation	
  of	
  browsers	
  
        ›  E.g.	
  for	
  testing	
  purposes,	
  or	
  for	
  repetitive	
  admin	
  tasks	
  

»  Selenium	
  IDE	
  for	
  recording	
  scripts	
  (=playing	
  ariound)	
  

»  Scaling	
  and	
  distributing	
  test	
  running	
  

»  Java-­‐based,	
  with	
  wide	
  support	
  for	
  other	
  langs	
  &	
  testing	
  frameworks	
  




10.11.2012	
     Futurice	
                                                                              38	
  
Robot	
  Framework	
  
»  Generic	
  test	
  automation	
  framework	
  for	
  various	
  domains	
  
        ›  Web	
  part	
  backed	
  by	
  Selenium,	
  but	
  also	
  Java	
  GUI,	
  SSH,	
  running	
  processes...	
  

»  Tabular	
  test	
  data	
  syntax	
  

»  Extensible	
  with	
  Python/Java	
  




10.11.2012	
     Futurice	
                                                                                                 39	
  
Given-­‐When-­‐Then	
  (GWT)	
  
Example	
  of	
  a	
  popular	
  approach:	
  
»  Given	
  the	
  shopping	
  cart	
  is	
  visible	
  and	
  has	
  three	
  items	
  in	
  it,	
  
»  When	
  the	
  user	
  clicks	
  an	
  item’s	
  trashcan	
  icon,	
  
»  Then	
  the	
  item	
  should	
  disappear	
  from	
  the	
  list	
  and	
  a	
  notification	
  should	
  be	
  
   shown	
  with	
  the	
  item’s	
  name	
  and	
  an	
  “Undo”	
  link.	
  




10.11.2012	
     Futurice	
                                                                                           40	
  
Demo	
  
Is	
  this	
  worth	
  all	
     ›  Yes!	
  No	
  time	
  not	
  to	
  
        this	
  hassle?	
           automate	
  testing	
  
›  Fairly	
  liberal	
  refactoring	
  
               ›  Finding	
  regression	
  bugs	
  long	
  
                  before	
  going	
  to	
  prod	
  
               ›  TDD	
  =>	
  knowing	
  early	
  what	
  
Enables:	
        you	
  are	
  supposed	
  to	
  code	
  
                    ›  And	
  writing	
  less	
  useless	
  code	
  

               ›  Taking	
  in	
  new	
  devs	
  easily	
  
               ›  Continuous	
  deployment?	
  
                    ›  …but	
  not	
  quite	
  yet	
  
›  Different	
  mindset	
  required	
  
                       ›  Intermittent,	
  hard	
  to	
  
                          reproduce	
  test	
  failures	
  
Issues?	
  Sure:	
          ›  Asynchronity,	
  other	
  weirdness	
  
                            ›  Requires	
  lotsa	
  mad	
  skillz	
  

                       ›  …and	
  then	
  some	
  
Thanks!	
  
@ekantola	
  
github.com/ekantola	
  

Más contenido relacionado

La actualidad más candente

Atdd for web apps
Atdd for web appsAtdd for web apps
Atdd for web appsekantola
 
Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010Thomas Lundström
 
Software Evolution Cup 2011 - Retrospective and Results
Software Evolution Cup 2011 - Retrospective and ResultsSoftware Evolution Cup 2011 - Retrospective and Results
Software Evolution Cup 2011 - Retrospective and Resultsmircea.lungu
 
BDD approaches for web development at Agile Testing Days 2009
BDD approaches for web development at Agile Testing Days 2009BDD approaches for web development at Agile Testing Days 2009
BDD approaches for web development at Agile Testing Days 2009Thomas Lundström
 
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileBuilding Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileWee Witthawaskul
 

La actualidad más candente (7)

Atdd for web apps
Atdd for web appsAtdd for web apps
Atdd for web apps
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
 
Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010Bdd For Web Applications from Scandinavian Developer Conference 2010
Bdd For Web Applications from Scandinavian Developer Conference 2010
 
Software Evolution Cup 2011 - Retrospective and Results
Software Evolution Cup 2011 - Retrospective and ResultsSoftware Evolution Cup 2011 - Retrospective and Results
Software Evolution Cup 2011 - Retrospective and Results
 
BDD approaches for web development at Agile Testing Days 2009
BDD approaches for web development at Agile Testing Days 2009BDD approaches for web development at Agile Testing Days 2009
BDD approaches for web development at Agile Testing Days 2009
 
Code Retreat
Code RetreatCode Retreat
Code Retreat
 
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileBuilding Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed Agile
 

Similar a Website acceptance testing - Automated testing case study

Agile Software Development Process Practice in Thai Culture
Agile Software Development Process Practice in Thai CultureAgile Software Development Process Practice in Thai Culture
Agile Software Development Process Practice in Thai CultureWee Witthawaskul
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012Justin Gordon
 
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...Steve Lange
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery OverviewWill Iverson
 
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 PerspectiveWee Witthawaskul
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsOleksii Prohonnyi
 
Design For Testability
Design For TestabilityDesign For Testability
Design For TestabilityWill Iverson
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In ActionJon Kruger
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Essential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile AdoptionEssential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile AdoptionSteven Mak
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
Waterfallacies V1 1
Waterfallacies V1 1Waterfallacies V1 1
Waterfallacies V1 1Jorge Boria
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Test driven development using Junit and MockIto
Test driven development using Junit and MockItoTest driven development using Junit and MockIto
Test driven development using Junit and MockItoDevender Singh Garha
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0Ganesh Kondal
 
Agile Testing at eBay
Agile Testing at eBayAgile Testing at eBay
Agile Testing at eBayDominik Dary
 
Agile Testing, Uncertainty, Risk, and Why It All Works
Agile Testing, Uncertainty, Risk, and Why It All WorksAgile Testing, Uncertainty, Risk, and Why It All Works
Agile Testing, Uncertainty, Risk, and Why It All WorksElisabeth Hendrickson
 

Similar a Website acceptance testing - Automated testing case study (20)

Agile Software Development Process Practice in Thai Culture
Agile Software Development Process Practice in Thai CultureAgile Software Development Process Practice in Thai Culture
Agile Software Development Process Practice in Thai Culture
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
 
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery Overview
 
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
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basics
 
Design For Testability
Design For TestabilityDesign For Testability
Design For Testability
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Essential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile AdoptionEssential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile Adoption
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
Waterfallacies V1 1
Waterfallacies V1 1Waterfallacies V1 1
Waterfallacies V1 1
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Integreation
IntegreationIntegreation
Integreation
 
Test driven development using Junit and MockIto
Test driven development using Junit and MockItoTest driven development using Junit and MockIto
Test driven development using Junit and MockIto
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
Selenium Camp 2012
Selenium Camp 2012Selenium Camp 2012
Selenium Camp 2012
 
Agile Testing at eBay
Agile Testing at eBayAgile Testing at eBay
Agile Testing at eBay
 
Agile Testing, Uncertainty, Risk, and Why It All Works
Agile Testing, Uncertainty, Risk, and Why It All WorksAgile Testing, Uncertainty, Risk, and Why It All Works
Agile Testing, Uncertainty, Risk, and Why It All Works
 
Agile Testing Overview
Agile Testing OverviewAgile Testing Overview
Agile Testing Overview
 

Website acceptance testing - Automated testing case study

  • 1. Website  acceptance   testing  –  a  case  study   Eemeli  Kantola   10.11.2012  
  • 2. ›  Eemeli  Kantola   ›  Web  dev,  consulting,   About  me   lean/agile  enthusiasm   ›  Customer  projects  in   Futurice  
  • 3. I  like  to  create  awesome  web  apps  for   (human)  end  users  
  • 5. ATDD:  “The  practice  of  expressing   functional  story  requirements  as   concrete  examples  or  expectations  prior   to  story  development”   –  Jennitta  Andrea,  http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectId=16315      
  • 6. ›  Crystallize  acceptance   criteria:  shared   understanding  of  reqs   and  def.  of  done  [1]   Goals   ›  Win  bug  battle  with   complicated  systems   [2]:  early  regression   detection   [1]  E.  Hendrickson,  http://testobsessed.com/blog/2008/12/08/acceptance-­‐test-­‐driven-­‐development-­‐atdd-­‐an-­‐overview     [2]  J.  E.  Boal,  http://testdrivendeveloper.com/2011/12/27/AutomatedTestsAreTheKeyToScalingAgile.aspx  
  • 7. Steps   Implement:  hammer  the   Design  how  to  fulfill   keyboard  until  all  tests   the  requirement   pass  (incl.  other  tests)   Write   Story   Design   Code   tests   Find  out  most  important   Formulate  test  cases,   thing  to  do,  write  a  user  story   most  probable  path  first   10.11.2012   Futurice   34  
  • 9. Steps  in  real  life  
  • 10. Jenkins  CI   »  Open-­‐source  continuous  integration  server   »  Java  based,  lotsa  plugins  and  stuff   »  Distributed  test  running   »  Getting  started:  download  .war  and  fire  up   10.11.2012   Futurice   37  
  • 11. Selenium   »  Automation  of  browsers   ›  E.g.  for  testing  purposes,  or  for  repetitive  admin  tasks   »  Selenium  IDE  for  recording  scripts  (=playing  ariound)   »  Scaling  and  distributing  test  running   »  Java-­‐based,  with  wide  support  for  other  langs  &  testing  frameworks   10.11.2012   Futurice   38  
  • 12. Robot  Framework   »  Generic  test  automation  framework  for  various  domains   ›  Web  part  backed  by  Selenium,  but  also  Java  GUI,  SSH,  running  processes...   »  Tabular  test  data  syntax   »  Extensible  with  Python/Java   10.11.2012   Futurice   39  
  • 13. Given-­‐When-­‐Then  (GWT)   Example  of  a  popular  approach:   »  Given  the  shopping  cart  is  visible  and  has  three  items  in  it,   »  When  the  user  clicks  an  item’s  trashcan  icon,   »  Then  the  item  should  disappear  from  the  list  and  a  notification  should  be   shown  with  the  item’s  name  and  an  “Undo”  link.   10.11.2012   Futurice   40  
  • 15. Is  this  worth  all   ›  Yes!  No  time  not  to   this  hassle?   automate  testing  
  • 16. ›  Fairly  liberal  refactoring   ›  Finding  regression  bugs  long   before  going  to  prod   ›  TDD  =>  knowing  early  what   Enables:   you  are  supposed  to  code   ›  And  writing  less  useless  code   ›  Taking  in  new  devs  easily   ›  Continuous  deployment?   ›  …but  not  quite  yet  
  • 17. ›  Different  mindset  required   ›  Intermittent,  hard  to   reproduce  test  failures   Issues?  Sure:   ›  Asynchronity,  other  weirdness   ›  Requires  lotsa  mad  skillz   ›  …and  then  some