Git Product home page Git Product logo

behat-chromedriver-quickstart's Introduction

rask/behat-chromedriver-quickstart

This repo contains a boilerplate or a reference for running acceptance or integration tests for PHP applications with Behat 3 and ChromeDriver.

Setup and config

NOTE: this package was created on Linux, YMMV on Mac and Windows.

You need to install the standalone ChromeDriver from the ChromeDriver site. Follow the site instructions on installation.

If you're using an older version of Chrome or Chromium you might need to install an older version of the ChromeDriver too.

Next, run composer install (or update) to install the requirements to get Behat up and running.

Point a virtual host into the directory (index.php will be the "homepage").

View the behat.yml file for the behat configuration. Most importantly provide the proper values for base_url and the host value of the Selenium2 driver config.

For instance running

$ chromedriver
> Starting ChromeDriver <...> on port [port] <...>

would provide the driver being available on localhost:[port] which you should set in behat.yml under the Selenium2 config.

Set the virtual host you created as the base_url.

Running the tests

The Behat feature definitions and contexts are available under features. You can run the feature tests with

$ behat

If your setup and config is OK then Behat should report test results as expected.

Contributions, license, author

This quickstart package was created by Otto Rask (github.com/rask). Contributions welcome in terms of fixes and documentation.

The package is licensed with MIT.

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.