SlideShare a Scribd company logo
1 of 64
Download to read offline
ATDD with Behat and
     Selenium
About Me


Shashikant Jagtap [Shashi]
Twitter: @Shashikant86
London Behat Users [#LDNBU]
BDD Enthusiastic Tester
Overview
ATDD
Overview
ATDD
Behat from Scratch
Overview
ATDD
Behat from Scratch
Composer & Mink Extension
Overview
ATDD
Behat from Scratch
Composer & MinkExtension
Speeding up BDD with Sublime Text2
Browser Automation with Selenium
ATDD with Behat and Selenium
ANT & HTML Report Generation
Video/Live Demo
ATDD
Acceptance Test Driven Development


        Discuss


 Stor             Stor
 y2     Stor      y3
        y1
ATDD
Acceptance Test Driven Development

                    Specification Workshop
        Discuss                                    Distill

 Stor             Stor
 y2      Stor     y3                   Tester   Develope
         y1                                                  PM/S
                                                   rs         M
ATDD
Acceptance Test Driven Development

                    Specification Workshop
        Discuss                                         Distill

 Stor             Stor
 y2      Stor     y3                   Tester                             PM/S
                                                   Develope
         y1                                                                M
                                                      rs

                                                   Acceptance Tests


                                                       Implement

                                                Test
                                                                  Devel
                                                 er
                                                                  oper
ATDD
     Acceptance Test Driven Development

                                Specification Workshop
                    Discuss                                         Distill

          Stor                Stor
          y2         Stor     y3                   Tester                             PM/S
                                                               Develope
                     y1                                                                M
                                                                  rs

                                                               Acceptance Tests


                                     Executable Spec               Implement
Automat              Demo
  ion                                                       Test
          Automat                                                             Devel
                                                             er
            ion                                                               oper
ATDD
Get Acceptance Criteria
ATDD
Get Acceptance Criteria
Write Acceptance Test Collaboratively
 [Failing/Undefined]
ATDD
Get Acceptance Criteria
Write Acceptance Test Collaboratively
 [Failing/Undefined]
Implement Step Definition to make it Pass
ATDD
Get Acceptance Criteria
Write Acceptance Test Collaboratively
 [Failing/Undefined]
Implement Step Definition to make it Pass
Test Pass !! Automation Achieved.
Behat

It's cousin of
Behat
Behat is a BDD tool for PHP Applications
   http://behat.org/
Mink is a web Acceptance Testing
 Framework for PHP
    http://mink.behat.org/
Combination of Behat/Mink can be used
 for web acceptance Testing.
Mink has Selenium1 & Selenium2 Drivers
 for browser automation
Who is Doing/Maintaining?
Konstantin Kudryashov
    - Knplabs, France
Twitter : @everzet
GitHub : Everzet
+ Some Awesome Contributors
Let's Get Started With Behat
               Pre-requisite
Laptop/Computer
PHP Stacks (LAMP, WAMP, MAMP)
Selenium Server
Curl or wget
GitHub (optional)
Behat Installation
Could you Live Without
If Not Then
If Not Then
$ pear channel-discover pear.symfony.com
$ pear channel-discover pear.behat.org
$ pear install behat/behat
pear install behat/mink
If Not Then
$ pear channel-discover pear.symfony.com
$ pear channel-discover pear.behat.org
$ pear install behat/behat
pear install behat/mink


You Ready to use Behat/Mink,
If Not Then
$ pear channel-discover pear.symfony.com
$ pear channel-discover pear.behat.org
$ pear install behat/behat
pear install behat/mink


You Ready to use Behat/Mink,
WAIT.... We got EASIER OPTION !!!!!
We Got Composer !!!!!!
We Got Composer !!!!!!
Composer is dependency manager for PHP
Composer allow you to declare libraries
 you needed and install it for you
Just define all dependencies in
 'composer.json' file and you are done !!
So, Let's do that
Create Project
      Make New Directory


$ mkdir BehatDemo


$ cd BehatDemo
Create composer.json
{

"require": {

         "behat/behat": "2.4@stable",

         "behat/mink-extension": "dev-master",

         "fabpot/goutte": "*",

         "alexandresalome/php-selenium": "*",

         "instaclick/php-webdriver": "*"

    },

    "config": {

         "bin-dir": "bin"

    }

}
Create 'behat.yml'
default:
context:
   class: 'FeatureContext'
 extensions:
  BehatMinkExtensionExtension:
     base_url: 'http://saucelabs.com/'
     javascript_session: 'selenium2'
     goutte:       ~
    selenium2:
Download Composer
Download composer using command
$curl http://getcomposer.org/installer | php
Download Composer
Download composer using command
$curl http://getcomposer.org/installer | php
Shashi-MacBook-Pro:BehatDemo user$ curl http://getcomposer.org/installer |
  php
 % Total   % Received % Xferd Average Speed Time             Time       Time Current
                 Dload Upload Total Spent          Left Speed
100 7606 100 7606      0    0 59636       0 --:--:-- --:--:-- --:--:-- 165k
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Users/user/BehatDemo/composer.phar
Use it: php composer.phar
Install composer.phar
$php composer.phar install


You can also use


$php composer.phar update
Install composer.phar
$php composer.phar install
Shashi-MacBook-Pro:BehatDemo user$ php composer.phar update
Updating dependencies
- Installing guzzle/guzzle (v2.6.3)
 Downloading: 100%


- Installing symfony/yaml (dev-master)
 Cloning 49ad500448c17a4b515c8f567dbb540af3cf41ef


- Installing symfony/translation (dev-master)
                                      [So on …...........]
Start Behat
$ ./bin/behat --init
Start Behat
$ ./bin/behat --init
Shashi-MacBook-Pro:BehatDemo user$ ./bin/behat --init
+d features - place your *.feature files here
+d features/bootstrap - place bootstrap scripts and static files here
+f features/bootstrap/FeatureContext.php - place your feature related code
    here


[You will See Behat created 'features' and 'bootstrap' directory for you]
Behat Did Something ?
Created 'features' directory
Created 'bootstrap' directory and
 'FeatureContext.php' file where we will
 implement step definitions.
Mink Extension
We need 'FeatureContext' class to'Behat
 MinkExtensionContextMinkContext
So, We are using 'MinkExtension' which
 automatically create Mink instance.
We used Mink API's to automated
 Browser actions.
 (http://mink.behat.org/api/)
Now, We are ready to use
 Behat, Mink, Selenium and
 stuff. Run Behat with
    $ ./bin/behat
Feature File
How it Looks Like?
Feature: feature
In order to [ add feature]
As a [role]
I want [featute]
Scenario: First Scenario
Given [Context]
When [Action]
Then [OutCome]
BlogSearch.feature
Feature: Blog Search

In order to search blogs

As a sauce user

I need see blogs


@javascript
Scenario: Search Behat Blogs

Given I am on "/blog"

When I fill in "s" with "behat"

And I press "Search"

Then I should see "Adding Sauce To Behat"

[This file should be in /features directory. ]
What will Help to write
          feature?
Behat Cheat Sheet
http://blog.lepine.pro/php/ressources-tutos-


Mink Api's
http://mink.behat.org/api/
I know, Too Boring to type ?
I know, Too Boring to type ?


Let Me Show You
 Something Which Will do
 this in a Minute
Sublime Text2 : Behat-
 Mink Snippets.
Who Wrote Awesome Snippets
Willemsen Christophe
GitHub : kwattro
- Intranet appz developer for the Belgian
  Defense, BDD practitioner. [ Symfony]
Twitter : @ikwattro
GitHub:
 https://github.com/kwattro/sublime-
 behat-snippets
Don't forget
To tag Scenarios with “@javascript” tag
                    &
Launch our Lovely Selenium Server
$ java -jar selenium-server-standalone-2.21.0.jar
Now Run
          $./bin/behat
Watch Test Running in a Browser
ATDD with Behat and Selenium (LDNSE6)
ATDD with Behat & Selenium
How should I find locators before
 Implementation?
ATDD with Behat & Selenium
How should I find locators before
 Implementation?
Don't worry, Write high level tests and
 Behat & Mink API's will help you to
 implement Step def later (after
 implementation)
atdd.feature
Feature: ATDD
In order to implement ATDD
As a QA
I need to write acceptance tests first


 @javascript @atdd
 Scenario: Searching
  Given I am on blogs page
  When I search for "chips"
  Then I should see "No Posts"
Implement Steps
/**

    * @When /^I search for "([^"]*)"$/

    */

    public function iSearchFor($key)

  {   $this->fillField("s", $key);

        $this->pressButton("Search");
          }

    /**

    * @Given /^I am on blogs page$/

    */

    public function iAmOnBlogsPage()

    {

        $this->visit("/blog");

    }
Run Scenarios with 'atdd' tags


$ ./bin/behat --tags="atdd"
ATDD with Behat and Selenium (LDNSE6)
Generate Report
To Generate HTML reports


$ ./bin/behat -f html --out report.html


You will see 'report.html' generated which looks
 awesome in browser !!
report.html
Get Code
$git clone git@github.com:Shashikant86/BehatDemo.git
$cd BehatDemo


$curl http://getcomposer.org/installer | php
$php composer.phar install


Download Selenium Server and launch server
$ java -jar selenium-server-standalone-2.21.0.jar


$./bin/behat
Run ANT build
Shashi-MacBook-Pro:BehatDemo user$ ant run
Buildfile: /Users/user/BehatDemo/build.xml


run:
  [delete] Deleting directory
 /Users/user/BehatDemo/report
   [mkdir] Created dir:
 /Users/user/BehatDemo/report


behat:


BUILD SUCCESSFUL
Reports
We have created 'report' directory to save
 test report of the latest build
Report will generate in html format in the
 'report/report.html' file.
Video Demo
How To clone Repo and use
http://youtu.be/Apt-1_94zCE


Things We did
http://tinyurl.com/d79s4oy
Links

http://behat.org/
http://mink.behat.org/
https://github.com/Shashikant86/BehatDemo
https://github.com/kwattro/sublime-behat-snippets
http://everzet.com/
Questions?
Thank You

More Related Content

What's hot

Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your AnsibleDennis Rowe
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflowTomas Doran
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreChef Software, Inc.
 
Dockercon2015 bamboo
Dockercon2015 bambooDockercon2015 bamboo
Dockercon2015 bambooSteve Smith
 
Investigation of testing with ansible
Investigation of testing with ansibleInvestigation of testing with ansible
Investigation of testing with ansibleDennis Rowe
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Puppet
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsContinuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsMarcel Birkner
 
CI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureCI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureFaisal Shaikh
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chefMukta Aphale
 
Can you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and YouCan you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and YouColdFusionConference
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and ClientHow do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and ClientColdFusionConference
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Docker Docker Docker Chef
Docker Docker Docker ChefDocker Docker Docker Chef
Docker Docker Docker ChefSean OMeara
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentRyan J. Salva
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具謝 宗穎
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016Gavin Pickin
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Andrew Bayer
 

What's hot (20)

Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your Ansible
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
 
Dockercon2015 bamboo
Dockercon2015 bambooDockercon2015 bamboo
Dockercon2015 bamboo
 
Investigation of testing with ansible
Investigation of testing with ansibleInvestigation of testing with ansible
Investigation of testing with ansible
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsContinuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
 
CI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureCI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for Infrastructure
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chef
 
Can you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and YouCan you contain the future - Docker, Container Technologies, The Future, and You
Can you contain the future - Docker, Container Technologies, The Future, and You
 
How do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and ClientHow do I Write Testable Javascript so I can Test my CF API on Server and Client
How do I Write Testable Javascript so I can Test my CF API on Server and Client
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Docker Docker Docker Chef
Docker Docker Docker ChefDocker Docker Docker Chef
Docker Docker Docker Chef
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 

Viewers also liked

BDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabsBDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabsShashikant Jagtap
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsiOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
Headless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationHeadless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationShashikant Jagtap
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupShashikant Jagtap
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 
Exactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaExactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaIosif Itkin
 
Web Acceptance Testing with Behat
Web Acceptance Testing with BehatWeb Acceptance Testing with Behat
Web Acceptance Testing with BehatFabian Kiss
 
Informatica
InformaticaInformatica
Informaticamukharji
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsIosif Itkin
 
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile AppsSauce Labs
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiYukiya Nakagawa
 

Viewers also liked (13)

Behat sauce
Behat sauceBehat sauce
Behat sauce
 
BDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabsBDD using Behat, Selenium,Sahi and SauceLabs
BDD using Behat, Selenium,Sahi and SauceLabs
 
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and SaucelabsiOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
iOS Developers Conference-iOS Automation with Cucumber, Appium and Saucelabs
 
Headless BDD & Responsive Test Automation
Headless BDD & Responsive Test AutomationHeadless BDD & Responsive Test Automation
Headless BDD & Responsive Test Automation
 
Headless BDD
Headless BDDHeadless BDD
Headless BDD
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and Saucelabs
 
Exactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaExactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in Kostroma
 
Web Acceptance Testing with Behat
Web Acceptance Testing with BehatWeb Acceptance Testing with Behat
Web Acceptance Testing with Behat
 
Informatica
InformaticaInformatica
Informatica
 
Behavior Driven Development Pros and Cons
Behavior Driven Development Pros and ConsBehavior Driven Development Pros and Cons
Behavior Driven Development Pros and Cons
 
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile Apps
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
 

Similar to ATDD with Behat and Selenium (LDNSE6)

Optimising Productivity with AWS Developer Tools
Optimising Productivity with AWS Developer ToolsOptimising Productivity with AWS Developer Tools
Optimising Productivity with AWS Developer ToolsAmazon Web Services
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.David Nuescheler
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDay Software
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled CucumbersJoseph Wilk
 
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...manssandstrom
 
Kubernetes Operators: Rob Szumski
Kubernetes Operators: Rob SzumskiKubernetes Operators: Rob Szumski
Kubernetes Operators: Rob SzumskiRedis Labs
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012Tieturi Oy
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009pratiknaik
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysisssuser2e8d4b
 
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
Agile2013 - Integration testing in enterprises using TaaS - via Case StudyAgile2013 - Integration testing in enterprises using TaaS - via Case Study
Agile2013 - Integration testing in enterprises using TaaS - via Case StudyAnand Bagmar
 
Software Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab ManagementSoftware Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab ManagementNico Orschel
 
Docker, Continuous Integration, and You
Docker, Continuous Integration, and YouDocker, Continuous Integration, and You
Docker, Continuous Integration, and YouAtlassian
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsErik Osterman
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineGil Fink
 
Ashwini - Effective use of CI by QA
Ashwini - Effective use of CI by QAAshwini - Effective use of CI by QA
Ashwini - Effective use of CI by QAvodQA
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for RubyHiroshi SHIBATA
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512Masayuki Igawa
 

Similar to ATDD with Behat and Selenium (LDNSE6) (20)

Optimising Productivity with AWS Developer Tools
Optimising Productivity with AWS Developer ToolsOptimising Productivity with AWS Developer Tools
Optimising Productivity with AWS Developer Tools
 
What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.What's new in CQ 5.3? Top 10 features.
What's new in CQ 5.3? Top 10 features.
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
 
Pycon India 12
Pycon India 12Pycon India 12
Pycon India 12
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled Cucumbers
 
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
 
Kubernetes Operators: Rob Szumski
Kubernetes Operators: Rob SzumskiKubernetes Operators: Rob Szumski
Kubernetes Operators: Rob Szumski
 
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAUTest Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009
 
Bdd test automation analysis
Bdd test automation analysisBdd test automation analysis
Bdd test automation analysis
 
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
Agile2013 - Integration testing in enterprises using TaaS - via Case StudyAgile2013 - Integration testing in enterprises using TaaS - via Case Study
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
 
Software Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab ManagementSoftware Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab Management
 
Docker, Continuous Integration, and You
Docker, Continuous Integration, and YouDocker, Continuous Integration, and You
Docker, Continuous Integration, and You
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
 
Ashwini - Effective use of CI by QA
Ashwini - Effective use of CI by QAAshwini - Effective use of CI by QA
Ashwini - Effective use of CI by QA
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
 
Tempest scenariotests 20140512
Tempest scenariotests 20140512Tempest scenariotests 20140512
Tempest scenariotests 20140512
 

More from Shashikant Jagtap

NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework Shashikant Jagtap
 
SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App Shashikant Jagtap
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University Shashikant Jagtap
 
iOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS AppsiOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS AppsShashikant Jagtap
 
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with AnsibleProvisioning iOS CI Server with Ansible
Provisioning iOS CI Server with AnsibleShashikant Jagtap
 
BDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and SauceBDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and SauceShashikant Jagtap
 
Test Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiTest Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiShashikant Jagtap
 

More from Shashikant Jagtap (9)

NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework
 
SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App SauceCon19: Fashionable XCUITest for iOS App
SauceCon19: Fashionable XCUITest for iOS App
 
Full Stack Flutter Testing
Full Stack Flutter Testing Full Stack Flutter Testing
Full Stack Flutter Testing
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University
 
iOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS AppsiOSDevUK Conference- DevOps for iOS Apps
iOSDevUK Conference- DevOps for iOS Apps
 
Vapor london March 2018
Vapor london March 2018Vapor london March 2018
Vapor london March 2018
 
Provisioning iOS CI Server with Ansible
Provisioning iOS CI Server with AnsibleProvisioning iOS CI Server with Ansible
Provisioning iOS CI Server with Ansible
 
BDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and SauceBDD with Behat Selenium, Sahi and Sauce
BDD with Behat Selenium, Sahi and Sauce
 
Test Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+SahiTest Framework for Acne Selenium+Sahi
Test Framework for Acne Selenium+Sahi
 

Recently uploaded

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 

Recently uploaded (20)

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 

ATDD with Behat and Selenium (LDNSE6)

  • 1. ATDD with Behat and Selenium
  • 2. About Me Shashikant Jagtap [Shashi] Twitter: @Shashikant86 London Behat Users [#LDNBU] BDD Enthusiastic Tester
  • 6. Overview ATDD Behat from Scratch Composer & MinkExtension Speeding up BDD with Sublime Text2 Browser Automation with Selenium ATDD with Behat and Selenium ANT & HTML Report Generation Video/Live Demo
  • 7. ATDD Acceptance Test Driven Development Discuss Stor Stor y2 Stor y3 y1
  • 8. ATDD Acceptance Test Driven Development Specification Workshop Discuss Distill Stor Stor y2 Stor y3 Tester Develope y1 PM/S rs M
  • 9. ATDD Acceptance Test Driven Development Specification Workshop Discuss Distill Stor Stor y2 Stor y3 Tester PM/S Develope y1 M rs Acceptance Tests Implement Test Devel er oper
  • 10. ATDD Acceptance Test Driven Development Specification Workshop Discuss Distill Stor Stor y2 Stor y3 Tester PM/S Develope y1 M rs Acceptance Tests Executable Spec Implement Automat Demo ion Test Automat Devel er ion oper
  • 12. ATDD Get Acceptance Criteria Write Acceptance Test Collaboratively [Failing/Undefined]
  • 13. ATDD Get Acceptance Criteria Write Acceptance Test Collaboratively [Failing/Undefined] Implement Step Definition to make it Pass
  • 14. ATDD Get Acceptance Criteria Write Acceptance Test Collaboratively [Failing/Undefined] Implement Step Definition to make it Pass Test Pass !! Automation Achieved.
  • 16. Behat Behat is a BDD tool for PHP Applications http://behat.org/ Mink is a web Acceptance Testing Framework for PHP http://mink.behat.org/ Combination of Behat/Mink can be used for web acceptance Testing. Mink has Selenium1 & Selenium2 Drivers for browser automation
  • 17. Who is Doing/Maintaining? Konstantin Kudryashov - Knplabs, France Twitter : @everzet GitHub : Everzet + Some Awesome Contributors
  • 18. Let's Get Started With Behat Pre-requisite Laptop/Computer PHP Stacks (LAMP, WAMP, MAMP) Selenium Server Curl or wget GitHub (optional)
  • 20. Could you Live Without
  • 22. If Not Then $ pear channel-discover pear.symfony.com $ pear channel-discover pear.behat.org $ pear install behat/behat pear install behat/mink
  • 23. If Not Then $ pear channel-discover pear.symfony.com $ pear channel-discover pear.behat.org $ pear install behat/behat pear install behat/mink You Ready to use Behat/Mink,
  • 24. If Not Then $ pear channel-discover pear.symfony.com $ pear channel-discover pear.behat.org $ pear install behat/behat pear install behat/mink You Ready to use Behat/Mink, WAIT.... We got EASIER OPTION !!!!!
  • 25. We Got Composer !!!!!!
  • 26. We Got Composer !!!!!! Composer is dependency manager for PHP Composer allow you to declare libraries you needed and install it for you Just define all dependencies in 'composer.json' file and you are done !! So, Let's do that
  • 27. Create Project Make New Directory $ mkdir BehatDemo $ cd BehatDemo
  • 28. Create composer.json { "require": { "behat/behat": "2.4@stable", "behat/mink-extension": "dev-master", "fabpot/goutte": "*", "alexandresalome/php-selenium": "*", "instaclick/php-webdriver": "*" }, "config": { "bin-dir": "bin" } }
  • 29. Create 'behat.yml' default: context: class: 'FeatureContext' extensions: BehatMinkExtensionExtension: base_url: 'http://saucelabs.com/' javascript_session: 'selenium2' goutte: ~ selenium2:
  • 30. Download Composer Download composer using command $curl http://getcomposer.org/installer | php
  • 31. Download Composer Download composer using command $curl http://getcomposer.org/installer | php Shashi-MacBook-Pro:BehatDemo user$ curl http://getcomposer.org/installer | php % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7606 100 7606 0 0 59636 0 --:--:-- --:--:-- --:--:-- 165k #!/usr/bin/env php All settings correct for using Composer Downloading... Composer successfully installed to: /Users/user/BehatDemo/composer.phar Use it: php composer.phar
  • 32. Install composer.phar $php composer.phar install You can also use $php composer.phar update
  • 33. Install composer.phar $php composer.phar install Shashi-MacBook-Pro:BehatDemo user$ php composer.phar update Updating dependencies - Installing guzzle/guzzle (v2.6.3) Downloading: 100% - Installing symfony/yaml (dev-master) Cloning 49ad500448c17a4b515c8f567dbb540af3cf41ef - Installing symfony/translation (dev-master) [So on …...........]
  • 35. Start Behat $ ./bin/behat --init Shashi-MacBook-Pro:BehatDemo user$ ./bin/behat --init +d features - place your *.feature files here +d features/bootstrap - place bootstrap scripts and static files here +f features/bootstrap/FeatureContext.php - place your feature related code here [You will See Behat created 'features' and 'bootstrap' directory for you]
  • 36. Behat Did Something ? Created 'features' directory Created 'bootstrap' directory and 'FeatureContext.php' file where we will implement step definitions.
  • 37. Mink Extension We need 'FeatureContext' class to'Behat MinkExtensionContextMinkContext So, We are using 'MinkExtension' which automatically create Mink instance. We used Mink API's to automated Browser actions. (http://mink.behat.org/api/)
  • 38. Now, We are ready to use Behat, Mink, Selenium and stuff. Run Behat with $ ./bin/behat
  • 40. How it Looks Like? Feature: feature In order to [ add feature] As a [role] I want [featute] Scenario: First Scenario Given [Context] When [Action] Then [OutCome]
  • 41. BlogSearch.feature Feature: Blog Search In order to search blogs As a sauce user I need see blogs @javascript Scenario: Search Behat Blogs Given I am on "/blog" When I fill in "s" with "behat" And I press "Search" Then I should see "Adding Sauce To Behat" [This file should be in /features directory. ]
  • 42. What will Help to write feature? Behat Cheat Sheet http://blog.lepine.pro/php/ressources-tutos- Mink Api's http://mink.behat.org/api/
  • 43. I know, Too Boring to type ?
  • 44. I know, Too Boring to type ? Let Me Show You Something Which Will do this in a Minute
  • 45. Sublime Text2 : Behat- Mink Snippets.
  • 46. Who Wrote Awesome Snippets Willemsen Christophe GitHub : kwattro - Intranet appz developer for the Belgian Defense, BDD practitioner. [ Symfony] Twitter : @ikwattro GitHub: https://github.com/kwattro/sublime- behat-snippets
  • 47. Don't forget To tag Scenarios with “@javascript” tag & Launch our Lovely Selenium Server $ java -jar selenium-server-standalone-2.21.0.jar
  • 48. Now Run $./bin/behat Watch Test Running in a Browser
  • 50. ATDD with Behat & Selenium How should I find locators before Implementation?
  • 51. ATDD with Behat & Selenium How should I find locators before Implementation? Don't worry, Write high level tests and Behat & Mink API's will help you to implement Step def later (after implementation)
  • 52. atdd.feature Feature: ATDD In order to implement ATDD As a QA I need to write acceptance tests first @javascript @atdd Scenario: Searching Given I am on blogs page When I search for "chips" Then I should see "No Posts"
  • 53. Implement Steps /** * @When /^I search for "([^"]*)"$/ */     public function iSearchFor($key) {   $this->fillField("s", $key);         $this->pressButton("Search"); }     /** * @Given /^I am on blogs page$/ */     public function iAmOnBlogsPage()     {         $this->visit("/blog");     }
  • 54. Run Scenarios with 'atdd' tags $ ./bin/behat --tags="atdd"
  • 56. Generate Report To Generate HTML reports $ ./bin/behat -f html --out report.html You will see 'report.html' generated which looks awesome in browser !!
  • 58. Get Code $git clone git@github.com:Shashikant86/BehatDemo.git $cd BehatDemo $curl http://getcomposer.org/installer | php $php composer.phar install Download Selenium Server and launch server $ java -jar selenium-server-standalone-2.21.0.jar $./bin/behat
  • 59. Run ANT build Shashi-MacBook-Pro:BehatDemo user$ ant run Buildfile: /Users/user/BehatDemo/build.xml run: [delete] Deleting directory /Users/user/BehatDemo/report [mkdir] Created dir: /Users/user/BehatDemo/report behat: BUILD SUCCESSFUL
  • 60. Reports We have created 'report' directory to save test report of the latest build Report will generate in html format in the 'report/report.html' file.
  • 61. Video Demo How To clone Repo and use http://youtu.be/Apt-1_94zCE Things We did http://tinyurl.com/d79s4oy