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

multiple-cucumber-html-reporter

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiple-cucumber-html-reporter - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

.github/dependabot.yml

7

lib/collect-jsons.js

@@ -16,3 +16,6 @@ 'use strict';

function formatToLocalIso(date) {
return DateTime.fromJSDate(date).toFormat('yyyy/MM/dd HH:mm:ss')
return typeof date === 'string' ?
DateTime.fromISO(date).toFormat('yyyy/MM/dd HH:mm:ss')
:
DateTime.fromJSDate(date).toFormat('yyyy/MM/dd HH:mm:ss');
}

@@ -58,3 +61,3 @@

json.metadata = Object.assign({reportTime: reportTime}, json.metadata)
json.metadata.reportTime = formatToLocalIso(json.metadata.reportTime)
json.metadata.reportTime = formatToLocalIso(json.metadata.reportTime);
}

@@ -61,0 +64,0 @@

{
"name": "multiple-cucumber-html-reporter",
"version": "3.0.2",
"version": "3.0.3",
"description": "Generate beautiful Cucumber.js reports for multiple instances (browsers / devices)",

@@ -39,3 +39,3 @@ "keywords": [

"lodash": "^4.17.21",
"luxon": "^3.1.1",
"luxon": "^3.2.1",
"open": "^8.4.0",

@@ -47,4 +47,4 @@ "uuid": "^9.0.0"

"nyc": "^15.1.0",
"release-it": "^15.5.1"
"release-it": "^15.6.0"
}
}

@@ -1,8 +0,7 @@

Multiple Cucumber HTML Reporter
===============================
[![Join the chat at https://gitter.im/wswebcreation/protractor-cucumber-typescript-boilerplate](https://badges.gitter.im/wswebcreation/multiple-cucumber-html-reporter.svg)](https://gitter.im/wswebcreation/multiple-cucumber-html-reporter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![example workflow](https://github.com/wswebcreation/multiple-cucumber-html-reporter/actions/workflows/test.yml/badge.svg)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
# Multiple Cucumber HTML Reporter
[![NPM](https://nodei.co/npm/multiple-cucumber-html-reporter.png)](https://nodei.co/npm/multiple-cucumber-html-reporter/)
[![Discord](https://img.shields.io/discord/1057960728692260975?label=Chat%20on%20Discord&logo=Discord&style=for-the-badge)](https://discord.gg/d6rfHkSDjc)
[![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/WasiqB/multiple-cucumber-html-reporter/test.yml?label=Test%20Workflows&logo=GitHub&style=for-the-badge)](https://github.com/WasiqB/multiple-cucumber-html-reporter/actions)
[![GitHub](https://img.shields.io/github/license/WasiqB/multiple-cucumber-html-reporter?logo=open%20source%20initiative&style=for-the-badge)](http://opensource.org/licenses/MIT)
[![npm](https://img.shields.io/npm/dm/multiple-cucumber-html-reporter?label=NPM%20Downloads&logo=NPM&style=for-the-badge)](https://nodei.co/npm/multiple-cucumber-html-reporter/)

@@ -16,10 +15,8 @@ Multiple Cucumber HTML Reporter is a reporting module for Cucumber to parse the JSON output to a beautiful report. The difference between all the other reporting modules on the market is that this module has:

# Maintainer(s) Wanted
Unfortunately I no longer have the time and/or resources to work on this project.
## 🙏 Appreciation
For now only pull requests of external contributors are being reviewed, accepted and welcomed (with some delay). No more bug fixes or new features will be implemented by me.
Thanks @wswebcreation for beliveing in me and transferring the ownership of the project.
If you are interested in giving this project some ❤️, please chime in. I'm also happy to transfer the package to someone else and give you all the rights.
## Important
# Important
> **The default time notation in Cucumber is in nanoseconds. When you use a version of Cucumber that uses milliseconds (like CucumberJS 2 and 3) and you want to show the duration you should use [`displayDuration`](./README.MD#displayDuration) AND [`durationInMS = true`](./README.MD#durationinms)**

@@ -43,5 +40,6 @@

## Install
Install this module locally with the following command:
``` bash
```bash
npm install multiple-cucumber-html-reporter

@@ -52,3 +50,3 @@ ```

``` bash
```bash
npm install multiple-cucumber-html-reporter --save

@@ -59,5 +57,7 @@ npm install multiple-cucumber-html-reporter --save-dev

## Compatibility
Multiple Cucumber HTML Reporter **now works with CucumberJS 1, 2, 3 and 4**.
## Usage
> **If you are using Protractor I would advise you to use [protractor-multiple-cucumber-html-reporter-plugin](https://github.com/wswebcreation/protractor-multiple-cucumber-html-reporter-plugin).**

@@ -70,31 +70,32 @@

### cucumber-js 2.x and lower
Multiple Cucumber HTML Reporter transforms the Cucumber JSON output to a beautiful report. In order to let this happen add the piece of code that is placed below to CucumberJS `AfterFeatures`-hook.
```javascript
const report = require('multiple-cucumber-html-reporter');
const report = require("multiple-cucumber-html-reporter");
report.generate({
jsonDir: './path-to-your-json-output/',
reportPath: './path-where-the-report-needs-to-be/',
metadata:{
browser: {
name: 'chrome',
version: '60'
},
device: 'Local test machine',
platform: {
name: 'ubuntu',
version: '16.04'
}
jsonDir: "./path-to-your-json-output/",
reportPath: "./path-where-the-report-needs-to-be/",
metadata: {
browser: {
name: "chrome",
version: "60",
},
customData: {
title: 'Run info',
data: [
{label: 'Project', value: 'Custom project'},
{label: 'Release', value: '1.2.3'},
{label: 'Cycle', value: 'B11221.34321'},
{label: 'Execution Start Time', value: 'Nov 19th 2017, 02:31 PM EST'},
{label: 'Execution End Time', value: 'Nov 19th 2017, 02:56 PM EST'}
]
}
device: "Local test machine",
platform: {
name: "ubuntu",
version: "16.04",
},
},
customData: {
title: "Run info",
data: [
{ label: "Project", value: "Custom project" },
{ label: "Release", value: "1.2.3" },
{ label: "Cycle", value: "B11221.34321" },
{ label: "Execution Start Time", value: "Nov 19th 2017, 02:31 PM EST" },
{ label: "Execution End Time", value: "Nov 19th 2017, 02:56 PM EST" },
],
},
});

@@ -104,5 +105,5 @@ ```

### cucumber-js 3.x
Since cucumber-js 3.x the `AfterFeatures` hook is not supported anymore. To use Multiple Cucumber HTML Reporter it must be run in a separate node executable after the cucumber-js process finishes.
> **IMPORTANT:**

@@ -115,3 +116,5 @@

## Options
### `jsonDir`
- **Type:** `String`

@@ -125,2 +128,3 @@ - **Mandatory:** Yes

### `reportPath`
- **Type:** `String`

@@ -134,2 +138,3 @@ - **Mandatory:** Yes

### `staticFilePath`
- **Type:** `boolean`

@@ -142,2 +147,3 @@ - **Default:** `false`

### `openReportInBrowser`
- **Type:** `boolean`

@@ -150,2 +156,3 @@ - **Default:** `false`

### `saveCollectedJSON`
- **Type:** `boolean`

@@ -161,2 +168,3 @@ - **Default:** `false`

### `disableLog`
- **Type:** `boolean`

@@ -175,3 +183,5 @@ - **Default:** `false`

```
### `pageTitle`
- **Type:** `string`

@@ -184,2 +194,3 @@ - **Mandatory:** No

### `reportName`
- **Type:** `string`

@@ -191,2 +202,3 @@ - **Mandatory:** No

### `pageFooter`
- **Type:** `string`

@@ -198,2 +210,3 @@ - **Mandatory:** No

### `plainDescription`
- **Type:** `boolean`

@@ -208,6 +221,9 @@ - **Default:** `false`

<div>
<p><strong>Test description </strong> : The test implements comparisons using all our datatypes</p>
<p><strong>Expected result </strong> : Device does not reset</p>
<p><strong>Feature type </strong> : Robustness</p>
<p><strong>Comments </strong> : Test covers comparison operators</p>
<p>
<strong>Test description </strong> : The test implements comparisons using
all our datatypes
</p>
<p><strong>Expected result </strong> : Device does not reset</p>
<p><strong>Feature type </strong> : Robustness</p>
<p><strong>Comments </strong> : Test covers comparison operators</p>
</div>

@@ -219,2 +235,3 @@ ```

### `displayDuration`
- **Type:** `boolean`

@@ -230,2 +247,3 @@ - **Default:** `false`

### `durationInMS`
- **Type:** `boolean`

@@ -239,2 +257,3 @@ - **Default:** `false`

### `hideMetadata`
- **Type:** `boolean`

@@ -247,2 +266,3 @@ - **Default:** `false`

### `displayReportTime`
- **Type:** `boolean`

@@ -255,2 +275,3 @@ - **Default:** `false`

### `useCDN`
- **Type:** `boolean`

@@ -263,2 +284,3 @@ - **Default:** `false`

### `customStyle`
- **Type:** `path`

@@ -272,2 +294,3 @@ - **Mandatory:** No

### `overrideStyle`
- **Type:** `path`

@@ -280,2 +303,3 @@ - **Mandatory:** No

### `metadata`
- **Type:** `JSON`

@@ -306,2 +330,3 @@ - **Mandatory:** No

### `customMetadata`
- **Type:** `boolean`

@@ -318,6 +343,6 @@ - **Default:** `false`

metadata: [
{name: 'Environment v.', value: '12.3'},
{name: 'Plugin v.', value: '32.1'},
{name: 'Variable set', value: 'Foo'}
]
{ name: "Environment v.", value: "12.3" },
{ name: "Plugin v.", value: "32.1" },
{ name: "Variable set", value: "Foo" },
];
```

@@ -328,3 +353,3 @@

>**IMPORTANT:**
> **IMPORTANT:**
> This does not work correctly if features have different sets of metadata. Try to avoid this situation.

@@ -335,2 +360,3 @@

### `customData`
- **Type:** `object`

@@ -357,2 +383,3 @@ - **Mandatory:** No

#### `customData.title`
- **Type:** `string`

@@ -365,2 +392,3 @@ - **Mandatory:** No

#### `customData.data`
- **Type:** `array`

@@ -372,8 +400,7 @@ - **Mandatory:** yes

```js
data: [
{label: 'your label', value: 'the represented value'}
]
data: [{ label: "your label", value: "the represented value" }];
```
## Metadata
The report can also show on which browser / device a feature has been executed. It is shown on the features overview in the table as well as on the feature overview in a container.

@@ -385,3 +412,2 @@

```javascript

@@ -410,2 +436,3 @@ // This represents the Cucumber JSON file that has be retrieved

### `metadata.app.name`
- **Type:** `string`

@@ -416,2 +443,3 @@

### `metadata.app.version`
- **Type:** `string`

@@ -422,2 +450,3 @@

### `metadata.browser.name`
- **Type:** `string`

@@ -429,2 +458,3 @@ - **Possible values:** `internet explorer | edge | chrome | firefox | safari`

### `metadata.browser.version`
- **Type:** `string`

@@ -434,5 +464,6 @@

>If no correct value is provided the `?`-icon with the text `not known` is shown
> If no correct value is provided the `?`-icon with the text `not known` is shown
### `metadata.device`
- **Type:** `string`

@@ -445,2 +476,3 @@

### `metadata.platform.name`
- **Type:** `string`

@@ -452,2 +484,3 @@ - **Possible values:** `windows | osx | linux | ubuntu | android | ios`

### `metadata.platform.version`
- **Type:** `string`

@@ -457,8 +490,10 @@

>If no correct value is provided the `?`-icon with the text `not known` is shown
> If no correct value is provided the `?`-icon with the text `not known` is shown
### Metadata example features overview
![Snapshot - Features overview browser / device info](./docs/images/overview-metadata.jpg "Snapshot - Features overview browser / device info")
### Metadata example scenario with and without known data
![Snapshot - Scenario browser / device info](./docs/images/scenario-browser-metadata.jpg "Snapshot - Scenario browser / device info")

@@ -469,3 +504,5 @@ ![Snapshot - Scenario app / device info](./docs/images/scenario-app-metadata.jpg "Snapshot - Scenario app / device info")

## FAQ
### Only 1 report is shown in the features overview table
It could be that the name of the Cucumber JSON file that has been saved is not unique (enough).

@@ -488,6 +525,7 @@

### Metadata shows `not known` or not the correct icons
There could be 2 causes:
1. The metadata has not (correctly) been added to the Cucumber JSON.
2. The `metadata.browser.name` or `metadata.platform.name` can't be mapped to the right icon
1. The metadata has not (correctly) been added to the Cucumber JSON.
2. The `metadata.browser.name` or `metadata.platform.name` can't be mapped to the right icon

@@ -497,2 +535,3 @@ To fix this see the part about **Metadata** and check the **possible values**.

### How to attach Screenshots to HTML report
You can attach screenshots at any time to a Cucumber JSON file. Just create a Cucumber `scenario`-hook that will handle this. You can add them during running or when a `scenario` failed.

@@ -503,2 +542,3 @@

### How to attach Plain Text to HTML report
You can attach plain-text / data at any time to a Cucumber JSON file to help debug / review the results. You can add them during running or when a `scenario` failed.

@@ -509,2 +549,3 @@

### How to attach pretty JSON to HTML report
You can attach JSON at any time to a Cucumber JSON file. You can add them during running or when a `scenario` failed.

@@ -515,8 +556,11 @@

## Changelog and Releases
The Changelog and releases can be found [here](https://github.com/wswebcreation/multiple-cucumber-html-reporter/releases)
## Contributing
How to contribute can be found [here](./docs/CONTRIBUTING.md)
## Credits
In the search for a reporting tools for Cucumber I found a few tools that helped me a lot:

@@ -523,0 +567,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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