0.2.1 • Published 6 years ago

wdio-errorshot-reporter v0.2.1

Weekly downloads
182
License
MIT
Repository
github
Last release
6 years ago

WDIO Errorshot Reporter

A WebdriverIO plugin to take control over the name of error screenshots.

Installation

Add the reporter to your dev dependencies:

npm install wdio-errorshot-reporter --save-dev

Configuration

Including the reporter

Require and add the reporter to your wdio.conf.js:

// We need to require the reporter until I have managed to get it included in WDIO
const errorshot = require('wdio-errorshot-reporter');

// wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot', errorshot],
  // ...
};

Changing the screenshot name

To change the name of your screenshots you can use static text and placeholders:

// wdio.conf.js
module.exports = {
  // ...
  reporterOptions: {
      errorshotReporter: {
          template: 'foobar-%capId%_%timestamp%_%parent%-%title%'
      }
  },
  // ...
};

The following placeholders can be used:

'capId' or 'browser' or 'browserName': Browser capability name, e.g. chrome, firefox

'timestamp': Timestamp of the screenshot

'parent': Parent name of the test, e.g. Mocha: describe()

'title': Title of the individual test, e.g. Mocha: it()

Executing Tests

To run the unit tests and verify everything works as expected you can run:

npm run test

Contributing

If you find any issues while using the package feel free to open an issue or contribute to existing issues.

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago