Giter Site home page Giter Site logo

behatdemo's Introduction

#Usage

##Clone this repo

    $ git clone [email protected]:Shashikant86/BehatDemo.git
    $ cd BehatDemo

Now install Behat, Mink, MinkExtension and their dependencies with composer:

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

Download Selenium Server and launch server

  $ java -jar selenium-server-standalone-2.30.0.jar

Now to launch Behat, just run:

  $./bin/behat

Watch The Test running in the firefox browser. if you want to add more browsers locally with Selenium 2 driver add another param 'browser_name' to behat.yml (default profile)

          default:
              context:
                class:  'FeatureContext'
              extensions:
                   Behat\MinkExtension\Extension:
                     base_url:  'http://saucelabs.com/'
                     javascript_session:  'selenium2'
                     browser_name: safari
                     goutte:              ~
                     selenium2:

Running Test With PahntomJS Driver

Install PhantomJS, This will start Web-Driver at port 8643 Now run Behat with phantomjs profile

     $ brew install phantomJS
     $ phantomjs --webdriver=8643
     $ .bin/behat -p phantomjs

##To Run tests on Sauce Labs:

You need to create account with SauceLabs https://saucelabs.com/signup Once registered you will have username and API key.

Web-Driver (selenium2) Tests:

update behat.yml and 'sauce' profile. Change "wd_host: username:[email protected]/wd/hub" with your username and Password.

And Run

   $./bin/behat -p sauce

You will see test running on SauceLabs https://saucelabs.com/jobs

Selenium1 driver Tests:

update behat.yml and 'sauce-rc' profile. "username": "username", "access-key": "apikey", with your username and Password.

And Run

     $./bin/behat -p sauce-rc

You will see test running on SauceLabs https://saucelabs.com/jobs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.