grunt-datadriver is a grunt plugin to run selenium tests with Mocha and WebdriverIO
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-datadriver --save-dev
The "datadriver" task
In your project's Gruntfile, add a section named
datadriver to the data
object passed into
Run this task with the
grunt datadriver command.
To use a cloud service like Sauce Labs make sure you define
port properties like in the example below as well as authenticate yourself with your username and key.
If you specify a
tunnel-identifier within your
desiredCapabilities object, the task
will automatically try to establish a tunnel connection via Sauce Connect. With the
tunnel-flags property you can pass command line options to the created Sauce Tunnel.
All options get passed into the WebdriverIO
remote function. So this is the place where
you can define your driver instance. You'll find more informations about all WebdriverIO
options here. You can overwrite these
options in any target. Also you have to define all Mocha options here. The following
If true you are only interested in the first execption
Options: bdd | tdd | qunit | exports
Specify the interface to use.
Options: Base | Dot | Doc | TAP | JSON | HTML | List | Min | Spec | Nyan | XUnit | Markdown | Progress | Landing | JSONCov | HTMLCov | JSONStream
Allows you to specify the reporter that will be used.
Specify the "slow" test threshold, defaulting to 75ms. Mocha uses this to highlight test-cases that are taking too long.
Specifies the test-case timeout.
When specified will trigger mocha to only run tests matching the given pattern which is internally compiled to a
If true it will automatically update the current job and does publish it.
If set grunt-webdriver will pipe reporter output into given file path
If true it prevents the original process.stdout.write from executing - no output at all
If true it will not spawn a new selenium server process (useful if you use Sauce Labs without Sauce Tunnel)
Options for starting the Selenium server. For more information check out the selenium-standalone project.
Options for installing Selenium dependencies. For more information check out the selenium-standalone project.