Skip to content

Latest commit

 

History

History
71 lines (59 loc) · 1.6 KB

README.md

File metadata and controls

71 lines (59 loc) · 1.6 KB

The examples are written with Cypress >=9 compatibility in mind, but the agent also works with Cypress <9.

Installation:

Install the packages:

npm install

Configuration:

Specify the options in the cypress.config.js:

module.exports = defineConfig({
  reporter: '@reportportal/agent-js-cypress',
  reporterOptions: {
    endpoint: 'http://your-instance.com:8080/api/v1',
    token: '00000000-0000-0000-0000-000000000000',
    launch: 'LAUNCH_NAME',
    project: 'PROJECT_NAME',
    description: 'LAUNCH_DESCRIPTION',
  },
  e2e: {
    setupNodeEvents(on, config) {
      return registerReportPortalPlugin(on, config)
    },
  },
});

Using cypress-multi-reporters package:

module.exports = defineConfig({
  reporter: 'cypress-multi-reporters',
  reporterOptions: {
    reporterEnabled: ['@reportportal/agent-js-cypress', 'mochawesome'],
    mochawesomeReporterOptions: {
      reportDir: 'cypress/reports/mocha',
      quite: true,
      overwrite: false,
      html: false,
      json: true,
    },
    reportportalAgentJsCypressReporterOptions: {
      endpoint: 'http://your-instance.com:8080/api/v1',
      token: '00000000-0000-0000-0000-000000000000',
      launch: 'LAUNCH_NAME',
      project: 'PROJECT_NAME',
      description: 'LAUNCH_DESCRIPTION',
    },
  },
  e2e: {
    setupNodeEvents(on, config) {
      return registerReportPortalPlugin(on, config)
    },
  },
});

Run tests

To run the tests, use the following command:

npm test