- Driver Configuration
- Error Formatting
- Tags
- Prevent Browser Reload
- CoffeeScript Step Scaffold
- Configuration File Path
- Scaffold Creation
- Version
You can customize which driver your tests use via the --driver command line flag. The default driver is chrome.
For example:
- --driver=phantomjs
- --driver=firefox
You can customize the format in which your errors are formatted via the --error_formatter command line flag. The default format is five lines of the stack trace with a blue first line. To customize the formatter see below
my_formatter.js should export a method like the following
module.exports = function(err) {
console.log("my custom error formatter", err.stack);
}To only run selected features include --tags=@myTag and insert @myTag directly before the intended feature(s).
To speed up testing, an optional --preventReload flag can be passed to prevent the web driver from restarting after each feature:
./node_modules/.bin/pioneer --preventReload=trueTo have cucumber generate the step scaffold automatically in CoffeeScript, use the optional --coffee line flag.
./node_modules/.bin/pioneer --coffeePioneer configuration options can be declared in the form of a JSON file. To declare the path to this file use the optional --configPath= flag. Addtional information on the format of this file can be found here
./node_modules/.bin/pioneer --configPath=myConfig.jsonPioneer can generate a scaffold for your first tests automatically using the optional --scaffold command line flag. This generates a tests/ directory, with features/, steps/ and widgets/. It creates simple.feature and simple.js files that include your first Pioneer test! It also creates a pioneer.json file in your current working directory. This config file automatically includes the created feature files, and the following information:
{
"feature": "tests/features",
"require": [
"tests/steps",
"tests/widgets"
],
"format": "pioneerformat.js",
"driver": "chrome",
"error_formatter": "errorformat.js",
"preventReload": false,
"coffee": false
}You can show some extra information about the test run by setting the --verbose flag. This can be used to override the value in the config file. You will need to use --verbose=false to turn off verbosity that has been set in the config file.
You can display the current version of Pioneer that you are using by passing the optional --version or -v command line flag.