SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
Business Selectors
                Extension For



Thursday, 18 October 12
Ben Waine



Thursday, 18 October 12
BDD Workflow In Large Organisations


                             Business Analyst   Designers

                                 Tester

                                Developer

                                 Tester

                             Business Analyst

Thursday, 18 October 12
BDD Workflow In Large Organisations

                          Business Analyst     Designers



                                     Tester
 Concepts

 Implementation




                                   Developer

Thursday, 18 October 12
Example Steps Shipped With Mink Extension

          Scenario: Searching for a page that does exist
            Given I am on "/wiki/Main_Page"
            When I fill in "search" with "Behavior Driven Development"
            And I press "searchButton"
            Then I should see "agile software development"




     When /^(?:|I )fill in "(?P<field>(?:[^"]|")*)" with "(?P<value>(?:[^"]|")*)"$/

     When /^(?:|I )press "(?P<button>(?:[^"]|")*)"$/




Thursday, 18 October 12
Problems Encountered At Sky / Orange

   • Mink requires implementation details
   • Test teams with no PHP skills
   • Difficulty identifying elements on the page using Mink
   Extension




Thursday, 18 October 12
Business Selectors



Thursday, 18 October 12
Example
            test.feature
            Given I go to the page "Home Page"
            When I follow the link "Add Subscription"
            And I fill in the "first name box" field with "ben"
            Then the "first name box" form field should contain "ben"
            And I press the "test" button
            And the "Widget" should contain "Area One Text"

           selectors.yml

            Add Subscription: "a.self-link"
            first name box: "form#name_form
            input[name=first_name]"
            test: "form#name_form input[name=submit]"
            Widget: div#user_widget


           urls.yml
           Home Page: "/"
           Element Page: "/element.html"



Thursday, 18 October 12
Steps Shipped With Business Selector Extension
 Given I go to the page "<PAGE NAME>"
 When I follow the link "<LINK>"
 When I click the "<CLICKABLE ELEMENT>"
 When I press the "<BUTTON>" button
 When I fill in the "<TEXT INPUT>" field with "value"
 When the "<TEXT INPUT>" form field should not contain "value"
 When I select "value" from the "<SELECT OR MULTISELECT>" selector
 When I additionally select "value" from the "<MULTISELECT>" selector
 When I check the "<CHECKBOX>" checkbox
 When I uncheck the "<CHECKBOX>" checkbox
 When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe
 When I refocus on the primary page
 When I hover over "<PAGE ELEMENT>"
 When I wait for the "<PAGE ELEMENT>" component to [dis]appear
 Then the "<PAGE ELEMENT>" should contain "value"
 Then the "<PAGE ELEMENT>" should not contain "value"
 Then I should see "<PAGE ELEMENT>" component
 Then I should not see "<PAGE ELEMENT>" component
 Then "<PAGE ELEMENT>" should contain "<PAGE ELEMENT>"
 Then "<PAGE ELEMENT>" should not contain "<PAGE ELEMENT>"
 Then the "<CHECKBOX>" should be checked
 Then the "<CHECKBOX>" should not be checked
 Then the "<TEXT INPUT>" form field should contain "value"
Thursday, 18 October 12
Some Extra Steps Dealing With Common Tasks
         When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe
         When I refocus on the primary page

         Given I attach <FILEPATH> to <PAGEELEMENT>

         When I wait for the "<PAGE ELEMENT>" component to [dis]appear




Thursday, 18 October 12
Extension Configuration
    default:
        context:
             parameters:
                 javascript_session: selenium
                 browser: firefox
                 show_cmd: open %s
        extensions:
             OrangeDigitalBusinessSelectorExtensionExtension:
               urlFilePath: urls.yml
               selectorFilePath: selectors.yml
               assetPath: path
               timeout: 30
               contexts:
                 UIBusinessSelector: ~
             BehatMinkExtensionExtension:
                 base_url: "http://local.dev"
                 default_session: goutte
                 goutte: ~
                 selenium: ~
                 selenium2: ~

Thursday, 18 October 12
Extension Use

  <?php

  // Namespaces ...

  class FeatureContext extends BehatContext
  {
      public function __construct(array $parameters)
      {
          $this->useContext('mink', new MinkContext($parameters));
          $this->useContext('BS', new BusinessSelectorContext($parameters));
      }
  }




Thursday, 18 October 12
DEMO

Thursday, 18 October 12
BDD Workflow In Large Organisations

                          Business Analyst     Designers


                                                       Business
                                     Tester
 Concepts
                                                       Selectors
 Implementation




                                   Developer

Thursday, 18 October 12
BDD Workflow In Large Organisations


                             Business Analyst   Designers

                                 Tester

                                Developer

                                 Tester

                             Business Analyst

Thursday, 18 October 12
Questions?



Thursday, 18 October 12
Shameless Plug:
                Orange Digital Are Hiring!
                     Testers / Developers - Contract / Permanent

                              ray.fawcett@orange.com




Thursday, 18 October 12

Contenu connexe

En vedette

Joomladagen 2015 Joomla Performance
Joomladagen 2015 Joomla PerformanceJoomladagen 2015 Joomla Performance
Joomladagen 2015 Joomla PerformanceSimon Kloostra
 
Microservices Tracing with Spring Cloud and Zipkin
Microservices Tracing with Spring Cloud and ZipkinMicroservices Tracing with Spring Cloud and Zipkin
Microservices Tracing with Spring Cloud and ZipkinMarcin Grzejszczak
 
Metrics, Logs, Transaction Traces, Anomaly Detection at Scale
Metrics, Logs, Transaction Traces, Anomaly Detection at ScaleMetrics, Logs, Transaction Traces, Anomaly Detection at Scale
Metrics, Logs, Transaction Traces, Anomaly Detection at ScaleSematext Group, Inc.
 
Application Development on Metapod
Application Development on MetapodApplication Development on Metapod
Application Development on MetapodCisco DevNet
 
Chicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at CohesiveChicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at CohesiveCloudCamp Chicago
 
Internationale clusters in vergelijkend perpsectief
Internationale  clusters in vergelijkend perpsectiefInternationale  clusters in vergelijkend perpsectief
Internationale clusters in vergelijkend perpsectiefAnika Snel
 
Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016
Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016
Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016grecsl
 
Database2011 MySQL Sharding
Database2011 MySQL ShardingDatabase2011 MySQL Sharding
Database2011 MySQL ShardingMoshe Kaplan
 
Tech Chat – What's New in Sumo Logic
Tech Chat – What's New in Sumo LogicTech Chat – What's New in Sumo Logic
Tech Chat – What's New in Sumo LogicSumo Logic
 
Whats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CD
Whats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CDWhats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CD
Whats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CDDavid Ware
 
Turn Data Into Actionable Insights - StampedeCon 2016
Turn Data Into Actionable Insights - StampedeCon 2016Turn Data Into Actionable Insights - StampedeCon 2016
Turn Data Into Actionable Insights - StampedeCon 2016StampedeCon
 
Logs Don't Lie Or Do They?
Logs Don't Lie Or Do They?Logs Don't Lie Or Do They?
Logs Don't Lie Or Do They?Alan K'necht
 
concepto de colección local
concepto de colección localconcepto de colección local
concepto de colección localguestf488db7
 
Five pillars of Infrastructure Monitoring
Five pillars of Infrastructure MonitoringFive pillars of Infrastructure Monitoring
Five pillars of Infrastructure MonitoringDaniel Koller
 
Modern Infrastructure from Scratch with Puppet
Modern Infrastructure from Scratch with PuppetModern Infrastructure from Scratch with Puppet
Modern Infrastructure from Scratch with PuppetPuppet
 
Say no to var_dump
Say no to var_dumpSay no to var_dump
Say no to var_dumpbenwaine
 

En vedette (20)

Joomladagen 2015 Joomla Performance
Joomladagen 2015 Joomla PerformanceJoomladagen 2015 Joomla Performance
Joomladagen 2015 Joomla Performance
 
Microservices Tracing with Spring Cloud and Zipkin
Microservices Tracing with Spring Cloud and ZipkinMicroservices Tracing with Spring Cloud and Zipkin
Microservices Tracing with Spring Cloud and Zipkin
 
Setex Brochure by Matrax Bulgaria
Setex Brochure by Matrax BulgariaSetex Brochure by Matrax Bulgaria
Setex Brochure by Matrax Bulgaria
 
Tic’s y enfermería
Tic’s y enfermeríaTic’s y enfermería
Tic’s y enfermería
 
Metrics, Logs, Transaction Traces, Anomaly Detection at Scale
Metrics, Logs, Transaction Traces, Anomaly Detection at ScaleMetrics, Logs, Transaction Traces, Anomaly Detection at Scale
Metrics, Logs, Transaction Traces, Anomaly Detection at Scale
 
An Introduction to event sourcing and CQRS
An Introduction to event sourcing and CQRSAn Introduction to event sourcing and CQRS
An Introduction to event sourcing and CQRS
 
Application Development on Metapod
Application Development on MetapodApplication Development on Metapod
Application Development on Metapod
 
Chicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at CohesiveChicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at Cohesive
 
Internationale clusters in vergelijkend perpsectief
Internationale  clusters in vergelijkend perpsectiefInternationale  clusters in vergelijkend perpsectief
Internationale clusters in vergelijkend perpsectief
 
Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016
Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016
Monitoring & Analysis 101 - N00b to Ninja in 60 Minutes at ISSW on April 9, 2016
 
Database2011 MySQL Sharding
Database2011 MySQL ShardingDatabase2011 MySQL Sharding
Database2011 MySQL Sharding
 
Tech Chat – What's New in Sumo Logic
Tech Chat – What's New in Sumo LogicTech Chat – What's New in Sumo Logic
Tech Chat – What's New in Sumo Logic
 
Whats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CD
Whats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CDWhats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CD
Whats new in IBM MQ; V9 LTS, V9.0.1 CD and V9.0.2 CD
 
Turn Data Into Actionable Insights - StampedeCon 2016
Turn Data Into Actionable Insights - StampedeCon 2016Turn Data Into Actionable Insights - StampedeCon 2016
Turn Data Into Actionable Insights - StampedeCon 2016
 
Logs Don't Lie Or Do They?
Logs Don't Lie Or Do They?Logs Don't Lie Or Do They?
Logs Don't Lie Or Do They?
 
concepto de colección local
concepto de colección localconcepto de colección local
concepto de colección local
 
Five pillars of Infrastructure Monitoring
Five pillars of Infrastructure MonitoringFive pillars of Infrastructure Monitoring
Five pillars of Infrastructure Monitoring
 
Modern Infrastructure from Scratch with Puppet
Modern Infrastructure from Scratch with PuppetModern Infrastructure from Scratch with Puppet
Modern Infrastructure from Scratch with Puppet
 
Book of Fauna and Flora
Book of Fauna and FloraBook of Fauna and Flora
Book of Fauna and Flora
 
Say no to var_dump
Say no to var_dumpSay no to var_dump
Say no to var_dump
 

Similaire à Business selectors

A (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesA (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesDavid Wengier
 
Phpday - Automated acceptance testing with Behat and Mink
Phpday - Automated acceptance testing with Behat and MinkPhpday - Automated acceptance testing with Behat and Mink
Phpday - Automated acceptance testing with Behat and MinkRichard Tuin
 
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013TEST Huddle
 
Moving away from legacy code with BDD
Moving away from legacy code with BDDMoving away from legacy code with BDD
Moving away from legacy code with BDDKonstantin Kudryashov
 
HTML5 - What you need to know
HTML5 - What you need to knowHTML5 - What you need to know
HTML5 - What you need to knowMatt Fielding
 
Gov.uk content schemas tech monthly may 2015
Gov.uk content schemas   tech monthly may 2015Gov.uk content schemas   tech monthly may 2015
Gov.uk content schemas tech monthly may 2015David Heath
 
Scaling Analysis Responsibly
Scaling Analysis ResponsiblyScaling Analysis Responsibly
Scaling Analysis ResponsiblyWork-Bench
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoJames Casey
 
KanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flowKanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flowBernd Ruecker
 
Behavior driven development with OPA5 automated tests
Behavior driven development with OPA5 automated testsBehavior driven development with OPA5 automated tests
Behavior driven development with OPA5 automated testsLóránt Guth
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentAndy Kelk
 
Monitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike Adolphs
Monitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike AdolphsMonitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike Adolphs
Monitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike AdolphsNETWAYS
 
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profitBuilding a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profitBen Limmer
 
Getting started-with-oracle-so a-9
Getting started-with-oracle-so a-9Getting started-with-oracle-so a-9
Getting started-with-oracle-so a-9Amit Sharma
 
Scaling business app development with Play and Scala
Scaling business app development with Play and ScalaScaling business app development with Play and Scala
Scaling business app development with Play and ScalaPeter Hilton
 
Enterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring BudgetEnterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring BudgetChris Tankersley
 
Getting started-with-oracle-so a-viii
Getting started-with-oracle-so a-viiiGetting started-with-oracle-so a-viii
Getting started-with-oracle-so a-viiiAmit Sharma
 
DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink
DevsMeetUp Freiburg: Behavior Driven Development with Behat/MinkDevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink
DevsMeetUp Freiburg: Behavior Driven Development with Behat/MinkSteffen Müller
 

Similaire à Business selectors (20)

A (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project FilesA (very) opinionated guide to MSBuild and Project Files
A (very) opinionated guide to MSBuild and Project Files
 
Phpday - Automated acceptance testing with Behat and Mink
Phpday - Automated acceptance testing with Behat and MinkPhpday - Automated acceptance testing with Behat and Mink
Phpday - Automated acceptance testing with Behat and Mink
 
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
Emily Bache - Readable, Executable Requirements: Hands-On - EuroSTAR 2013
 
Moving away from legacy code with BDD
Moving away from legacy code with BDDMoving away from legacy code with BDD
Moving away from legacy code with BDD
 
HTML5 - What you need to know
HTML5 - What you need to knowHTML5 - What you need to know
HTML5 - What you need to know
 
Gov.uk content schemas tech monthly may 2015
Gov.uk content schemas   tech monthly may 2015Gov.uk content schemas   tech monthly may 2015
Gov.uk content schemas tech monthly may 2015
 
Scaling Analysis Responsibly
Scaling Analysis ResponsiblyScaling Analysis Responsibly
Scaling Analysis Responsibly
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
BDD from QA side
BDD from QA sideBDD from QA side
BDD from QA side
 
KanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flowKanDDDinsky: Let your domain events flow
KanDDDinsky: Let your domain events flow
 
Behavior driven development with OPA5 automated tests
Behavior driven development with OPA5 automated testsBehavior driven development with OPA5 automated tests
Behavior driven development with OPA5 automated tests
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
Monitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike Adolphs
Monitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike AdolphsMonitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike Adolphs
Monitoring Behavioral Driven Infrastructures mit Cucumber-Nagios by Mike Adolphs
 
Building a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profitBuilding a Single Page Application using Ember.js ... for fun and profit
Building a Single Page Application using Ember.js ... for fun and profit
 
Getting started-with-oracle-so a-9
Getting started-with-oracle-so a-9Getting started-with-oracle-so a-9
Getting started-with-oracle-so a-9
 
Scaling business app development with Play and Scala
Scaling business app development with Play and ScalaScaling business app development with Play and Scala
Scaling business app development with Play and Scala
 
Enterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring BudgetEnterprise Development on a Shoestring Budget
Enterprise Development on a Shoestring Budget
 
Getting started-with-oracle-so a-viii
Getting started-with-oracle-so a-viiiGetting started-with-oracle-so a-viii
Getting started-with-oracle-so a-viii
 
DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink
DevsMeetUp Freiburg: Behavior Driven Development with Behat/MinkDevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink
DevsMeetUp Freiburg: Behavior Driven Development with Behat/Mink
 
C# with Renas
C# with RenasC# with Renas
C# with Renas
 

Plus de benwaine

DPC 2016 - 53 Minutes or Less - Architecting For Failure
DPC 2016 - 53 Minutes or Less - Architecting For FailureDPC 2016 - 53 Minutes or Less - Architecting For Failure
DPC 2016 - 53 Minutes or Less - Architecting For Failurebenwaine
 
The Road To Technical Team Lead
The Road To Technical Team LeadThe Road To Technical Team Lead
The Road To Technical Team Leadbenwaine
 
PHPNW14 - Getting Started With AWS
PHPNW14 - Getting Started With AWSPHPNW14 - Getting Started With AWS
PHPNW14 - Getting Started With AWSbenwaine
 
Application Logging With The ELK Stack
Application Logging With The ELK StackApplication Logging With The ELK Stack
Application Logging With The ELK Stackbenwaine
 
Application Logging With Logstash
Application Logging With LogstashApplication Logging With Logstash
Application Logging With Logstashbenwaine
 
The Art Of Application Logging PHPNW12
The Art Of Application Logging PHPNW12The Art Of Application Logging PHPNW12
The Art Of Application Logging PHPNW12benwaine
 
Behat dpc12
Behat dpc12Behat dpc12
Behat dpc12benwaine
 
Acceptance & Integration Testing With Behat (PBC11)
Acceptance & Integration Testing With Behat (PBC11)Acceptance & Integration Testing With Behat (PBC11)
Acceptance & Integration Testing With Behat (PBC11)benwaine
 
Acceptance & Integration Testing With Behat (PHPNw2011)
Acceptance & Integration Testing With Behat (PHPNw2011)Acceptance & Integration Testing With Behat (PHPNw2011)
Acceptance & Integration Testing With Behat (PHPNw2011)benwaine
 

Plus de benwaine (9)

DPC 2016 - 53 Minutes or Less - Architecting For Failure
DPC 2016 - 53 Minutes or Less - Architecting For FailureDPC 2016 - 53 Minutes or Less - Architecting For Failure
DPC 2016 - 53 Minutes or Less - Architecting For Failure
 
The Road To Technical Team Lead
The Road To Technical Team LeadThe Road To Technical Team Lead
The Road To Technical Team Lead
 
PHPNW14 - Getting Started With AWS
PHPNW14 - Getting Started With AWSPHPNW14 - Getting Started With AWS
PHPNW14 - Getting Started With AWS
 
Application Logging With The ELK Stack
Application Logging With The ELK StackApplication Logging With The ELK Stack
Application Logging With The ELK Stack
 
Application Logging With Logstash
Application Logging With LogstashApplication Logging With Logstash
Application Logging With Logstash
 
The Art Of Application Logging PHPNW12
The Art Of Application Logging PHPNW12The Art Of Application Logging PHPNW12
The Art Of Application Logging PHPNW12
 
Behat dpc12
Behat dpc12Behat dpc12
Behat dpc12
 
Acceptance & Integration Testing With Behat (PBC11)
Acceptance & Integration Testing With Behat (PBC11)Acceptance & Integration Testing With Behat (PBC11)
Acceptance & Integration Testing With Behat (PBC11)
 
Acceptance & Integration Testing With Behat (PHPNw2011)
Acceptance & Integration Testing With Behat (PHPNw2011)Acceptance & Integration Testing With Behat (PHPNw2011)
Acceptance & Integration Testing With Behat (PHPNw2011)
 

Business selectors

  • 1. Business Selectors Extension For Thursday, 18 October 12
  • 3. BDD Workflow In Large Organisations Business Analyst Designers Tester Developer Tester Business Analyst Thursday, 18 October 12
  • 4. BDD Workflow In Large Organisations Business Analyst Designers Tester Concepts Implementation Developer Thursday, 18 October 12
  • 5. Example Steps Shipped With Mink Extension Scenario: Searching for a page that does exist Given I am on "/wiki/Main_Page" When I fill in "search" with "Behavior Driven Development" And I press "searchButton" Then I should see "agile software development" When /^(?:|I )fill in "(?P<field>(?:[^"]|")*)" with "(?P<value>(?:[^"]|")*)"$/ When /^(?:|I )press "(?P<button>(?:[^"]|")*)"$/ Thursday, 18 October 12
  • 6. Problems Encountered At Sky / Orange • Mink requires implementation details • Test teams with no PHP skills • Difficulty identifying elements on the page using Mink Extension Thursday, 18 October 12
  • 8. Example test.feature Given I go to the page "Home Page" When I follow the link "Add Subscription" And I fill in the "first name box" field with "ben" Then the "first name box" form field should contain "ben" And I press the "test" button And the "Widget" should contain "Area One Text" selectors.yml Add Subscription: "a.self-link" first name box: "form#name_form input[name=first_name]" test: "form#name_form input[name=submit]" Widget: div#user_widget urls.yml Home Page: "/" Element Page: "/element.html" Thursday, 18 October 12
  • 9. Steps Shipped With Business Selector Extension Given I go to the page "<PAGE NAME>" When I follow the link "<LINK>" When I click the "<CLICKABLE ELEMENT>" When I press the "<BUTTON>" button When I fill in the "<TEXT INPUT>" field with "value" When the "<TEXT INPUT>" form field should not contain "value" When I select "value" from the "<SELECT OR MULTISELECT>" selector When I additionally select "value" from the "<MULTISELECT>" selector When I check the "<CHECKBOX>" checkbox When I uncheck the "<CHECKBOX>" checkbox When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe When I refocus on the primary page When I hover over "<PAGE ELEMENT>" When I wait for the "<PAGE ELEMENT>" component to [dis]appear Then the "<PAGE ELEMENT>" should contain "value" Then the "<PAGE ELEMENT>" should not contain "value" Then I should see "<PAGE ELEMENT>" component Then I should not see "<PAGE ELEMENT>" component Then "<PAGE ELEMENT>" should contain "<PAGE ELEMENT>" Then "<PAGE ELEMENT>" should not contain "<PAGE ELEMENT>" Then the "<CHECKBOX>" should be checked Then the "<CHECKBOX>" should not be checked Then the "<TEXT INPUT>" form field should contain "value" Thursday, 18 October 12
  • 10. Some Extra Steps Dealing With Common Tasks When I focus on the "<IFRAME (RELATES TO ID OR INDEX)>" iframe When I refocus on the primary page Given I attach <FILEPATH> to <PAGEELEMENT> When I wait for the "<PAGE ELEMENT>" component to [dis]appear Thursday, 18 October 12
  • 11. Extension Configuration default: context: parameters: javascript_session: selenium browser: firefox show_cmd: open %s extensions: OrangeDigitalBusinessSelectorExtensionExtension: urlFilePath: urls.yml selectorFilePath: selectors.yml assetPath: path timeout: 30 contexts: UIBusinessSelector: ~ BehatMinkExtensionExtension: base_url: "http://local.dev" default_session: goutte goutte: ~ selenium: ~ selenium2: ~ Thursday, 18 October 12
  • 12. Extension Use <?php // Namespaces ... class FeatureContext extends BehatContext { public function __construct(array $parameters) { $this->useContext('mink', new MinkContext($parameters)); $this->useContext('BS', new BusinessSelectorContext($parameters)); } } Thursday, 18 October 12
  • 14. BDD Workflow In Large Organisations Business Analyst Designers Business Tester Concepts Selectors Implementation Developer Thursday, 18 October 12
  • 15. BDD Workflow In Large Organisations Business Analyst Designers Tester Developer Tester Business Analyst Thursday, 18 October 12
  • 17. Shameless Plug: Orange Digital Are Hiring! Testers / Developers - Contract / Permanent ray.fawcett@orange.com Thursday, 18 October 12