Skip to content

Bam6ycha/cypress-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published