A WebdriverIO plugin to generate cucumber step definitions snippets to paste in your code.
Run a test. It automaticly reports you the snippet output when steps are not specified. Copy and paste the snippet in your step definitions file. When ready with your step remove the line "return 'pending'" and off you go!
The easiest way is to keep
wdio-cucumber-snippet-reporter as a devDependency in your
You can simple do it by:
npm i wdio-cucumber-snippet-reporter -D
Following code shows the default wdio test runner configuration. Just add
'cucumber-snippet' as reporter
to the array.
To make it work, the parameter value of: ignoreUndefinedDefinitions in cucumberOpts must be set to true.
// wdio.conf.jsmoduleexports =// ...reporters: 'dot' 'spec' 'cucumber-snippet'// ...cucumberOpts:// ...ignoreUndefinedDefinitions: true// ...;
All commands can be found in the package.json. The most important are:
$ npm run watch
$ npm test# run test with coverage report:$ npm run test:cover
$ npm run build