SlideShare ist ein Scribd-Unternehmen logo
1 von 62
ATDD mit Concordion und WebDriver




   ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 1
ATDD mit Concordion und WebDriver


Torsten Müller
OPITZ CONSULTING Berlin GmbH
www.opitz-consulting.com




Berlin Expert Days, 07 April 2011

                     ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 2
Einleitung




                                  “ATDD is hard work”
                  “The complexity and effort
               of automating acceptance tests
           easily matches – and often outweighs –
            that of implementing the story itself.”
      JASON GORMAN: ANTWORT AUF BRIAN MARICK: BARRIERS TO ACCEPTANCE-TEST DRIVEN DESIGN
      http://www.exampler.com/blog/2008/08/19/barriers-to-acceptance-test-driven-design




             ATDD mit Concordion und WebDriver                      © OPITZ CONSULTING GmbH 2011   Seite 3
Agenda


1.   Akzeptanztest-getriebene Entwicklung (ATDD)

2.   Tools

      Concordion
      WebDriver


3.   (Best?) Practices

      WebDriver
      Concordion
      Test Automation


             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 4
Akzeptanztest-getriebene
1   Entwicklung (ATDD)




        ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 5
Begriffsdefinition


                         Entwicklungspraxis, in der

    die funktionalen Anforderungen (Akzeptanzkriterien)
                      einer User Story

               als konkrete und automatisierbare
                   (praxisrelevante) Beispiele

        vor der eigentlichen Entwicklung der Story
                selber geschrieben werden.

                                      WIECHMANN ET AL.: ATDD KURZ ERKLÄRT – DIE RICHTIGEN DINGE ENTWICKELN
                                      http://www.projekt-log.de/agile_softwareentwicklung/atdd-in-a-nutshell/
           ATDD mit Concordion und WebDriver                                 © OPITZ CONSULTING GmbH 2011   Seite 6
Gegenstand




           „Specification by Example“
           „Example Driven Development“

                                            GOJKO ADZIC: SPECIFYING WITH EXAMPLES
                                            http://gojko.net/2008/11/04/specifying-with-examples/
        ATDD mit Concordion und WebDriver                   © OPITZ CONSULTING GmbH 2011   Seite 7
Prozess




                                              DAVID PETERSON: STORY DELIVERY LIFECYCLE
                                              http://www.concordion.org/memo/StoryDeliveryLifecycle.pdf
          ATDD mit Concordion und WebDriver                        © OPITZ CONSULTING GmbH 2011   Seite 8
Abgrenzung: ATDD und Abnahmetests


Abnahmetest oder auch User-Akzeptanztest (UAT)

   Fokus: Test der gelieferten Software durch den Kunden bzw. Auftraggeber
   Ziel: Abnahme der Software


Akzeptanztest-getriebene Entwicklung

   Fokus: Kommunikation zwischen Product Owner und Entwicklungsteam
   Ziel: Entwicklung der „richtigen“ Software




             ATDD mit Concordion und WebDriver       © OPITZ CONSULTING GmbH 2011   Seite 9
Abgrenzung: ATDD und TDD




                                            LASSE KOSKELA: ACCEPTANCE TDD EXPLAINED
                                            http://www.methodsandtools.com/archive/archive.php?id=72
        ATDD mit Concordion und WebDriver                         © OPITZ CONSULTING GmbH 2011   Seite 10
Anwendungsbereiche




                                  NIGEL CHARMAN: WHAT TYPES OF APPLICATION CAN I TEST WITH CONCORDION?
                                  http://tutansblog.blogspot.com/2009/06/what-types-of-application-can-i-test.html
        ATDD mit Concordion und WebDriver                                    © OPITZ CONSULTING GmbH 2011   Seite 11
Automatisierung




                  “Acceptance tests should run
                       in an environment
                         as close to the
                    production environment
                          as possible.”




         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 12
Tool-Einsatz

 Concordion




                                                   WebDriver




              ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 13
2   Tools




        ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 14
2.1   Concordion




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 15
Concordion




    “Lets you write business tests that don't assume
               a particular implementation.”




                                                   PROJECT WEBSITE
                                                   http://www.concordion.org/
         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 16
Funktionsweise




                                                   PROJECT WEBSITE
                                                   http://www.concordion.org/
         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 17
Funktionsweise




                                                   PROJECT WEBSITE
                                                   http://www.concordion.org/
         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 18
Beispiel – Spezifikation




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 19
Beispiel – Instrumentierung




         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 20
Beispiel – Fixture




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 21
Beispiel – JUnit-Integration

   ConcordionRunner




   ConcordionBuilder




             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 22
Erweiterungen: Screenshot Extension



 Screenshot Extension

    attach screenshots to help
     diagnose test failures

    add screenshots to the output
     for documentation purposes




             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 23
Erweiterungen: Logging Tooltip Extension




 Logging Tooltip Extension

    provide more insight into what
     the tests are actually doing




              ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 24
2.2   WebDriver




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 25
WebDriver


                  “WebDriver is a tool
        for automating testing web applications,
                      and in particular
          to verify that they work as expected.”


        “It aims to provide a friendly API that’s
              easy to explore and understand,
              which will help make your tests
               easier to read and maintain.”


                                            PROJECT WEBSITE
                                            http://seleniumhq.org/docs/03_webdriver.html
        ATDD mit Concordion und WebDriver           © OPITZ CONSULTING GmbH 2011   Seite 26
Beispiel




           ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 27
3   (Best?) Practices




         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 28
3.1   WebDriver




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 29
WebDriver Practices

  Name Everything
  Waiting, Waiting, Waiting…
  Turn UI Testing into API Testing


  Always Have A Plan B. And A Plan C. (And D…)


  Take Screenshots If Something Goes Wrong
  Use Diagnostic Logging

                                               THOMAS SCHRANTZ: UI AUTOMATION: TRICKS AND TRAPS
                                               http://www.mathpirate.net/log/2009/12/23/ui-automation-tricks-and-traps/
           ATDD mit Concordion und WebDriver                                      © OPITZ CONSULTING GmbH 2011   Seite 30
„Name Everything”




        ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 31
„Waiting, Waiting, Waiting …”




         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 32
„Waiting, Waiting, Waiting …”




         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 33
„Waiting, Waiting, Waiting …”


 Window Licker (http://code.google.com/p/windowlicker/)




           ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 34
„Turn UI Testing into API Testing”




             Introduce Page and (optional) Site Objects



          ATDD mit Concordion und WebDriver         © OPITZ CONSULTING GmbH 2011   Seite 35
„Turn UI Testing into API Testing”: Page Objects




                                              SIMON STEWARD: PAGE OBJECTS
                                              http://code.google.com/p/selenium/wiki/PageObjects
          ATDD mit Concordion und WebDriver                 © OPITZ CONSULTING GmbH 2011   Seite 36
„Turn UI Testing into API Testing”: Page Objects
Hide low level implementation details
Methods represent the services that the page offers
  loginPage.loginAs(String user, String credentials);
  searchPage.searchFor(String query);

Methods return other page objects
  SearchResultsPage resultsPage =
       searchPage.searchFor(String query);

Different results for the same action are modeled
as different methods
  RefineSearchPage refineSearchPage =
       searchPage.searchForButExpectNoMatches(String query);


           ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 37
Page Objects: WebDriver Support

 PageFactory
 (Package org.openqa.selenium.support)




 LoadableComponent & SlowLoadableComponent
 (Package org.openqa.selenium.support.ui)




             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 38
„Always Have A Plan B. And A Plan C.”

 JavascriptExecutor
 (Package org.openqa.selenium)




            ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 39
„Take Screenshots”
 TakesScreenshot
 (Package org.openqa.selenium)




            ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 40
„Diagnostic Logging”
 EventFiringWebDriver & WebDriverEventListener
 (Package org.openqa.selenium.support.events)




            ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 41
3.2   Concordion




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 42
Concordion Practices


             “The closer your acceptance tests
                 are to the business rules,
                 the more stable they are.”




                 GOJKO ADZIC: HOW TO IMPLEMENT UI TESTING WITHOUT SHOOTING YOURSELF IN THE FOOT
                 http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/
                 DAVID PETERSON: CONCORDION – HINTS AND TIPS
                 http://www.concordion.org/Technique.html
         ATDD mit Concordion und WebDriver                                 © OPITZ CONSULTING GmbH 2011   Seite 43
Concordion Practices

  Think Given-When-Then
  Write Specifications, not Scripts
  Use S.M.A.R.T. Examples
  Think in Goals, Tasks and Actions
  Evolve a Scripting DSL




                                               DAVID PETERSON: CONCORDION – HINTS AND TIPS
                                               http://www.concordion.org/Technique.html
           ATDD mit Concordion und WebDriver              © OPITZ CONSULTING GmbH 2011   Seite 44
„Think Given-When-Then“


    Scenario: <A scenario specific goal>
    GIVEN   <something that needs to have happened or be true>
    WHEN    <some task I must do>
    THEN    <some way I know I've achieved my goal>




            ATDD mit Concordion und WebDriver      © OPITZ CONSULTING GmbH 2011   Seite 45
„Write Specifications, not Scripts“


     Scenario: Search for the Concordion homepage
     Given I am at http://google.com
     When I enter "concordion" into the search field and click "Search"
     Then the top result should say "Concordion”


     Better Scenario: Search for the Concordion homepage
     When I search for "concordion"
     Then the top result should say "Concordion"




             ATDD mit Concordion und WebDriver          © OPITZ CONSULTING GmbH 2011   Seite 46
„Use S.M.A.R.T. Examples“

  SPECIFIC
     Examples are explicitly defined and definite.

  MEASURABLE
     The result is observable and quantifiable.

  ACHIEVABLE
     Examples describe a realistic scenario.

  RELEVANT
     Examples are related to the particular story.

  TIME-BOUND
     The result can be observed in a defined Time.


                                        NARESH JAIN: ACCEPTANCE TEST DRIVEN DEVELOPMENT
                                        http://www.slideshare.net/nashjain/acceptance-test-driven-development-350264
             ATDD mit Concordion und WebDriver                                  © OPITZ CONSULTING GmbH 2011   Seite 47
„Think in Goals, Tasks and Actions“


    GOAL: What we’re trying to achieve which has one or more…
    TASKS: The high-level work-item that we complete to fulfill the
            goal, each having one or more…
    ACTIONS: The specific steps or interactions we execute to complete
            the task.



     GOALS, TASKS                 Spezifikation
     ACTIONS                      Fixture




                                  MARCANO, ANTONY: A BIT OF UCD FOR BDD & ATDD: GOALS -> TASKS -> ACTIONS
                                  http://antonymarcano.com/blog/2011/03/goals-tasks-action/
            ATDD mit Concordion und WebDriver                             © OPITZ CONSULTING GmbH 2011   Seite 48
„Evolve a Scripting DSL“




                                       DAVID PETERSON: WHAT DO I MEAN BY A „SCRIPTING DSL“?
                                       http://blog.davidpeterson.co.uk/2008/02/what-do-i-mean-by-scripting-dsl.html
         ATDD mit Concordion und WebDriver                                    © OPITZ CONSULTING GmbH 2011   Seite 49
„Evolve a Scripting DSL“

  GIVEN
     Encapsulate test data creation
       Object Mother, Test Data Builder
       Make It Easy (http://code.google.com/p/make-it-easy/)

  WHEN
     Turn UI Testing into API Testing
       Page Objects (http://code.google.com/p/selenium/wiki/PageObjects)

  THEN
     Encapsulate Assertions
       Hamcrest (http://www.code.google.com/p/hamcrest/)




             ATDD mit Concordion und WebDriver             © OPITZ CONSULTING GmbH 2011   Seite 50
3.3   Test Automation




          ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 51
Test Automation




             VEGARD HARTMANN: SUCCEEDING WITH WEBTESTING USING WEBDRIVER
             http://open.bekk.no/wp-content/uploads/2010/03/succeeding-with-webtesting-using-webdriver.pdf
         ATDD mit Concordion und WebDriver                             © OPITZ CONSULTING GmbH 2011   Seite 52
Test Automation Practices

  Use Independent Tests
    Cleanup, Setup, Test, Teardown
  Use Non-Production code for Setup/Teardown
  Don't rely on external systems that you don't control
  Provide Feedback If Something Goes Wrong




               NARESH JAIN: PATTERNS AND ANTI-PATTERNS: ACCEPTANCE TESTING WITH FITNESSE
               http://blogs.agilefaqs.com/2007/08/25/patterns-and-anti-patterns-acceptance-testing-with-fitnesse/
           ATDD mit Concordion und WebDriver                               © OPITZ CONSULTING GmbH 2011   Seite 53
Fragen und Antworten




         ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 54
Referenzen




    ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 55
Referenzen
 Adzic, Gojko:
  Bridging the Communication Gap: Specification by Example and
  Agile Acceptance Testing
  London : Neuri Limited; 2009. ISBN 978-0955683619
 Freeman, Steve; Pryce Nat:
  Growing Object-Oriented Software, Guided by Tests
  Amsterdam : Addison-Wesley Longman; 2009.
  ISBN 978-0321503626




             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 56
Referenzen
 Adzic, Gojko: How to implement UI testing without shooting
  yourself in the foot
  http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-
  shooting-yourself-in-the-foot-2/
 Adzic, Gojko: Specifying With Examples
  http://gojko.net/2008/11/04/specifying-with-examples/
 Charman, Nigel:
  What types of application can I test with Concordion?
  http://tutansblog.blogspot.com/2009/06/what-types-of-application-
  can-i-test.html
 Gorman, Jason: Antwort auf
  Marick, Brian: Barriers to acceptance-test driven design
  http://www.exampler.com/blog/2008/08/19/barriers-to-acceptance-
  test-driven-design

             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 57
Referenzen
 Hartmann, Vegard:
  Succeeding with webtesting – Using WebDriver
  http://open.bekk.no/wp-content/uploads/2010/03/succeeding-with-
  webtesting-using-webdriver.pdf
 Jain, Naresh: Acceptance Test Driven Development
  http://www.slideshare.net/nashjain/acceptance-test-driven-
  development-350264
 Jain, Naresh: Patterns and Anti-Patterns: Acceptance Testing with
  FitNesse
  http://blogs.agilefaqs.com/2007/08/25/patterns-and-anti-patterns-
  acceptance-testing-with-fitnesse
 Koskela, Lasse : Acceptance TDD Explained
  http://www.methodsandtools.com/archive/archive.php?id=72


             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 58
Referenzen
 Marcano, Antony:
  A bit of UCD for BDD & ATDD: Goals -> Tasks -> Actions
  http://antonymarcano.com/blog/2011/03/goals-tasks-action/
 Marcano, Antony:
  Acceptance tests are more A+S than T+G
  http://www.testingreflections.com/node/view/6704
 Peterson, David: Concordion – Hints and Tips
  http://www.concordion.org/Technique.html
 Peterson, David: Story Delivery Lifecycle
  http://www.concordion.org/memo/StoryDeliveryLifecycle.pdf
 Peterson, David: What do I mean by a „Scripting DSL“?
  http://blog.davidpeterson.co.uk/2008/02/what-do-i-mean-by-
  scripting-dsl.html

             ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 59
Referenzen
 Pryce, Nat:
  Test Data Builders: an alternative to the Object Mother pattern
  http://nat.truemesh.com/archives/000714.html
 Schrantz, Thomas: UI Automation: Tricks and Traps
  http://www.mathpirate.net/log/2009/12/23/ui-automation-tricks-and-
  traps
 Steward, Simon: Page Objects
  http://code.google.com/p/selenium/wiki/PageObjects
 Wiechmann, Robert et al.:
  ATDD kurz erklärt – Die richtigen Dinge entwickeln
  http://www.projekt-log.de/agile_softwareentwicklung/atdd-in-a-
  nutshell/



              ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 60
Referenzen
 Concordion: http://www.concordion.org/
   Logging Tooltip Extension
    http://www.concordion.org/extensions/LoggingTooltipExtension.html
   Screenshot Extension
    http://www.concordion.org/extensions/ScreenshotExtension.html

 WebDriver: http://seleniumhq.org/docs/03_webdriver.html


 Make It Easy: http://code.google.com/p/make-it-easy/
 Hamcrest: http://www.code.google.com/p/hamcrest/
 Window Licker http://code.google.com/p/windowlicker/



              ATDD mit Concordion und WebDriver        © OPITZ CONSULTING GmbH 2011   Seite 61
Kontakt
Torsten Müller
OPITZ CONSULTING Berlin GmbH
Tempelhoferweg 64
12347 Berlin-Britz
Telefon: +49 30 6298889-0
Telefax: +49 30 6298889-4600
E-Mail: info@opitz-consulting.com

Besuchen Sie uns im Internet:
www.opitz-consulting.com



            ATDD mit Concordion und WebDriver   © OPITZ CONSULTING GmbH 2011   Seite 62

Weitere ähnliche Inhalte

Andere mochten auch

Hospitality Awards 2011
Hospitality Awards 2011Hospitality Awards 2011
Hospitality Awards 2011Jose Rodrigues
 
Stypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimi
Stypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimiStypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimi
Stypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimiMartar160583
 
Uzun Hava Nedir?
Uzun Hava Nedir?Uzun Hava Nedir?
Uzun Hava Nedir?dilaybulut
 
Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇
Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇
Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇dilaybulut
 
Hardware compatibility list
Hardware compatibility listHardware compatibility list
Hardware compatibility listBrayan Echolovay
 
Cybersecurity-Serverless-Graph DB
Cybersecurity-Serverless-Graph DBCybersecurity-Serverless-Graph DB
Cybersecurity-Serverless-Graph DBSukumar Nayak
 
Güneş, dünya ve ay
Güneş, dünya ve ayGüneş, dünya ve ay
Güneş, dünya ve aycemile bartu
 
Mobile security-reference-architecture
Mobile security-reference-architectureMobile security-reference-architecture
Mobile security-reference-architectureVishal Sharma
 

Andere mochten auch (10)

Question 4
Question 4Question 4
Question 4
 
test
testtest
test
 
Hospitality Awards 2011
Hospitality Awards 2011Hospitality Awards 2011
Hospitality Awards 2011
 
Stypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimi
Stypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimiStypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimi
Stypendium na pokrycie kosztow kursow z zakresu zarzadzania zasobami ludzkimi
 
Uzun Hava Nedir?
Uzun Hava Nedir?Uzun Hava Nedir?
Uzun Hava Nedir?
 
Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇
Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇
Orhan Veli̇ Kanik ve Sabahatti̇n Ali̇
 
Hardware compatibility list
Hardware compatibility listHardware compatibility list
Hardware compatibility list
 
Cybersecurity-Serverless-Graph DB
Cybersecurity-Serverless-Graph DBCybersecurity-Serverless-Graph DB
Cybersecurity-Serverless-Graph DB
 
Güneş, dünya ve ay
Güneş, dünya ve ayGüneş, dünya ve ay
Güneş, dünya ve ay
 
Mobile security-reference-architecture
Mobile security-reference-architectureMobile security-reference-architecture
Mobile security-reference-architecture
 

Ähnlich wie ATDD mit Concordion und WebDriver - Berlin Expert Days - OPITZ CONSULTING - Torsten Müller

2014 borys neselovskyi_web_logic_server_auf_oda_praesentation
2014 borys neselovskyi_web_logic_server_auf_oda_praesentation2014 borys neselovskyi_web_logic_server_auf_oda_praesentation
2014 borys neselovskyi_web_logic_server_auf_oda_praesentationbneselov
 
WebLogic Server auf ODA: Erfahrungen aus einem Kundenprojekt
WebLogic Server auf ODA: Erfahrungen aus einem KundenprojektWebLogic Server auf ODA: Erfahrungen aus einem Kundenprojekt
WebLogic Server auf ODA: Erfahrungen aus einem KundenprojektOPITZ CONSULTING Deutschland
 
2012 borys neselovskyi_automatisierte_middleware_installation_praesentation
2012 borys neselovskyi_automatisierte_middleware_installation_praesentation2012 borys neselovskyi_automatisierte_middleware_installation_praesentation
2012 borys neselovskyi_automatisierte_middleware_installation_praesentationbneselov
 
Microsoft Azure in der Unternehmenspraxis
Microsoft Azure in der UnternehmenspraxisMicrosoft Azure in der Unternehmenspraxis
Microsoft Azure in der UnternehmenspraxisPOINT. Consulting GmbH
 
BootsFaces and AngularFaces - Modern HTML5 for JSF developers
BootsFaces and AngularFaces - Modern HTML5 for JSF developers BootsFaces and AngularFaces - Modern HTML5 for JSF developers
BootsFaces and AngularFaces - Modern HTML5 for JSF developers OPITZ CONSULTING Deutschland
 
Modern HTML5 for JSF Developers: BootsFaces and AngularFaces
Modern HTML5 for JSF Developers: BootsFaces and AngularFacesModern HTML5 for JSF Developers: BootsFaces and AngularFaces
Modern HTML5 for JSF Developers: BootsFaces and AngularFacesRiccardo Massera
 
Collaboration Manager - Projekträume effizient erstellen und verwalten
Collaboration Manager - Projekträume effizient erstellen und verwaltenCollaboration Manager - Projekträume effizient erstellen und verwalten
Collaboration Manager - Projekträume effizient erstellen und verwaltenIOZ AG
 
Testing einer Angular App
Testing einer Angular AppTesting einer Angular App
Testing einer Angular AppFlorian Bader
 
Automatisierung im DWH - Sich das Leben erleichern mit dem ODI
Automatisierung im DWH - Sich das Leben erleichern mit dem ODIAutomatisierung im DWH - Sich das Leben erleichern mit dem ODI
Automatisierung im DWH - Sich das Leben erleichern mit dem ODIOPITZ CONSULTING Deutschland
 
A review of camunda bpm within freenet
A review of camunda bpm within freenet A review of camunda bpm within freenet
A review of camunda bpm within freenet camunda services GmbH
 
Der Weg von API First zur Cloud Initiative
Der Weg von API First zur Cloud InitiativeDer Weg von API First zur Cloud Initiative
Der Weg von API First zur Cloud InitiativeMichael Frembs
 
Hybride Mobile Apps entwickeln mit AngularJS und Ionic
Hybride Mobile Apps entwickeln mit AngularJS und Ionic Hybride Mobile Apps entwickeln mit AngularJS und Ionic
Hybride Mobile Apps entwickeln mit AngularJS und Ionic OPITZ CONSULTING Deutschland
 
Wünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiert
Wünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiertWünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiert
Wünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiertWünsch AG
 
Hiroaki Katanopres REConf2012 Visure Solutions
Hiroaki Katanopres REConf2012   Visure SolutionsHiroaki Katanopres REConf2012   Visure Solutions
Hiroaki Katanopres REConf2012 Visure SolutionsVisure Solutions
 
Architektur agiles vorgehen seacon 2013
Architektur agiles vorgehen seacon 2013Architektur agiles vorgehen seacon 2013
Architektur agiles vorgehen seacon 2013Ralf Sigmund
 
C1 SetCon Cloud Performance
C1 SetCon Cloud PerformanceC1 SetCon Cloud Performance
C1 SetCon Cloud PerformanceMarc Rieger
 

Ähnlich wie ATDD mit Concordion und WebDriver - Berlin Expert Days - OPITZ CONSULTING - Torsten Müller (20)

2014 borys neselovskyi_web_logic_server_auf_oda_praesentation
2014 borys neselovskyi_web_logic_server_auf_oda_praesentation2014 borys neselovskyi_web_logic_server_auf_oda_praesentation
2014 borys neselovskyi_web_logic_server_auf_oda_praesentation
 
WebLogic Server auf ODA: Erfahrungen aus einem Kundenprojekt
WebLogic Server auf ODA: Erfahrungen aus einem KundenprojektWebLogic Server auf ODA: Erfahrungen aus einem Kundenprojekt
WebLogic Server auf ODA: Erfahrungen aus einem Kundenprojekt
 
2012 borys neselovskyi_automatisierte_middleware_installation_praesentation
2012 borys neselovskyi_automatisierte_middleware_installation_praesentation2012 borys neselovskyi_automatisierte_middleware_installation_praesentation
2012 borys neselovskyi_automatisierte_middleware_installation_praesentation
 
Oracle forms goes docker
Oracle forms goes dockerOracle forms goes docker
Oracle forms goes docker
 
Microsoft Azure in der Unternehmenspraxis
Microsoft Azure in der UnternehmenspraxisMicrosoft Azure in der Unternehmenspraxis
Microsoft Azure in der Unternehmenspraxis
 
Automatisierte Oracle Middleware Installation
Automatisierte Oracle Middleware InstallationAutomatisierte Oracle Middleware Installation
Automatisierte Oracle Middleware Installation
 
BootsFaces and AngularFaces - Modern HTML5 for JSF developers
BootsFaces and AngularFaces - Modern HTML5 for JSF developers BootsFaces and AngularFaces - Modern HTML5 for JSF developers
BootsFaces and AngularFaces - Modern HTML5 for JSF developers
 
Modern HTML5 for JSF Developers: BootsFaces and AngularFaces
Modern HTML5 for JSF Developers: BootsFaces and AngularFacesModern HTML5 for JSF Developers: BootsFaces and AngularFaces
Modern HTML5 for JSF Developers: BootsFaces and AngularFaces
 
Collaboration Manager - Projekträume effizient erstellen und verwalten
Collaboration Manager - Projekträume effizient erstellen und verwaltenCollaboration Manager - Projekträume effizient erstellen und verwalten
Collaboration Manager - Projekträume effizient erstellen und verwalten
 
Testing einer Angular App
Testing einer Angular AppTesting einer Angular App
Testing einer Angular App
 
Automatisierung im DWH - Sich das Leben erleichern mit dem ODI
Automatisierung im DWH - Sich das Leben erleichern mit dem ODIAutomatisierung im DWH - Sich das Leben erleichern mit dem ODI
Automatisierung im DWH - Sich das Leben erleichern mit dem ODI
 
A review of camunda bpm within freenet
A review of camunda bpm within freenet A review of camunda bpm within freenet
A review of camunda bpm within freenet
 
Der Weg von API First zur Cloud Initiative
Der Weg von API First zur Cloud InitiativeDer Weg von API First zur Cloud Initiative
Der Weg von API First zur Cloud Initiative
 
Analytics as a Service - Microsoft Azure
Analytics as a Service  - Microsoft Azure Analytics as a Service  - Microsoft Azure
Analytics as a Service - Microsoft Azure
 
Hybride Mobile Apps entwickeln mit AngularJS und Ionic
Hybride Mobile Apps entwickeln mit AngularJS und Ionic Hybride Mobile Apps entwickeln mit AngularJS und Ionic
Hybride Mobile Apps entwickeln mit AngularJS und Ionic
 
Wünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiert
Wünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiertWünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiert
Wünsch AG Vortrag mit der App ins Web oder wie man Notes modernisiert
 
Apex meets Docker
Apex meets DockerApex meets Docker
Apex meets Docker
 
Hiroaki Katanopres REConf2012 Visure Solutions
Hiroaki Katanopres REConf2012   Visure SolutionsHiroaki Katanopres REConf2012   Visure Solutions
Hiroaki Katanopres REConf2012 Visure Solutions
 
Architektur agiles vorgehen seacon 2013
Architektur agiles vorgehen seacon 2013Architektur agiles vorgehen seacon 2013
Architektur agiles vorgehen seacon 2013
 
C1 SetCon Cloud Performance
C1 SetCon Cloud PerformanceC1 SetCon Cloud Performance
C1 SetCon Cloud Performance
 

Mehr von OPITZ CONSULTING Deutschland

Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"OPITZ CONSULTING Deutschland
 
OC|Webcast: Oracle Lizenzierung - Die größten Fallen in der Praxis
OC|Webcast: Oracle Lizenzierung - Die größten Fallen in der PraxisOC|Webcast: Oracle Lizenzierung - Die größten Fallen in der Praxis
OC|Webcast: Oracle Lizenzierung - Die größten Fallen in der PraxisOPITZ CONSULTING Deutschland
 
OC|Webcast: Oracle Lizenzierung - Virtualisierung und Cloud
OC|Webcast: Oracle Lizenzierung - Virtualisierung und CloudOC|Webcast: Oracle Lizenzierung - Virtualisierung und Cloud
OC|Webcast: Oracle Lizenzierung - Virtualisierung und CloudOPITZ CONSULTING Deutschland
 
OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!
OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!
OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!OPITZ CONSULTING Deutschland
 
OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...
OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...
OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...OPITZ CONSULTING Deutschland
 
OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...
OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...
OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...OPITZ CONSULTING Deutschland
 
OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?
OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?
OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?OPITZ CONSULTING Deutschland
 
OC|Weekly Talk - Digitales Coaching & Smart Sparring
OC|Weekly Talk - Digitales Coaching & Smart Sparring OC|Weekly Talk - Digitales Coaching & Smart Sparring
OC|Weekly Talk - Digitales Coaching & Smart Sparring OPITZ CONSULTING Deutschland
 
Effiziente Betriebsoptimierung durch Cloud Nutzung
Effiziente Betriebsoptimierung durch Cloud NutzungEffiziente Betriebsoptimierung durch Cloud Nutzung
Effiziente Betriebsoptimierung durch Cloud NutzungOPITZ CONSULTING Deutschland
 

Mehr von OPITZ CONSULTING Deutschland (20)

OC|Webcast: Grundlagen der Oracle Lizenzierung
OC|Webcast: Grundlagen der Oracle LizenzierungOC|Webcast: Grundlagen der Oracle Lizenzierung
OC|Webcast: Grundlagen der Oracle Lizenzierung
 
OC|Webcast "Java heute" vom 28.09.2021
OC|Webcast "Java heute" vom 28.09.2021OC|Webcast "Java heute" vom 28.09.2021
OC|Webcast "Java heute" vom 28.09.2021
 
OC|Webcast "Java heute" vom 24.08.2021
OC|Webcast "Java heute" vom 24.08.2021OC|Webcast "Java heute" vom 24.08.2021
OC|Webcast "Java heute" vom 24.08.2021
 
OC|Webcast "Daten wirklich nutzen"
OC|Webcast "Daten wirklich nutzen"OC|Webcast "Daten wirklich nutzen"
OC|Webcast "Daten wirklich nutzen"
 
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
 
OC|Webcast "Willkommen in der Cloud!"
OC|Webcast "Willkommen in der Cloud!"OC|Webcast "Willkommen in der Cloud!"
OC|Webcast "Willkommen in der Cloud!"
 
OC|Webcast "Die neue Welt der Virtualisierung"
OC|Webcast "Die neue Welt der Virtualisierung"OC|Webcast "Die neue Welt der Virtualisierung"
OC|Webcast "Die neue Welt der Virtualisierung"
 
10 Thesen zur professionellen Softwareentwicklung
10 Thesen zur professionellen Softwareentwicklung10 Thesen zur professionellen Softwareentwicklung
10 Thesen zur professionellen Softwareentwicklung
 
OC|Webcast: Oracle Lizenzierung - Lizenznews 2021
OC|Webcast: Oracle Lizenzierung - Lizenznews 2021OC|Webcast: Oracle Lizenzierung - Lizenznews 2021
OC|Webcast: Oracle Lizenzierung - Lizenznews 2021
 
OC|Webcast: Oracle Lizenzierung - Die größten Fallen in der Praxis
OC|Webcast: Oracle Lizenzierung - Die größten Fallen in der PraxisOC|Webcast: Oracle Lizenzierung - Die größten Fallen in der Praxis
OC|Webcast: Oracle Lizenzierung - Die größten Fallen in der Praxis
 
OC|Webcast: Oracle Lizenzierung - Virtualisierung und Cloud
OC|Webcast: Oracle Lizenzierung - Virtualisierung und CloudOC|Webcast: Oracle Lizenzierung - Virtualisierung und Cloud
OC|Webcast: Oracle Lizenzierung - Virtualisierung und Cloud
 
OC|Webcast: Grundlagen der Oracle-Lizenzierung
OC|Webcast: Grundlagen der Oracle-LizenzierungOC|Webcast: Grundlagen der Oracle-Lizenzierung
OC|Webcast: Grundlagen der Oracle-Lizenzierung
 
OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!
OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!
OC|Weekly Talk: Inspect’n’Adapt – Make Change come true!
 
OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...
OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...
OC|Webcast: Schnell und clever in die AWS Cloud – Migrationsszenarien und Han...
 
OC|Weekly Talk The Power of DevOps…
OC|Weekly Talk  The Power of DevOps…OC|Weekly Talk  The Power of DevOps…
OC|Weekly Talk The Power of DevOps…
 
OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...
OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...
OC|Weekly Talk: "Das müsste man mal digitalisieren" - Mit Low-Code schnell zu...
 
OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?
OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?
OC|Weekly Talk: Service Management – Was hat sich durch Corona geändert?
 
OC|Weekly Talk - Digitales Coaching & Smart Sparring
OC|Weekly Talk - Digitales Coaching & Smart Sparring OC|Weekly Talk - Digitales Coaching & Smart Sparring
OC|Weekly Talk - Digitales Coaching & Smart Sparring
 
OC|Weekly Talk - Beratung remote
OC|Weekly Talk - Beratung remoteOC|Weekly Talk - Beratung remote
OC|Weekly Talk - Beratung remote
 
Effiziente Betriebsoptimierung durch Cloud Nutzung
Effiziente Betriebsoptimierung durch Cloud NutzungEffiziente Betriebsoptimierung durch Cloud Nutzung
Effiziente Betriebsoptimierung durch Cloud Nutzung
 

ATDD mit Concordion und WebDriver - Berlin Expert Days - OPITZ CONSULTING - Torsten Müller

  • 1. ATDD mit Concordion und WebDriver ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 1
  • 2. ATDD mit Concordion und WebDriver Torsten Müller OPITZ CONSULTING Berlin GmbH www.opitz-consulting.com Berlin Expert Days, 07 April 2011 ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 2
  • 3. Einleitung “ATDD is hard work” “The complexity and effort of automating acceptance tests easily matches – and often outweighs – that of implementing the story itself.” JASON GORMAN: ANTWORT AUF BRIAN MARICK: BARRIERS TO ACCEPTANCE-TEST DRIVEN DESIGN http://www.exampler.com/blog/2008/08/19/barriers-to-acceptance-test-driven-design ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 3
  • 4. Agenda 1. Akzeptanztest-getriebene Entwicklung (ATDD) 2. Tools  Concordion  WebDriver 3. (Best?) Practices  WebDriver  Concordion  Test Automation ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 4
  • 5. Akzeptanztest-getriebene 1 Entwicklung (ATDD) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 5
  • 6. Begriffsdefinition Entwicklungspraxis, in der die funktionalen Anforderungen (Akzeptanzkriterien) einer User Story als konkrete und automatisierbare (praxisrelevante) Beispiele vor der eigentlichen Entwicklung der Story selber geschrieben werden. WIECHMANN ET AL.: ATDD KURZ ERKLÄRT – DIE RICHTIGEN DINGE ENTWICKELN http://www.projekt-log.de/agile_softwareentwicklung/atdd-in-a-nutshell/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 6
  • 7. Gegenstand „Specification by Example“ „Example Driven Development“ GOJKO ADZIC: SPECIFYING WITH EXAMPLES http://gojko.net/2008/11/04/specifying-with-examples/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 7
  • 8. Prozess DAVID PETERSON: STORY DELIVERY LIFECYCLE http://www.concordion.org/memo/StoryDeliveryLifecycle.pdf ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 8
  • 9. Abgrenzung: ATDD und Abnahmetests Abnahmetest oder auch User-Akzeptanztest (UAT)  Fokus: Test der gelieferten Software durch den Kunden bzw. Auftraggeber  Ziel: Abnahme der Software Akzeptanztest-getriebene Entwicklung  Fokus: Kommunikation zwischen Product Owner und Entwicklungsteam  Ziel: Entwicklung der „richtigen“ Software ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 9
  • 10. Abgrenzung: ATDD und TDD LASSE KOSKELA: ACCEPTANCE TDD EXPLAINED http://www.methodsandtools.com/archive/archive.php?id=72 ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 10
  • 11. Anwendungsbereiche NIGEL CHARMAN: WHAT TYPES OF APPLICATION CAN I TEST WITH CONCORDION? http://tutansblog.blogspot.com/2009/06/what-types-of-application-can-i-test.html ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 11
  • 12. Automatisierung “Acceptance tests should run in an environment as close to the production environment as possible.” ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 12
  • 13. Tool-Einsatz Concordion WebDriver ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 13
  • 14. 2 Tools ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 14
  • 15. 2.1 Concordion ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 15
  • 16. Concordion “Lets you write business tests that don't assume a particular implementation.” PROJECT WEBSITE http://www.concordion.org/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 16
  • 17. Funktionsweise PROJECT WEBSITE http://www.concordion.org/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 17
  • 18. Funktionsweise PROJECT WEBSITE http://www.concordion.org/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 18
  • 19. Beispiel – Spezifikation ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 19
  • 20. Beispiel – Instrumentierung ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 20
  • 21. Beispiel – Fixture ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 21
  • 22. Beispiel – JUnit-Integration ConcordionRunner ConcordionBuilder ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 22
  • 23. Erweiterungen: Screenshot Extension Screenshot Extension  attach screenshots to help diagnose test failures  add screenshots to the output for documentation purposes ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 23
  • 24. Erweiterungen: Logging Tooltip Extension Logging Tooltip Extension  provide more insight into what the tests are actually doing ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 24
  • 25. 2.2 WebDriver ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 25
  • 26. WebDriver “WebDriver is a tool for automating testing web applications, and in particular to verify that they work as expected.” “It aims to provide a friendly API that’s easy to explore and understand, which will help make your tests easier to read and maintain.” PROJECT WEBSITE http://seleniumhq.org/docs/03_webdriver.html ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 26
  • 27. Beispiel ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 27
  • 28. 3 (Best?) Practices ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 28
  • 29. 3.1 WebDriver ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 29
  • 30. WebDriver Practices Name Everything Waiting, Waiting, Waiting… Turn UI Testing into API Testing Always Have A Plan B. And A Plan C. (And D…) Take Screenshots If Something Goes Wrong Use Diagnostic Logging THOMAS SCHRANTZ: UI AUTOMATION: TRICKS AND TRAPS http://www.mathpirate.net/log/2009/12/23/ui-automation-tricks-and-traps/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 30
  • 31. „Name Everything” ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 31
  • 32. „Waiting, Waiting, Waiting …” ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 32
  • 33. „Waiting, Waiting, Waiting …” ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 33
  • 34. „Waiting, Waiting, Waiting …” Window Licker (http://code.google.com/p/windowlicker/) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 34
  • 35. „Turn UI Testing into API Testing” Introduce Page and (optional) Site Objects ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 35
  • 36. „Turn UI Testing into API Testing”: Page Objects SIMON STEWARD: PAGE OBJECTS http://code.google.com/p/selenium/wiki/PageObjects ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 36
  • 37. „Turn UI Testing into API Testing”: Page Objects Hide low level implementation details Methods represent the services that the page offers loginPage.loginAs(String user, String credentials); searchPage.searchFor(String query); Methods return other page objects SearchResultsPage resultsPage = searchPage.searchFor(String query); Different results for the same action are modeled as different methods RefineSearchPage refineSearchPage = searchPage.searchForButExpectNoMatches(String query); ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 37
  • 38. Page Objects: WebDriver Support PageFactory (Package org.openqa.selenium.support) LoadableComponent & SlowLoadableComponent (Package org.openqa.selenium.support.ui) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 38
  • 39. „Always Have A Plan B. And A Plan C.” JavascriptExecutor (Package org.openqa.selenium) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 39
  • 40. „Take Screenshots” TakesScreenshot (Package org.openqa.selenium) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 40
  • 41. „Diagnostic Logging” EventFiringWebDriver & WebDriverEventListener (Package org.openqa.selenium.support.events) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 41
  • 42. 3.2 Concordion ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 42
  • 43. Concordion Practices “The closer your acceptance tests are to the business rules, the more stable they are.” GOJKO ADZIC: HOW TO IMPLEMENT UI TESTING WITHOUT SHOOTING YOURSELF IN THE FOOT http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/ DAVID PETERSON: CONCORDION – HINTS AND TIPS http://www.concordion.org/Technique.html ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 43
  • 44. Concordion Practices Think Given-When-Then Write Specifications, not Scripts Use S.M.A.R.T. Examples Think in Goals, Tasks and Actions Evolve a Scripting DSL DAVID PETERSON: CONCORDION – HINTS AND TIPS http://www.concordion.org/Technique.html ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 44
  • 45. „Think Given-When-Then“ Scenario: <A scenario specific goal> GIVEN <something that needs to have happened or be true> WHEN <some task I must do> THEN <some way I know I've achieved my goal> ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 45
  • 46. „Write Specifications, not Scripts“ Scenario: Search for the Concordion homepage Given I am at http://google.com When I enter "concordion" into the search field and click "Search" Then the top result should say "Concordion” Better Scenario: Search for the Concordion homepage When I search for "concordion" Then the top result should say "Concordion" ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 46
  • 47. „Use S.M.A.R.T. Examples“ SPECIFIC  Examples are explicitly defined and definite. MEASURABLE  The result is observable and quantifiable. ACHIEVABLE  Examples describe a realistic scenario. RELEVANT  Examples are related to the particular story. TIME-BOUND  The result can be observed in a defined Time. NARESH JAIN: ACCEPTANCE TEST DRIVEN DEVELOPMENT http://www.slideshare.net/nashjain/acceptance-test-driven-development-350264 ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 47
  • 48. „Think in Goals, Tasks and Actions“ GOAL: What we’re trying to achieve which has one or more… TASKS: The high-level work-item that we complete to fulfill the goal, each having one or more… ACTIONS: The specific steps or interactions we execute to complete the task. GOALS, TASKS  Spezifikation ACTIONS  Fixture MARCANO, ANTONY: A BIT OF UCD FOR BDD & ATDD: GOALS -> TASKS -> ACTIONS http://antonymarcano.com/blog/2011/03/goals-tasks-action/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 48
  • 49. „Evolve a Scripting DSL“ DAVID PETERSON: WHAT DO I MEAN BY A „SCRIPTING DSL“? http://blog.davidpeterson.co.uk/2008/02/what-do-i-mean-by-scripting-dsl.html ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 49
  • 50. „Evolve a Scripting DSL“ GIVEN  Encapsulate test data creation  Object Mother, Test Data Builder  Make It Easy (http://code.google.com/p/make-it-easy/) WHEN  Turn UI Testing into API Testing  Page Objects (http://code.google.com/p/selenium/wiki/PageObjects) THEN  Encapsulate Assertions  Hamcrest (http://www.code.google.com/p/hamcrest/) ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 50
  • 51. 3.3 Test Automation ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 51
  • 52. Test Automation VEGARD HARTMANN: SUCCEEDING WITH WEBTESTING USING WEBDRIVER http://open.bekk.no/wp-content/uploads/2010/03/succeeding-with-webtesting-using-webdriver.pdf ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 52
  • 53. Test Automation Practices Use Independent Tests Cleanup, Setup, Test, Teardown Use Non-Production code for Setup/Teardown Don't rely on external systems that you don't control Provide Feedback If Something Goes Wrong NARESH JAIN: PATTERNS AND ANTI-PATTERNS: ACCEPTANCE TESTING WITH FITNESSE http://blogs.agilefaqs.com/2007/08/25/patterns-and-anti-patterns-acceptance-testing-with-fitnesse/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 53
  • 54. Fragen und Antworten ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 54
  • 55. Referenzen ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 55
  • 56. Referenzen  Adzic, Gojko: Bridging the Communication Gap: Specification by Example and Agile Acceptance Testing London : Neuri Limited; 2009. ISBN 978-0955683619  Freeman, Steve; Pryce Nat: Growing Object-Oriented Software, Guided by Tests Amsterdam : Addison-Wesley Longman; 2009. ISBN 978-0321503626 ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 56
  • 57. Referenzen  Adzic, Gojko: How to implement UI testing without shooting yourself in the foot http://gojko.net/2010/04/13/how-to-implement-ui-testing-without- shooting-yourself-in-the-foot-2/  Adzic, Gojko: Specifying With Examples http://gojko.net/2008/11/04/specifying-with-examples/  Charman, Nigel: What types of application can I test with Concordion? http://tutansblog.blogspot.com/2009/06/what-types-of-application- can-i-test.html  Gorman, Jason: Antwort auf Marick, Brian: Barriers to acceptance-test driven design http://www.exampler.com/blog/2008/08/19/barriers-to-acceptance- test-driven-design ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 57
  • 58. Referenzen  Hartmann, Vegard: Succeeding with webtesting – Using WebDriver http://open.bekk.no/wp-content/uploads/2010/03/succeeding-with- webtesting-using-webdriver.pdf  Jain, Naresh: Acceptance Test Driven Development http://www.slideshare.net/nashjain/acceptance-test-driven- development-350264  Jain, Naresh: Patterns and Anti-Patterns: Acceptance Testing with FitNesse http://blogs.agilefaqs.com/2007/08/25/patterns-and-anti-patterns- acceptance-testing-with-fitnesse  Koskela, Lasse : Acceptance TDD Explained http://www.methodsandtools.com/archive/archive.php?id=72 ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 58
  • 59. Referenzen  Marcano, Antony: A bit of UCD for BDD & ATDD: Goals -> Tasks -> Actions http://antonymarcano.com/blog/2011/03/goals-tasks-action/  Marcano, Antony: Acceptance tests are more A+S than T+G http://www.testingreflections.com/node/view/6704  Peterson, David: Concordion – Hints and Tips http://www.concordion.org/Technique.html  Peterson, David: Story Delivery Lifecycle http://www.concordion.org/memo/StoryDeliveryLifecycle.pdf  Peterson, David: What do I mean by a „Scripting DSL“? http://blog.davidpeterson.co.uk/2008/02/what-do-i-mean-by- scripting-dsl.html ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 59
  • 60. Referenzen  Pryce, Nat: Test Data Builders: an alternative to the Object Mother pattern http://nat.truemesh.com/archives/000714.html  Schrantz, Thomas: UI Automation: Tricks and Traps http://www.mathpirate.net/log/2009/12/23/ui-automation-tricks-and- traps  Steward, Simon: Page Objects http://code.google.com/p/selenium/wiki/PageObjects  Wiechmann, Robert et al.: ATDD kurz erklärt – Die richtigen Dinge entwickeln http://www.projekt-log.de/agile_softwareentwicklung/atdd-in-a- nutshell/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 60
  • 61. Referenzen  Concordion: http://www.concordion.org/  Logging Tooltip Extension http://www.concordion.org/extensions/LoggingTooltipExtension.html  Screenshot Extension http://www.concordion.org/extensions/ScreenshotExtension.html  WebDriver: http://seleniumhq.org/docs/03_webdriver.html  Make It Easy: http://code.google.com/p/make-it-easy/  Hamcrest: http://www.code.google.com/p/hamcrest/  Window Licker http://code.google.com/p/windowlicker/ ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 61
  • 62. Kontakt Torsten Müller OPITZ CONSULTING Berlin GmbH Tempelhoferweg 64 12347 Berlin-Britz Telefon: +49 30 6298889-0 Telefax: +49 30 6298889-4600 E-Mail: info@opitz-consulting.com Besuchen Sie uns im Internet: www.opitz-consulting.com ATDD mit Concordion und WebDriver © OPITZ CONSULTING GmbH 2011 Seite 62