Skip to content

webdrio.io reporter for generating cucumber snippets

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

johanvaniperen/wdio-cucumber-snippet-reporter

Repository files navigation


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!

Spec Reporter

Installation

The easiest way is to keep wdio-cucumber-snippet-reporter as a devDependency in your package.json.

{
  "devDependencies": {
    "wdio-cucumber-snippet-reporter": "~0.0.5"
  }
}

You can simple do it by:

npm i wdio-cucumber-snippet-reporter -D

Configuration

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.js
module.exports = {
  // ...
  reporters: ['dot', 'spec', 'cucumber-snippet'],
  // ...
  cucumberOpts: {
    // ...
      ignoreUndefinedDefinitions: true,  
    // ...    
  }
};

Development

All commands can be found in the package.json. The most important are:

Watch changes:

$ npm run watch

Run tests:

$ npm test

# run test with coverage report:
$ npm run test:cover

Build package:

$ npm run build

About

webdrio.io reporter for generating cucumber snippets

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published