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.
Install
- Install npm package.
npm i --save-dev cypress-terminal-report
- Register the output plugin in
cypress/plugins/index.js
module.exports = (on) => { require('cypress-terminal-report').installPlugin(on); };
- 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.