🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

cypress-html-reporter

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-html-reporter

A simple HTML report generator for the Cypress tests

11.0.0
latest
npm
Version published
Weekly downloads
855
-10%
Maintainers
1
Weekly downloads
 
Created
Source

cypress-html-reporter

A simple Cypress HTML reporter. Generates an HTML report at the end of the test execution. (Works only for Cypress ver. 13.4 and above)

Installation

npm install cypress-html-reporter --save

Usage

Add the following to the cypress.config.ts/js file:

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  retries: {
    runMode: 1
  },
  e2e: {
    video: true,
    setupNodeEvents(on, config) {
      // implement node event listeners here
      require('cypress-html-reporter/GenerateReport')(on, config)
    },
  },
});

Once the test execution is done, start the report server. (Create a .js file at the project root directory and run following command.)

const startServer = require('cypress-html-reporter/StartServer')
startServer()

This will host the report server (embedded screenshots/video links are blocked by the browser hence this is necessary). Navigate to http://127.0.0.1:8080/ in the browser.

Sample report screenshot can be found at: https://github.com/rk508501/CypressReporter/blob/main/assets/Sample_Report.png

License

MIT

FAQs

Package last updated on 27 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts