SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
Acceptance	
  Test	
  Driven	
  
Development	
  
for	
  Web	
  Apps	
  
Eemeli	
  Kantola	
  
15.6.2012	
  
›  Eemeli	
  Kantola	
  
                  ›  Web	
  dev,	
  consulting,	
  
About	
  me	
        lean/agile	
  enthusiasm	
  
                  ›  Customer	
  projects	
  
                  ›  Lecturing	
  
Futurice	
  in	
  brief	
  
                                                      TAMPERE	
  
                                                    HELSINKI	
  
                                  LONDON	
  

                                              BERLIN	
  
                                           DÜSSELDORF	
  


                          1	
  
      Founded	
  in	
  

                                                            150	
  
         2000	
  
We	
  offer	
  tailored	
  solutions	
  
         done	
  with	
  	
  
       agile	
  methods.	
  
Ask	
  why!	
  
“It's	
  not	
  enough	
  to	
  know	
  how	
  to	
  do	
  
things	
  –	
  you	
  must	
  know	
  why	
  you	
  do	
  
                       them.”	
  
                   –	
  Harvey	
  Mackay	
  
…and	
  doing	
  stuff	
  is	
  
~2x	
  more	
  efficient	
  
 if	
  you	
  know	
  why	
  
Why	
  am	
  I	
  here	
  
I	
  like	
  to	
  create	
  awesome	
  web	
  apps	
  for	
  
                     (human)	
  end	
  users	
  
Awesome:	
  getting	
  people	
  where	
  they	
  
need	
  to	
  be	
  faster	
  than	
  they	
  would	
  get	
  
                     there	
  without	
  
›  It’s	
  kewl	
  
                   ›  HTML5	
  is	
  bestest	
  
Web,	
  why?	
  
                   ›  Everyone’s	
  doing	
  it,	
  so	
  
                      why	
  not?	
  
Building	
  on	
  web	
  is	
  in	
  many	
  cases	
  more	
  
  awesome	
  than	
  alternatives	
  when	
  
   building	
  sw	
  for	
  human	
  end	
  users	
  
›  Single	
  (HTML)	
  page	
  load	
  
                   ›  Using	
  «Hypermedia	
  APIs»	
  
Web	
  apps?	
        (a.k.a.	
  RESTful	
  etc.	
  backend)	
  
                   ›  Suck	
  usually	
  less	
  than	
  other	
  
                      approaches	
  when	
  done	
  right	
  
›  Involving	
  humans	
  less	
  trivial,	
  
Human	
  end	
        i.e.	
  more	
  interesting	
  
   users?	
        ›  Interdisciplinary	
  approaches	
  
                      necessary	
  
Ok,	
  fine.	
  How?	
  
ATDD	
  
ATDD,	
                        »    Test	
  Driven	
  Requirements	
  (TDR)	
  


a.k.a.	
  
                               »    Functional	
  Test	
  Driven	
  Development	
  (FTDD)	
  

(or	
  related	
  to)	
  
                               »    Behavior	
  Driven	
  Development	
  (BDD)	
  

                               »    Story	
  Test	
  Driven	
  Development	
  

                               »    Executable	
  Requirements	
  

                               »    End-­‐to-­‐End	
  Test	
  Driven	
  Development	
  

                               »    Customer	
  Test	
  Driven	
  Development	
  

                               »    Business-­‐Facing	
  Test	
  Driven	
  Development	
  

                               »    Specification	
  by	
  Example	
  

                               »    ...	
  


15.6.2012	
     Futurice	
                                                                      21	
  
Acceptance	
  test?	
  




     wat	
  
Warning:	
  not	
  to	
  be	
  confused	
  with	
  
User	
  Acceptance	
  Tests	
  (UAT)	
  here	
  
            –	
  although	
  both	
  are	
  related…	
  
“Begin	
  with	
  the	
  
end	
  in	
  mind”	
  
–	
  Stephen	
  R.	
  Covey:	
  The	
  7	
  Habits	
  of	
  Highly	
  Effective	
  People	
  
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	
  	
  	
  
“BDD	
  (and	
  ATDD	
  as	
  well)	
  is	
  what	
  TDD	
  
          was	
  supposed	
  to	
  be”	
  
       –	
  Franz	
  See	
  in	
  BehaviourDrivenDevelopment	
  Google	
  Group,	
  2011-­‐01-­‐31	
  
›  One	
  method	
  in	
  toolbox	
  
      ATDD	
         among	
  others	
  
Disclaimers	
     ›  Lots	
  of	
  skills	
  and	
  other	
  
                     practices	
  needed,	
  too	
  
›  Crystallize	
  acceptance	
  
                                                                                 criteria:	
  get	
  a	
  shared	
  
                                                                                 understanding	
  of	
  reqs	
  
                                                                                 and	
  def.	
  of	
  done	
  [1]	
  
                                      Goals	
                                 ›  Win	
  the	
  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	
  
›  Minimize	
  unnecessary	
  work	
  
                                                                           (=	
  less	
  YAGNI)	
  
                                                                        ›  Solid	
  regression	
  tests	
  enable	
  
       Positive	
  side	
                                                  incremental	
  development	
  
             effects	
                                                   ›  Feels	
  great	
  every	
  time	
  when	
  
                                                                           a	
  bug	
  that	
  would’ve	
  gone	
  to	
  
                                                                           prod	
  was	
  caught	
  by	
  tests	
  [2]	
  
                                                                        ›  Enables	
  cont.	
  deployment	
  

	
  
[2]	
  J.	
  E.	
  Boal,	
  http://testdrivendeveloper.com/2011/12/27/AutomatedTestsAreTheKeyToScalingAgile.aspx	
  
›  Acceptance	
  tests	
  =	
  
                                                                               executable,	
  up-­‐to-­‐date	
  docs	
  
       Positive	
  side	
                                                   ›  Enriched	
  tester	
  role:	
  get	
  rid	
  
             effects	
                                                          of	
  most	
  mechanical	
  work	
  
           (cont.)	
  [3]	
                                                 ›  Highly	
  testable	
  system	
  
                                                                            ›  Trustworthy	
  specifications	
  


	
  
[3]	
  J.	
  	
  Andrea,	
  http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectId=16315	
  	
  
	
  
›  Too	
  difficult:	
  needs	
  skills,	
  
                                                                                       collaboration,	
  and	
  discipline;	
  
                                                                                       or	
  no	
  tools	
  exist	
  
                                                                                    ›  Not	
  feasible	
  to	
  automate	
  
                                                                                       everything	
  (in	
  practice)	
  
                     Why	
  not?	
                                                  ›  Doing	
  small,	
  prototype,	
  
                                                                                       unimportant,	
  simple	
  stuff	
  
                                                                                    ›  Discovery,	
  spikes	
  [4]	
  
                                                                                    ›  Initial	
  setup	
  overhead	
  
                                                                                    ›  «I	
  don’t	
  know	
  why»	
  
	
  
[4]	
  Liz	
  Keogh,	
  http://lizkeogh.com/2012/01/30/the-­‐real-­‐cost-­‐of-­‐change	
  
	
  
Cool.	
  What	
  about	
  
something	
  concrete?	
  
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	
  



15.6.2012	
      Futurice	
                                                                                                                          33	
  
Focus	
  now:	
  Formulate	
  test	
  cases	
  
  –	
  on	
  paper	
  and	
  then	
  in	
  code	
  
Hands	
  on	
  
Demo	
  App:	
  
Stopwatch	
  
›  have	
  a	
  timer	
  display	
  with	
  
                             zeroed	
  time	
  and	
  a	
  start	
  btn	
  
 What	
  do	
  you	
      ›  start	
  on	
  button	
  click	
  
need	
  for	
  one?	
  
                   	
     ›  if	
  started,	
  stop	
  when	
  button	
  
                             is	
  clicked	
  again	
  
  It	
  should…	
         ›  update	
  the	
  timer	
  seconds	
  
                             and	
  fractions	
  when	
  running	
  
1)  Web	
  browser	
  of	
  your	
  choice	
  

        Tech	
  stack	
      2)  Jasmine	
  BDD	
  
for	
  this	
  session	
     3)  CoffeeScript	
  (optional)	
  
                             4)  jQuery	
  (optional)	
  
Getting	
                      »  Download	
  and	
  unzip	
  Jasmine	
  BDD	
  
started	
                         standalone	
  to	
  a	
  working	
  dir	
  
                                    ›  Try	
  it:	
  open	
  SpecRunner.html	
  in	
  browser	
  

                                    ›  Playing	
  around	
  a	
  bit	
  

                                    ›  Hack	
  Jasmine	
  to	
  make	
  it	
  better	
  (optional)	
  

                               »  Write	
  specs	
  in	
  code	
  




15.6.2012	
     Futurice	
                                                                           41	
  
Sources:
https://github.com/ekantola/atdd-­‐for-­‐web-­‐apps	
  
Would	
  also	
  be	
       ›  continue	
  running	
  from	
  
                               where	
  it	
  was	
  stopped	
  last	
  
 pretty	
  nice	
  if	
     ›  remember	
  the	
  last	
  stopped	
  
    the	
  timer	
             time	
  across	
  app	
  reloads	
  
      could…	
              ›  etc…	
  
More	
  pointers	
  
and	
  ideas	
  
Autom.	
  &	
              Business-­‐facing	
                         Manual	
  
 Agile	
  Testing	
                          Manual	
  
                                                            Protos	
  
  Quadrants	
                                             Func.	
  Tests	
  
                                                                                                Scenarios	
  
                                                                                               Expl.	
  Testing	
  
                 	
                                       Simulations	
  
                                                          Acceptance	
  
                                                                                              Usability	
  Tests	
  
                                                                                                Alpha/Beta	
  
  From	
  	
  Crispin&Gregory,	
  	
                        Tests(*	
  
                                                                                                   UAT	
  
        Agile	
  Testing	
  book	
  	
                     Examples	
  
                                    	
  
Original	
  idea:	
  Brian	
  Marick  	
  
                                                                                               Perf	
  &	
  Load,	
  
                                                           Unit	
  Tests	
  
                                                                                                Security,	
  
                                                          Component	
  
                                                                                                  “-­‐ility”	
  
                                                             Tests	
  
                                                                                                 Testing	
  


                                             Automated	
                       Tech-­‐facing	
                          Tools	
  
                                                                                                                                    46	
  
Autom.	
  &	
              Business-­‐facing	
                         Manual	
  
 Agile	
  Testing	
                                  Manual	
  
                                                                    Protos	
  
  Quadrants	
                                                     Func.	
  Tests	
  
                                                                                                        Scenarios	
  
                                                                                                       Expl.	
  Testing	
  
                 	
                                               Simulations	
  
                                                                  Acceptance	
  
                                                                                                      Usability	
  Tests	
  
                                                                                                        Alpha/Beta	
  
  From	
  	
  Crispin&Gregory,	
  	
                                Tests(*	
  
                                                                                                           UAT	
  
        Agile	
  Testing	
  book	
  	
                             Examples	
  
                                    	
  
Original	
  idea:	
  Brian	
  Marick          	
  
                                                                                                       Perf	
  &	
  Load,	
  
                                                                   Unit	
  Tests	
  
                                                                                                        Security,	
  
                                                                  Component	
  
                                                                                                          “-­‐ility”	
  
                                                                     Tests	
  
                                                                                                         Testing	
  

    *)	
  Originally,	
  Story	
  Tests	
  
                                                     Automated	
                       Tech-­‐facing	
                          Tools	
  
                                                                                                                                            47	
  
Some	
  other	
                »  Selenium	
               »  JBehave	
  

tools	
  to	
                  »  Robot	
  Framework	
     »  Rspec	
  

help	
  writing	
              »  FitNesse	
               »  Cucumber	
  

&	
  running	
                 »  Poltergeist	
            »  Expect	
  

tests	
                        »  Watir/Watij	
            »  easyb	
  

                               »  Canoo	
  WebTest	
       »  Slim	
  
                               »  StoryTeller	
            »  Specflow	
  

                               »  Screw.Unit	
             »  QUnit+Pavlov	
  

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

»  Selenium	
  IDE	
  for	
  recording	
  scripts	
  

»  Scaling	
  and	
  distributing	
  test	
  running	
  

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




16.6.2012	
      Futurice	
                                                                              49	
  
Cucumber	
  BDD	
  
»  Automation	
  of	
  browsers	
  
»  Describing	
  behavior	
  in	
  plain,	
  human	
  readable	
  text	
  (Given-­‐When-­‐Then)	
  
         ›  Higher	
  level	
  abstraction	
  for	
  tests	
  

»  Ruby-­‐based,	
  but	
  bindings	
  for	
  other	
  langs	
  exist	
  




16.6.2012	
     Futurice	
                                                                            50	
  
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.	
  




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

»  Tabular	
  test	
  data	
  syntax	
  

»  Extensible	
  with	
  Python/Java	
  




16.6.2012	
     Futurice	
                                                                                                           53	
  
Conclusions	
  
›  Easy	
  to	
  start	
  with	
  in	
  web,	
  
   powerful	
  tools	
  exist	
  
›  Longer	
  projects:	
  no	
  time	
  not	
  
   to	
  automate	
  and	
  maintain	
  
   tests	
  
Thanks!	
  
Contact:	
  
@ekantola	
  
github.com/ekantola	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Managing Software Debt in Practice 2011
Managing Software Debt in Practice 2011Managing Software Debt in Practice 2011
Managing Software Debt in Practice 2011Chris Sterling
 
Webapp acceptance testing a case study
Webapp acceptance testing   a case studyWebapp acceptance testing   a case study
Webapp acceptance testing a case studyekantola
 
Placements 2005 to date - Part I
Placements  2005 to date - Part IPlacements  2005 to date - Part I
Placements 2005 to date - Part Irnewell1973
 
Costs Of Agile Testing
Costs Of Agile TestingCosts Of Agile Testing
Costs Of Agile TestingSchalk Cronjé
 
Agile teams - Value Focused; Values-driven
Agile teams - Value Focused; Values-drivenAgile teams - Value Focused; Values-driven
Agile teams - Value Focused; Values-drivenSchalk Cronjé
 
Usability in the Contact Center
Usability in the Contact CenterUsability in the Contact Center
Usability in the Contact CenterGfK User Centric
 
How to Design the Fun Out of Things with UX -- Minnebar10 2015
How to Design the Fun Out of Things with UX -- Minnebar10 2015How to Design the Fun Out of Things with UX -- Minnebar10 2015
How to Design the Fun Out of Things with UX -- Minnebar10 2015Brock Dubbels
 
The Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstThe Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstChris Sterling
 
"Lean software development: discovering waste" by Mary Poppendieck
"Lean software development: discovering waste" by Mary Poppendieck"Lean software development: discovering waste" by Mary Poppendieck
"Lean software development: discovering waste" by Mary PoppendieckOperae Partners
 
Designing a Process that Works for Your Team
Designing a Process that Works for Your TeamDesigning a Process that Works for Your Team
Designing a Process that Works for Your TeamAriadna Font Llitjos
 
Testing in an Agile Context 2011
Testing in an Agile Context 2011Testing in an Agile Context 2011
Testing in an Agile Context 2011Chris Sterling
 
Ux bootcamp small
Ux bootcamp smallUx bootcamp small
Ux bootcamp smallFrank Kloos
 
Lieutenant Pigeons Design review 2
Lieutenant Pigeons Design review 2Lieutenant Pigeons Design review 2
Lieutenant Pigeons Design review 2Steven Zhang
 
Can't we all get along? Human-centered design meets Agile
Can't we all get along? Human-centered design meets AgileCan't we all get along? Human-centered design meets Agile
Can't we all get along? Human-centered design meets AgileAutodesk
 
Towards a Push-Button Release
Towards a Push-Button ReleaseTowards a Push-Button Release
Towards a Push-Button ReleaseChris Sterling
 
Visualising the user experience
Visualising the user experience Visualising the user experience
Visualising the user experience Darren Menachemson
 

Was ist angesagt? (20)

Managing Software Debt in Practice 2011
Managing Software Debt in Practice 2011Managing Software Debt in Practice 2011
Managing Software Debt in Practice 2011
 
Webapp acceptance testing a case study
Webapp acceptance testing   a case studyWebapp acceptance testing   a case study
Webapp acceptance testing a case study
 
Placements 2005 to date - Part I
Placements  2005 to date - Part IPlacements  2005 to date - Part I
Placements 2005 to date - Part I
 
Ebay News 2006 7 19 Earnings
Ebay News 2006 7 19 EarningsEbay News 2006 7 19 Earnings
Ebay News 2006 7 19 Earnings
 
Costs Of Agile Testing
Costs Of Agile TestingCosts Of Agile Testing
Costs Of Agile Testing
 
Agile teams - Value Focused; Values-driven
Agile teams - Value Focused; Values-drivenAgile teams - Value Focused; Values-driven
Agile teams - Value Focused; Values-driven
 
Usability in the Contact Center
Usability in the Contact CenterUsability in the Contact Center
Usability in the Contact Center
 
How to Design the Fun Out of Things with UX -- Minnebar10 2015
How to Design the Fun Out of Things with UX -- Minnebar10 2015How to Design the Fun Out of Things with UX -- Minnebar10 2015
How to Design the Fun Out of Things with UX -- Minnebar10 2015
 
The Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstThe Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to Burst
 
Rightplacing
RightplacingRightplacing
Rightplacing
 
"Lean software development: discovering waste" by Mary Poppendieck
"Lean software development: discovering waste" by Mary Poppendieck"Lean software development: discovering waste" by Mary Poppendieck
"Lean software development: discovering waste" by Mary Poppendieck
 
Transformational Leadership
Transformational LeadershipTransformational Leadership
Transformational Leadership
 
Designing a Process that Works for Your Team
Designing a Process that Works for Your TeamDesigning a Process that Works for Your Team
Designing a Process that Works for Your Team
 
Testing in an Agile Context 2011
Testing in an Agile Context 2011Testing in an Agile Context 2011
Testing in an Agile Context 2011
 
Ux bootcamp small
Ux bootcamp smallUx bootcamp small
Ux bootcamp small
 
Lieutenant Pigeons Design review 2
Lieutenant Pigeons Design review 2Lieutenant Pigeons Design review 2
Lieutenant Pigeons Design review 2
 
Can't we all get along? Human-centered design meets Agile
Can't we all get along? Human-centered design meets AgileCan't we all get along? Human-centered design meets Agile
Can't we all get along? Human-centered design meets Agile
 
Towards a Push-Button Release
Towards a Push-Button ReleaseTowards a Push-Button Release
Towards a Push-Button Release
 
Simple design
Simple designSimple design
Simple design
 
Visualising the user experience
Visualising the user experience Visualising the user experience
Visualising the user experience
 

Ähnlich wie Atdd for web apps

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
 
Agile Estimation And Planning Part I
Agile Estimation And Planning Part IAgile Estimation And Planning Part I
Agile Estimation And Planning Part IKevin Zamora
 
Guerrilla Usability
Guerrilla UsabilityGuerrilla Usability
Guerrilla Usabilityhellplex
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemConSanFrancisco123
 
Design Thinking and Agile?
Design Thinking and Agile?Design Thinking and Agile?
Design Thinking and Agile?Tathagat Varma
 
BDD presentation
BDD presentationBDD presentation
BDD presentationtemebele
 
Agile Pathologies: Backyards of Agile Shops
Agile Pathologies: Backyards of Agile ShopsAgile Pathologies: Backyards of Agile Shops
Agile Pathologies: Backyards of Agile Shopsudairaj
 
Agile pathologies
Agile pathologiesAgile pathologies
Agile pathologiesudairaj
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsMarcello Duarte
 
Estimation Agile Projects
Estimation Agile ProjectsEstimation Agile Projects
Estimation Agile ProjectsRam Srivastava
 
Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices A B M Moniruzzaman
 
Agile Testing at eBay
Agile Testing at eBayAgile Testing at eBay
Agile Testing at eBayDominik Dary
 
2009 05 21 The Lean Startup At SIPA
2009 05 21 The Lean Startup At SIPA2009 05 21 The Lean Startup At SIPA
2009 05 21 The Lean Startup At SIPAEric Ries
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?Jen-Chieh Ko
 
Dataiku r users group v2
Dataiku   r users group v2Dataiku   r users group v2
Dataiku r users group v2Cdiscount
 
[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process ModelsCarles Farré
 
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
 
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
 

Ähnlich wie Atdd for web apps (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
 
Agile Estimation And Planning Part I
Agile Estimation And Planning Part IAgile Estimation And Planning Part I
Agile Estimation And Planning Part I
 
Guerrilla Usability
Guerrilla UsabilityGuerrilla Usability
Guerrilla Usability
 
Introduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome ThemIntroduction Challenges In Agile And How To Overcome Them
Introduction Challenges In Agile And How To Overcome Them
 
Design Thinking and Agile?
Design Thinking and Agile?Design Thinking and Agile?
Design Thinking and Agile?
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Agile Pathologies: Backyards of Agile Shops
Agile Pathologies: Backyards of Agile ShopsAgile Pathologies: Backyards of Agile Shops
Agile Pathologies: Backyards of Agile Shops
 
Agile pathologies
Agile pathologiesAgile pathologies
Agile pathologies
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Estimation Agile Projects
Estimation Agile ProjectsEstimation Agile Projects
Estimation Agile Projects
 
Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices
 
Agile Testing at eBay
Agile Testing at eBayAgile Testing at eBay
Agile Testing at eBay
 
2009 05 21 The Lean Startup At SIPA
2009 05 21 The Lean Startup At SIPA2009 05 21 The Lean Startup At SIPA
2009 05 21 The Lean Startup At SIPA
 
Agile
AgileAgile
Agile
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?
 
Dataiku r users group v2
Dataiku   r users group v2Dataiku   r users group v2
Dataiku r users group v2
 
[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models
 
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
 
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
 

Kürzlich hochgeladen

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Atdd for web apps

  • 1. Acceptance  Test  Driven   Development   for  Web  Apps   Eemeli  Kantola   15.6.2012  
  • 2. ›  Eemeli  Kantola   ›  Web  dev,  consulting,   About  me   lean/agile  enthusiasm   ›  Customer  projects   ›  Lecturing  
  • 3. Futurice  in  brief   TAMPERE   HELSINKI   LONDON   BERLIN   DÜSSELDORF   1   Founded  in   150   2000  
  • 4. We  offer  tailored  solutions   done  with     agile  methods.  
  • 5.
  • 7. “It's  not  enough  to  know  how  to  do   things  –  you  must  know  why  you  do   them.”   –  Harvey  Mackay  
  • 8. …and  doing  stuff  is   ~2x  more  efficient   if  you  know  why  
  • 9. Why  am  I  here  
  • 10. I  like  to  create  awesome  web  apps  for   (human)  end  users  
  • 11. Awesome:  getting  people  where  they   need  to  be  faster  than  they  would  get   there  without  
  • 12. ›  It’s  kewl   ›  HTML5  is  bestest   Web,  why?   ›  Everyone’s  doing  it,  so   why  not?  
  • 13.
  • 14. Building  on  web  is  in  many  cases  more   awesome  than  alternatives  when   building  sw  for  human  end  users  
  • 15. ›  Single  (HTML)  page  load   ›  Using  «Hypermedia  APIs»   Web  apps?   (a.k.a.  RESTful  etc.  backend)   ›  Suck  usually  less  than  other   approaches  when  done  right  
  • 16. ›  Involving  humans  less  trivial,   Human  end   i.e.  more  interesting   users?   ›  Interdisciplinary  approaches   necessary  
  • 19. ATDD,   »  Test  Driven  Requirements  (TDR)   a.k.a.   »  Functional  Test  Driven  Development  (FTDD)   (or  related  to)   »  Behavior  Driven  Development  (BDD)   »  Story  Test  Driven  Development   »  Executable  Requirements   »  End-­‐to-­‐End  Test  Driven  Development   »  Customer  Test  Driven  Development   »  Business-­‐Facing  Test  Driven  Development   »  Specification  by  Example   »  ...   15.6.2012   Futurice   21  
  • 21. Warning:  not  to  be  confused  with   User  Acceptance  Tests  (UAT)  here   –  although  both  are  related…  
  • 22. “Begin  with  the   end  in  mind”   –  Stephen  R.  Covey:  The  7  Habits  of  Highly  Effective  People  
  • 23. 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      
  • 24. “BDD  (and  ATDD  as  well)  is  what  TDD   was  supposed  to  be”   –  Franz  See  in  BehaviourDrivenDevelopment  Google  Group,  2011-­‐01-­‐31  
  • 25. ›  One  method  in  toolbox   ATDD   among  others   Disclaimers   ›  Lots  of  skills  and  other   practices  needed,  too  
  • 26. ›  Crystallize  acceptance   criteria:  get  a  shared   understanding  of  reqs   and  def.  of  done  [1]   Goals   ›  Win  the  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  
  • 27. ›  Minimize  unnecessary  work   (=  less  YAGNI)   ›  Solid  regression  tests  enable   Positive  side   incremental  development   effects   ›  Feels  great  every  time  when   a  bug  that  would’ve  gone  to   prod  was  caught  by  tests  [2]   ›  Enables  cont.  deployment     [2]  J.  E.  Boal,  http://testdrivendeveloper.com/2011/12/27/AutomatedTestsAreTheKeyToScalingAgile.aspx  
  • 28. ›  Acceptance  tests  =   executable,  up-­‐to-­‐date  docs   Positive  side   ›  Enriched  tester  role:  get  rid   effects   of  most  mechanical  work   (cont.)  [3]   ›  Highly  testable  system   ›  Trustworthy  specifications     [3]  J.    Andrea,  http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectId=16315      
  • 29. ›  Too  difficult:  needs  skills,   collaboration,  and  discipline;   or  no  tools  exist   ›  Not  feasible  to  automate   everything  (in  practice)   Why  not?   ›  Doing  small,  prototype,   unimportant,  simple  stuff   ›  Discovery,  spikes  [4]   ›  Initial  setup  overhead   ›  «I  don’t  know  why»     [4]  Liz  Keogh,  http://lizkeogh.com/2012/01/30/the-­‐real-­‐cost-­‐of-­‐change    
  • 30. Cool.  What  about   something  concrete?  
  • 31. 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   15.6.2012   Futurice   33  
  • 32. Focus  now:  Formulate  test  cases   –  on  paper  and  then  in  code  
  • 35. ›  have  a  timer  display  with   zeroed  time  and  a  start  btn   What  do  you   ›  start  on  button  click   need  for  one?     ›  if  started,  stop  when  button   is  clicked  again   It  should…   ›  update  the  timer  seconds   and  fractions  when  running  
  • 36. 1)  Web  browser  of  your  choice   Tech  stack   2)  Jasmine  BDD   for  this  session   3)  CoffeeScript  (optional)   4)  jQuery  (optional)  
  • 37. Getting   »  Download  and  unzip  Jasmine  BDD   started   standalone  to  a  working  dir   ›  Try  it:  open  SpecRunner.html  in  browser   ›  Playing  around  a  bit   ›  Hack  Jasmine  to  make  it  better  (optional)   »  Write  specs  in  code   15.6.2012   Futurice   41  
  • 39. Would  also  be   ›  continue  running  from   where  it  was  stopped  last   pretty  nice  if   ›  remember  the  last  stopped   the  timer   time  across  app  reloads   could…   ›  etc…  
  • 41. Autom.  &   Business-­‐facing   Manual   Agile  Testing   Manual   Protos   Quadrants   Func.  Tests   Scenarios   Expl.  Testing     Simulations   Acceptance   Usability  Tests   Alpha/Beta   From    Crispin&Gregory,     Tests(*   UAT   Agile  Testing  book     Examples     Original  idea:  Brian  Marick   Perf  &  Load,   Unit  Tests   Security,   Component   “-­‐ility”   Tests   Testing   Automated   Tech-­‐facing   Tools   46  
  • 42. Autom.  &   Business-­‐facing   Manual   Agile  Testing   Manual   Protos   Quadrants   Func.  Tests   Scenarios   Expl.  Testing     Simulations   Acceptance   Usability  Tests   Alpha/Beta   From    Crispin&Gregory,     Tests(*   UAT   Agile  Testing  book     Examples     Original  idea:  Brian  Marick   Perf  &  Load,   Unit  Tests   Security,   Component   “-­‐ility”   Tests   Testing   *)  Originally,  Story  Tests   Automated   Tech-­‐facing   Tools   47  
  • 43. Some  other   »  Selenium   »  JBehave   tools  to   »  Robot  Framework   »  Rspec   help  writing   »  FitNesse   »  Cucumber   &  running   »  Poltergeist   »  Expect   tests   »  Watir/Watij   »  easyb   »  Canoo  WebTest   »  Slim   »  StoryTeller   »  Specflow   »  Screw.Unit   »  QUnit+Pavlov   15.6.2012   Futurice   48  
  • 44. Selenium   »  Automation  of  browsers   ›  E.g.  for  testing  purposes,  or  for  repetitive  admin  tasks   »  Selenium  IDE  for  recording  scripts   »  Scaling  and  distributing  test  running   »  Java-­‐based,  with  wide  support  for  other  langs  &  testing  frameworks   16.6.2012   Futurice   49  
  • 45. Cucumber  BDD   »  Automation  of  browsers   »  Describing  behavior  in  plain,  human  readable  text  (Given-­‐When-­‐Then)   ›  Higher  level  abstraction  for  tests   »  Ruby-­‐based,  but  bindings  for  other  langs  exist   16.6.2012   Futurice   50  
  • 46. 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.   15.6.2012   Futurice   51  
  • 47. Robot  Framework   »  Generic  test  automation  framework  for  various  domains   ›  Web  part  backed  by  e.g.  Selenium,  but  also  Java  GUI,  SSH,  running  processes...   »  Tabular  test  data  syntax   »  Extensible  with  Python/Java   16.6.2012   Futurice   53  
  • 49. ›  Easy  to  start  with  in  web,   powerful  tools  exist   ›  Longer  projects:  no  time  not   to  automate  and  maintain   tests  
  • 50. Thanks!   Contact:   @ekantola   github.com/ekantola