reportportal / agent-js-cypress

Agent to integrate Cypress with ReportPortal.
https://www.npmjs.com/package/@reportportal/agent-js-cypress
Apache License 2.0
39 stars 39 forks source link

Is it possible to incorporate this plugin while executions done from cypress open? #166

Closed NSnietol closed 2 months ago

NSnietol commented 1 year ago

Hi dear team,

I have a project set up with the agent and works smoothly as long as I call my tests from the console using the parameters to the config file where I set up the report portal, however, if I run the cypress open command and then execute any script even when I call cypress open --config-file with the example file the results are not being aggregated.

Example cypress.config.ts

const registerReportPortalPlugin = require('@reportportal/agent-js-cypress/lib/plugin');

module.exports = defineConfig({
  reporter: '@reportportal/agent-js-cypress',
  reporterOptions: {
    endpoint: '',
    token: '',
    launch: 'Smoke',
    project: 'REPORT-PORTAL-CYPRESS',
    description: 'asserting that the most crucial functions of a program work',
    attributes: [
      {
        key: 'ENV',
        value: 'PRODUCTION',
      }
    ],
  },
  e2e: {
    setupNodeEvents(on: any, config: any) {
      return registerReportPortalPlugin(on, config);
    },
    specPattern: 'cypress/e2e/*.js',

  },
});
AmsterGet commented 2 months ago

Hello @NSnietol ! It is a Cypress restriction not to execute any reporters when running tests through the GUI. Closed Cypress repo request and mention in their documentation that The reporter used during cypress run only.