SlideShare a Scribd company logo
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

More Related Content

Viewers also liked

BDD training v5.0.1
BDD training  v5.0.1BDD training  v5.0.1
BDD training v5.0.1
Arnauld Loyer
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
Amanda Burma
 
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)
Anand Bagmar
 
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
Rabble .
 
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...
FalafelSoftware
 
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
Conor Sheehan
 
Effective Testing using Behavior-Driven Development
Effective Testing using Behavior-Driven DevelopmentEffective Testing using Behavior-Driven Development
Effective Testing using Behavior-Driven Development
Alexander Kress
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
Abhimanyu Singhal
 
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
 
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...
Bastian Seehaus
 
Calabash
CalabashCalabash
Calabash
Panji Gautama
 
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 Testing of Web Services
Behavior Driven Testing of Web ServicesBehavior Driven Testing of Web Services
Behavior Driven Testing of Web Services
Surya Sreedevi Vedula
 
Behavior Driven Development with Rails
Behavior Driven Development with RailsBehavior Driven Development with Rails
Behavior Driven Development with Rails
Mark Menard
 
Behavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shiftBehavior Driven Testing - A paradigm shift
Behavior Driven Testing - A paradigm shift
Aspire Systems
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
ShraddhaSF
 
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...
Eric DeLabar
 
[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)
Cellenza
 
Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)
Dignitas Digital Pvt. Ltd.
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
Reginald Stadlbauer
 

Viewers also liked (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
 

Similar to Behavior driven development

Introduction to Ext JS 4
Introduction to Ext JS 4Introduction to Ext JS 4
Introduction to Ext JS 4
TEQneers GmbH & Co. KG
 
Introduction to Ext JS 4
Introduction to Ext JS 4Introduction to Ext JS 4
Introduction to Ext JS 4
Stefan Gehrig
 
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
Dynatrace
 
Gw Pres Agile 4slideshare
Gw Pres Agile 4slideshareGw Pres Agile 4slideshare
Gw Pres Agile 4slideshare
Dave Burke
 
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
Chris Sterling
 
Releasemanagement in integration projects
Releasemanagement in integration projectsReleasemanagement in integration projects
Releasemanagement in integration projects
Sven Bernhardt
 
Selecting SaaS providers
Selecting SaaS providersSelecting SaaS providers
Selecting SaaS providers
Dennis Howlett
 
Product Development
Product DevelopmentProduct Development
Product Development
MaRS Discovery District
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
Jim Lynch
 
The Groop Welcome Kit Sample
The Groop Welcome Kit SampleThe Groop Welcome Kit Sample
The Groop Welcome Kit Sample
thegroop
 
Revitalizing CS Component Studio
Revitalizing CS Component StudioRevitalizing CS Component Studio
Revitalizing CS Component Studio
ESUG
 
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...
mCloud
 
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...
Compuware APM
 
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
Marcus Merrell
 
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
Cambridge Product Management Network
 
"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", ...
Fwdays
 
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
 
Enterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring BudgetEnterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring Budget
Chris Tankersley
 
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...
Aggregage
 
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...
Hannah Flynn
 

Similar to 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...
 

Recently uploaded

GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 

Recently uploaded (20)

GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 

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

Editor's Notes

  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