jennifer-shehane / cypress-terminal-report

Better terminal output for failed cypress tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cypress terminal report

Plugin for cypress that adds better terminal output when tests fail on the terminal for better debugging. Prints cy commands, console.warn, console.error and request data captured with cy.route.

demo

Install

  1. Install npm package.
    npm i --save-dev cypress-terminal-report
  2. Register the output plugin in cypress/plugins/index.js
    module.exports = (on) => {
       require('cypress-terminal-report').installPlugin(on);
    };
  3. Register the log collector support in cypress/support/index.js
    require('cypress-terminal-report').installSupport();

Options

The plugin install can receive some options: .installPlugin(on, options):

  • options.defaultTrimLength - default: 200; max length of cy.log and console.warn/console.error.
  • options.commandTrimLength - default: 600; max length of cy commands.
  • options.routeTrimLength - default: 5000; max length of cy.route request data.

About

Better terminal output for failed cypress tests.

License:MIT License


Languages

Language:JavaScript 100.0%