Selenium grid
Pilot a selenium grid from nodejs and run several scenarios in parallel.
Example
An example can be found in the example directory.
Simply run bin/selenium-grid example/google.js example/yahoo.js
.
Install
Via npm:
$ npm install selenium-grid
via Git:
$ git clone https://github.com/themouette/selenium-grid.git && npm install
Configuration
Add a .selenium-grid.json
in your home directory or a selenium-grid.json
to
your project root.
If you use saucelabs, just use following configuration:
Launch tests
$ node_modules/selenium-grid/bin/selenium-grid --recursive tests/functional
To learn more about command line arguments, use
node_modules/selenium-grid/bin/selenium-grid --help
Before
To extend browser capabilities or do anything else before test executions,
simply use the before
option.
Runner instance will be made available through grid
variable and config is
available as config
:
//pre.js// You can register on any grid event// executed before grid initializationgrid;// executed before launching any test on desired browsergrid;// executed before every scenariogrid;grid;grid;grid;// or do anything else you want, such as initialize your own reporter, launch a// server...
example output
License
This project is released under MIT license.
Refer to the LICENCE file for more informations.
Go further
Some doc is available in the repository.