New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wdio-cucumberjs-json-reporter

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wdio-cucumberjs-json-reporter - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "wdio-cucumberjs-json-reporter",
"version": "1.0.3",
"version": "1.0.4",
"description": "A WDIO reporter that creates CucumberJS JSON files for WebdriverIO V5+",

@@ -5,0 +5,0 @@ "main": "./build/reporter.js",

@@ -18,3 +18,3 @@ # wdio-cucumberjs-json-reporter

It will also add metadata about the running instance to the feature file and last but not least, it will give you the opportunity to add attachments to the JSON output.
It will also add metadata about the running instance to the feature file and last but not least, it will give you the opportunity to add attachments to the JSON output.

@@ -38,3 +38,3 @@ ## Installation

so it will be added automatically to your `package.json`
so it will automatically be added to your `package.json`

@@ -111,3 +111,3 @@ Instructions on how to install `WebdriverIO` can be found [here](http://webdriver.io/guide/getstarted/install.html).

> The metadata object needs to have the `cjson` prefix, otherwise it will not work!
> The metadata object needs to have the `cjson` prefix, otherwise it will not work!

@@ -179,1 +179,59 @@ ### Metadata values

cucumberJson.attach(browser.takeScreenshot(), 'image/png');
```
## Use it with multiple-cucumber-html-reporter
The previous module for WebdriverIO V4, [wdio-multiple-cucumber-html-reporter](https://github.com/wswebcreation/wdio-multiple-cucumber-html-reporter),
had a build in connection with the [multiple-cucumber-html-reporter](https://github.com/wswebcreation/multiple-cucumber-html-reporter)-module. **This is not the case for this
reporter** because the new setup of WebdriverIO V5 is based on a instance which doesn't allow me to use the `onPrepare` and `onComplete` hook.
If you still want to use the [multiple-cucumber-html-reporter](https://github.com/wswebcreation/multiple-cucumber-html-reporter)-module you can add the following to your config file.
- Install the module with
```bash
npm install multiple-cucumber-html-reporter --save-dev
```
Maybe even install `fs-extra` to remove the report folder before you start all sessions.
```bash
npm install fs-extra --save-dev
```
- Add this to your configuration file
```js
// Import the module
const { generate } = require('multiple-cucumber-html-reporter');
const { removeSync } = require('fs-extra');
// Example wdio.conf.js
exports.config = {
//..
// =====
// Hooks
// =====
/**
* Gets executed once before all workers get launched.
*/
onPrepare: () => {
// Remove the `.tmp/` folder that holds the json and report files
removeSync('.tmp/');
},
/**
* Gets executed after all workers got shut down and the process is about to exit.
*/
onComplete: () => {
// Generate the report when it all tests are done
generate({
// Required
// This part needs to be the same path where you store the JSON files
// default = '.tmp/json/'
jsonDir: '.tmp/json/',
reportPath: '.tmp/report/',
// for more options see https://github.com/wswebcreation/multiple-cucumber-html-reporter#options
});
}
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc