Giter Club home page Giter Club logo

parallelrunner's Introduction

Behat Parallel Runner

Installation

This extension requires:

  • Behat 2.4+

Through Composer

  1. Set dependencies in your composer.json:
{
    "require": {
        ...
        "shvetsgroup/parallelrunner": "dev-master"
    }
}
  1. Install/update your vendors:
$ curl http://getcomposer.org/installer | php
$ php composer.phar install

Configuration

As a bare minimum requirement, activate extension in your behat.yml:

default:
  extensions:
    shvetsgroup\ParallelRunner\Extension: ~

Separate environments for test processes

In certain cases, it's useful to run testing processes in separate environments (e.g. if test results of one test could break other test's data). For this purpose, you should define behat profiles in your configuration file and pass their names to "profile" parameter of the extension like this:

default:
  extensions:
    shvetsgroup\ParallelRunner\Extension:
      profiles:
        - environment1
        - environment2
...

environment1:
  some_data: ...

environment2:
  some_data: ...

Now, let's say you've run the test with 4 parallel processes. The first process will be launched with "environment1" profile, second with "environment2", and the rest with the default profile (or profile, which was passed in --config option).

Running tests in parallel by default

If you want all of your tests to run in parallel, just specify default number of parallel processes in your configuration file. Note: this number can be overridden by --parallel option.

default:
  extensions:
    shvetsgroup\ParallelRunner\Extension:
      process_count: 4

Usage

Use "--parallel" or "-l" parameter to specify number of concurrent test processes. For example:

$ bin/behat -l 4

Troubleshooting

  1. If you're using Selenium, make sure it's launched in Hub mode to get all the benefits of parallelism (http://docs.seleniumhq.org/docs/07_selenium_grid.jsp).

  2. This extension does not work with features which have closures as definitions (you'll get "Serialization of 'Closure' is not allowed" errors most likely).

parallelrunner's People

Contributors

anton-siardziuk avatar ciarand avatar clementgautier avatar m0ppers avatar marekkalnik avatar neochief avatar

Watchers

 avatar  avatar

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.