1.0.1 • Published 7 years ago
project-carrot v1.0.1
Project Carrot
Flags and command line arguments
You may use command line arguments. Here is the list of all available flags.
| Flag Name | Info | Example |
|---|---|---|
| --config | path to config file with variables | conf.js |
| --project | path to project config file | dolorSit.conf.js |
| --features | path to file with feature names | features.js |
| --tags | one or more tags (in quotes) | @tag1 |
| --headless | start Google Chrome without UI | - |
| --multi-threaded | use more than one browser instance | - |
All flags have shortened version. You can use only first letter.
Note: if you are using one letter you should use
-instead of--Note: you cannot use
--tagswith--multi-threaded. In this case script will ignore--tagsflag
Example
./node-modules/project-carrot -c=conf.js -p=dolorSit.conf.js -f=features.js -t='@tag1 @tag2' -h -m
Config
You should create config file inside your working directory with some variables.
module.exports = {
// path to WebdriverIO module
pathToWdio: './node_modules/.bin/wdio',
// if You have more than one config file You may set suffix on that files here
// example: if there are 'aProject.conf.js' and 'bProject.conf.js' projectConfSuffix: 'Project.conf.js'
// also you can set full filename here and don't use -p flag
projectConfSuffix: 'Project.conf.js',
// path to config with features
pathToFeaturesConf: './globalCarrotFeatures.js'
};You should set default falues for described variables.
Note: if you set filename to
globalCarrotConfig.jsyou sould not set-cflag. File will be catched automaticaly
Features
You should create config file inside your working directory with path to feature files.
Example
module.exports = {
// this is important part
specs: [
// you can pass folder
'./require/projects/ProjectA/Features/onBuild/*.feature',
// or files
'./require/projects/ProjectA/Features/onBuild/2_main_form.feature',
'./require/projects/ProjectA/Features/4_main_elements_adding.feature'
]
};