SlideShare une entreprise Scribd logo
1  sur  29
BDD
                         Behavior Driven Development in PHP




                                                                     Slide 1

TEQneers GmbH & Co. KG                                        www.teqneers.de
Development: back then and today
                                                          Slide 2

TEQneers GmbH & Co. KG                             www.teqneers.de
Dirty Hacking
                                                Slide 3

TEQneers GmbH & Co. KG                   www.teqneers.de
Dirty Hacking


             ‣ No documentation
             ‣ No testing
             ‣ No clue if it still working
             ‣ Maintenance doesn’t really matter
             ‣ Code changes are a lottery
             ‣ Easy refactoring impossible



                                                          Slide 4

TEQneers GmbH & Co. KG                             www.teqneers.de
Automated testing
                                                    Slide 5

TEQneers GmbH & Co. KG                       www.teqneers.de
Automated Testing

             ✓Verify code or results
             ✓Can be automated
             ✓Code first, add tests later


             ‣ Time gap between development and testing
             ‣ Test not based on original requirements
             ‣ Tests influenced by code


                                                                 Slide 6

TEQneers GmbH & Co. KG                                    www.teqneers.de
Test-Driven Development
                                                          Slide 7

TEQneers GmbH & Co. KG                             www.teqneers.de
Test-Driven Development




             ✓Tests follow your original requirements
             ✓Code is an easy solution to the problem
             ✓Tests for all code




                                                               Slide 8

TEQneers GmbH & Co. KG                                  www.teqneers.de
Test-Driven Development


             ‣ Write tests first, add code later
             ‣ Feels unnatural
             ‣ Tests written by developers
             ‣ Potential for over-design
             ‣ Customer unable to participate



                                                          Slide 9

TEQneers GmbH & Co. KG                             www.teqneers.de
Behavior-Driven Development
                                                              Slide 10

TEQneers GmbH & Co. KG                                 www.teqneers.de
Audience




        Customer
                                           Slide 11

TEQneers GmbH & Co. KG              www.teqneers.de
Audience




        Customer                    Tester
                                                    Slide 11

TEQneers GmbH & Co. KG                       www.teqneers.de
Audience




        Customer         Developer   Tester
                                                     Slide 11

TEQneers GmbH & Co. KG                        www.teqneers.de
In order to finish a purchase
                             we need to add VAT
                                 to the total.




        Customer                                    Developer   Tester
                                                                                Slide 12

TEQneers GmbH & Co. KG                                                   www.teqneers.de
<?php
                          foreach( $itemList as $item) {
                            $total += $item[price] * $item[quantity];
                          }
                          $total = $sum * 1.19;
                         ?>




        Customer                   Developer                            Tester
                                                                                        Slide 13

TEQneers GmbH & Co. KG                                                           www.teqneers.de
Take all items
                                             add them up
                                           multiply by VAT
                                     total should be sum + VAT




        Customer         Developer                       Tester
                                                                         Slide 14

TEQneers GmbH & Co. KG                                            www.teqneers.de
Translation




                                              Slide 15

TEQneers GmbH & Co. KG                 www.teqneers.de
Translation




                                              Slide 16

TEQneers GmbH & Co. KG                 www.teqneers.de
Goal


             ‣ Common language
                  ‣ Tester writing tests
                  ‣ Customer writing specs
                  ‣ Common dictionary
             ‣ Specs == Tests



                                                     Slide 17

TEQneers GmbH & Co. KG                        www.teqneers.de
Behavior-Driven Development

             ‣ Writing tests first in a customer friendly language
             ‣ Your tests are your specifications and your
               specifications are your tests
             ‣ Dan North: “BDD takes the position that you can
               turn an idea for a requirement into implemented,
               tested, production-ready code simply and
               effectively, as long as the requirement is specific
               enough that everyone knows what’s going on.”


                                                                           Slide 18

TEQneers GmbH & Co. KG                                              www.teqneers.de
Gherkin


             ‣ Feature: Generating an invoice
             ‣ Scenario: Calculating gross total in Germany
                  ‣ Given the customer is from Germany
                  ‣ And the net total is 100 EUR
                  ‣ When I calculate the gross total
                  ‣ Then the final invoice total should be 119 EUR



                                                                           Slide 19

TEQneers GmbH & Co. KG                                              www.teqneers.de
Gherkin Compatible BDD Frameworks


             ‣ Ruby: Cucumber
             ‣ Java: Cucumber-JVM
             ‣ .NET: IronRuby
             ‣ Erlangen: cucumberl
             ‣ PHP: Behat



                                                      Slide 20

TEQneers GmbH & Co. KG                         www.teqneers.de
Behat


             ‣ Extendable PHP BDD Framework
             ‣ Mink: browser testing (e.g. Selenium)
             ‣ Symfony2: integration layer
             ‣ Jira: bug tracker interface
             ‣ Gearman: distributed testing
             ‣ ...



                                                              Slide 21

TEQneers GmbH & Co. KG                                 www.teqneers.de
What’s testable in Behat?


             ‣ Business Intelligence/Models
             ‣ API’s
             ‣ Web Pages
             ‣ Single Scripts
             ‣ Server-Server-Interaction



                                                            Slide 22

TEQneers GmbH & Co. KG                               www.teqneers.de
How does it work?

                                                    Slide 23

TEQneers GmbH & Co. KG                       www.teqneers.de
What BDD is NOT


             ‣ No replacement for TDD
             ‣ Not a “real” spoken language
             ‣ Not a drop in solution
             ‣ Common language needs to be developed
             ‣ Developer still has to write glue code
             ‣ It’s not magic!



                                                               Slide 24

TEQneers GmbH & Co. KG                                  www.teqneers.de
Good Practice


        ‣ Get everyone on board
        ‣ Define common language and syntax
        ‣ Define test scope
        ‣ Build project specific testing environment
        ‣ Don’t expect perfect solution from start
        ‣ Don’t make it too complicated


                                                             Slide 25

TEQneers GmbH & Co. KG                                www.teqneers.de
Questions?

                                             Slide 26

TEQneers GmbH & Co. KG                www.teqneers.de
Thanks for listening



                         contact us if you have any questions

                                email: oliver@php.net

                             email: stefan@teqneers.de


                               Have Fun!
                                                                       Slide 27

TEQneers GmbH & Co. KG                                          www.teqneers.de

Contenu connexe

En vedette

Behavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behatBehavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behat
Andrei Jechiu
 
Behavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise ApplicationsBehavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise Applications
Bamdad Dashtban
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
Reginald Stadlbauer
 

En vedette (20)

BDD training v5.0.1
BDD training  v5.0.1BDD training  v5.0.1
BDD training v5.0.1
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 
Building the "right" regression suite using Behavior Driven Testing (BDT)
Building the "right" regression suite using Behavior Driven Testing (BDT)Building the "right" regression suite using Behavior Driven Testing (BDT)
Building the "right" regression suite using Behavior Driven Testing (BDT)
 
Beyond Testing: Specs and Behavior Driven Development
Beyond Testing: Specs and Behavior  Driven DevelopmentBeyond Testing: Specs and Behavior  Driven Development
Beyond Testing: Specs and Behavior Driven Development
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
 
Startup Institute: JS Testing & Behavior Driven Development
Startup Institute: JS Testing & Behavior Driven DevelopmentStartup Institute: JS Testing & Behavior Driven Development
Startup Institute: JS Testing & Behavior Driven Development
 
Effective Testing using Behavior-Driven Development
Effective Testing using Behavior-Driven DevelopmentEffective Testing using Behavior-Driven Development
Effective Testing using Behavior-Driven Development
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Behavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behatBehavior driven development. Testing drupal using behat
Behavior driven development. Testing drupal using behat
 
German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...German Testing Day 2015 - How behavior-driven development fuses developers an...
German Testing Day 2015 - How behavior-driven development fuses developers an...
 
Calabash
CalabashCalabash
Calabash
 
Behavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise ApplicationsBehavior Driven Testing for Multichannel Enterprise Applications
Behavior Driven Testing for Multichannel Enterprise Applications
 
Behavior Driven Testing of Web Services
Behavior Driven Testing of Web ServicesBehavior Driven Testing of Web Services
Behavior Driven Testing of Web Services
 
Behavior Driven Development with Rails
Behavior Driven Development with RailsBehavior Driven Development with Rails
Behavior Driven Development with Rails
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shift
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
 
Natural Language UI Testing using Behavior Driven Development with Pavlov and...
Natural Language UI Testing using Behavior Driven Development with Pavlov and...Natural Language UI Testing using Behavior Driven Development with Pavlov and...
Natural Language UI Testing using Behavior Driven Development with Pavlov and...
 
[Agile Testing Day] Behavior Driven Development (BDD)
[Agile Testing Day] Behavior Driven Development (BDD)[Agile Testing Day] Behavior Driven Development (BDD)
[Agile Testing Day] Behavior Driven Development (BDD)
 
Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 

Similaire à Behavior driven development

The Groop Welcome Kit Sample
The Groop Welcome Kit SampleThe Groop Welcome Kit Sample
The Groop Welcome Kit Sample
thegroop
 
Proceedit 20110308 Companys Short Presentation For Customers
Proceedit 20110308 Companys Short Presentation For CustomersProceedit 20110308 Companys Short Presentation For Customers
Proceedit 20110308 Companys Short Presentation For Customers
Josep Mª Cos i Riera
 

Similaire à Behavior driven development (20)

Introduction to Ext JS 4
Introduction to Ext JS 4Introduction to Ext JS 4
Introduction to Ext JS 4
 
Introduction to Ext JS 4
Introduction to Ext JS 4Introduction to Ext JS 4
Introduction to Ext JS 4
 
How to Better Manage Technical Debt While Innovating on DevOps
How to Better Manage Technical Debt While Innovating on DevOpsHow to Better Manage Technical Debt While Innovating on DevOps
How to Better Manage Technical Debt While Innovating on DevOps
 
Gw Pres Agile 4slideshare
Gw Pres Agile 4slideshareGw Pres Agile 4slideshare
Gw Pres Agile 4slideshare
 
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
 
Releasemanagement in integration projects
Releasemanagement in integration projectsReleasemanagement in integration projects
Releasemanagement in integration projects
 
Selecting SaaS providers
Selecting SaaS providersSelecting SaaS providers
Selecting SaaS providers
 
Product Development
Product DevelopmentProduct Development
Product Development
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
 
The Groop Welcome Kit Sample
The Groop Welcome Kit SampleThe Groop Welcome Kit Sample
The Groop Welcome Kit Sample
 
Revitalizing CS Component Studio
Revitalizing CS Component StudioRevitalizing CS Component Studio
Revitalizing CS Component Studio
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
 
Gomez / Universal Mind Webinar - Are You Ready? A New Approach for Ensuring Y...
Gomez / Universal Mind Webinar - Are You Ready? A New Approach for Ensuring Y...Gomez / Universal Mind Webinar - Are You Ready? A New Approach for Ensuring Y...
Gomez / Universal Mind Webinar - Are You Ready? A New Approach for Ensuring Y...
 
How, why, and the roi kcdc '21
How, why, and the roi  kcdc '21How, why, and the roi  kcdc '21
How, why, and the roi kcdc '21
 
What drives your company by elan lennard
What drives your company by elan lennardWhat drives your company by elan lennard
What drives your company by elan lennard
 
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ..."Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
 
Proceedit 20110308 Companys Short Presentation For Customers
Proceedit 20110308 Companys Short Presentation For CustomersProceedit 20110308 Companys Short Presentation For Customers
Proceedit 20110308 Companys Short Presentation For Customers
 
Enterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring BudgetEnterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring Budget
 
Create Success With Analytics: Living With Technical Debt - Balancing Quality...
Create Success With Analytics: Living With Technical Debt - Balancing Quality...Create Success With Analytics: Living With Technical Debt - Balancing Quality...
Create Success With Analytics: Living With Technical Debt - Balancing Quality...
 
Create Success With Analytics: Living With Technical Debt - Balancing Quality...
Create Success With Analytics: Living With Technical Debt - Balancing Quality...Create Success With Analytics: Living With Technical Debt - Balancing Quality...
Create Success With Analytics: Living With Technical Debt - Balancing Quality...
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Behavior driven development

  • 1. BDD Behavior Driven Development in PHP Slide 1 TEQneers GmbH & Co. KG www.teqneers.de
  • 2. Development: back then and today Slide 2 TEQneers GmbH & Co. KG www.teqneers.de
  • 3. Dirty Hacking Slide 3 TEQneers GmbH & Co. KG www.teqneers.de
  • 4. Dirty Hacking ‣ No documentation ‣ No testing ‣ No clue if it still working ‣ Maintenance doesn’t really matter ‣ Code changes are a lottery ‣ Easy refactoring impossible Slide 4 TEQneers GmbH & Co. KG www.teqneers.de
  • 5. Automated testing Slide 5 TEQneers GmbH & Co. KG www.teqneers.de
  • 6. Automated Testing ✓Verify code or results ✓Can be automated ✓Code first, add tests later ‣ Time gap between development and testing ‣ Test not based on original requirements ‣ Tests influenced by code Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 7. Test-Driven Development Slide 7 TEQneers GmbH & Co. KG www.teqneers.de
  • 8. Test-Driven Development ✓Tests follow your original requirements ✓Code is an easy solution to the problem ✓Tests for all code Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 9. Test-Driven Development ‣ Write tests first, add code later ‣ Feels unnatural ‣ Tests written by developers ‣ Potential for over-design ‣ Customer unable to participate Slide 9 TEQneers GmbH & Co. KG www.teqneers.de
  • 10. Behavior-Driven Development Slide 10 TEQneers GmbH & Co. KG www.teqneers.de
  • 11. Audience Customer Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 12. Audience Customer Tester Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 13. Audience Customer Developer Tester Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 14. In order to finish a purchase we need to add VAT to the total. Customer Developer Tester Slide 12 TEQneers GmbH & Co. KG www.teqneers.de
  • 15. <?php foreach( $itemList as $item) { $total += $item[price] * $item[quantity]; } $total = $sum * 1.19; ?> Customer Developer Tester Slide 13 TEQneers GmbH & Co. KG www.teqneers.de
  • 16. Take all items add them up multiply by VAT total should be sum + VAT Customer Developer Tester Slide 14 TEQneers GmbH & Co. KG www.teqneers.de
  • 17. Translation Slide 15 TEQneers GmbH & Co. KG www.teqneers.de
  • 18. Translation Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 19. Goal ‣ Common language ‣ Tester writing tests ‣ Customer writing specs ‣ Common dictionary ‣ Specs == Tests Slide 17 TEQneers GmbH & Co. KG www.teqneers.de
  • 20. Behavior-Driven Development ‣ Writing tests first in a customer friendly language ‣ Your tests are your specifications and your specifications are your tests ‣ Dan North: “BDD takes the position that you can turn an idea for a requirement into implemented, tested, production-ready code simply and effectively, as long as the requirement is specific enough that everyone knows what’s going on.” Slide 18 TEQneers GmbH & Co. KG www.teqneers.de
  • 21. Gherkin ‣ Feature: Generating an invoice ‣ Scenario: Calculating gross total in Germany ‣ Given the customer is from Germany ‣ And the net total is 100 EUR ‣ When I calculate the gross total ‣ Then the final invoice total should be 119 EUR Slide 19 TEQneers GmbH & Co. KG www.teqneers.de
  • 22. Gherkin Compatible BDD Frameworks ‣ Ruby: Cucumber ‣ Java: Cucumber-JVM ‣ .NET: IronRuby ‣ Erlangen: cucumberl ‣ PHP: Behat Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 23. Behat ‣ Extendable PHP BDD Framework ‣ Mink: browser testing (e.g. Selenium) ‣ Symfony2: integration layer ‣ Jira: bug tracker interface ‣ Gearman: distributed testing ‣ ... Slide 21 TEQneers GmbH & Co. KG www.teqneers.de
  • 24. What’s testable in Behat? ‣ Business Intelligence/Models ‣ API’s ‣ Web Pages ‣ Single Scripts ‣ Server-Server-Interaction Slide 22 TEQneers GmbH & Co. KG www.teqneers.de
  • 25. How does it work? Slide 23 TEQneers GmbH & Co. KG www.teqneers.de
  • 26. What BDD is NOT ‣ No replacement for TDD ‣ Not a “real” spoken language ‣ Not a drop in solution ‣ Common language needs to be developed ‣ Developer still has to write glue code ‣ It’s not magic! Slide 24 TEQneers GmbH & Co. KG www.teqneers.de
  • 27. Good Practice ‣ Get everyone on board ‣ Define common language and syntax ‣ Define test scope ‣ Build project specific testing environment ‣ Don’t expect perfect solution from start ‣ Don’t make it too complicated Slide 25 TEQneers GmbH & Co. KG www.teqneers.de
  • 28. Questions? Slide 26 TEQneers GmbH & Co. KG www.teqneers.de
  • 29. Thanks for listening contact us if you have any questions email: oliver@php.net email: stefan@teqneers.de Have Fun! Slide 27 TEQneers GmbH & Co. KG www.teqneers.de

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. No extra code, not needed\n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. http://dannorth.net/whats-in-a-story/\n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. extension to TDD\nNatural language=more dynamic syntax (e.g. plural)\n\n
  26. Syntax: I -&gt; We, Uppercase, Tense, ...\nTest scope: API, GUI, Backend only, ...\nEnvironment: DB restore strategies, ...\nToo complicated = tests have to be tested\n
  27. \n
  28. \n