Skip to content

[qase-cypress-v2] Error when using the reporter without cypress-multi-reporters #597

Closed
@gibiw

Description

@gibiw

If you do not use cypress-multi-reporters, an error appears when running tests.

'[object Object]' reporter not found
invalid reporter '[object Object]'
TypeError: invalid reporter '[object Object]'
    at createInvalidReporterError (<embedded>:2764:123502)
    at k.reporter (<embedded>:2769:3431)
    at new k (<embedded>:2769:1480)
    at A.setRunnables (<embedded>:4445:15437)
    at Object.onTestsReceivedAndMaybeRecord (<embedded>:4498:28550)
    at p.<anonymous> (<embedded>:4445:47245)
    at p.emit (node:events:514:28)
    at <embedded>:4445:26630
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Example of cypress config:

const cypress = require('cypress');
const plugins = require('./cypress/plugins/index.js');

module.exports = cypress.defineConfig({
  reporter: 'cypress-qase-reporter',
  reporterOptions: {
    mode: 'testops',
    debug: true,
    testops: {
      api: {
        token: 'token',
      },

      project: 'project_code',
      uploadAttachments: true,
      run: {
        complete: true,
      },
    },

    framework: {
      cypress: {
        screenshotsFolder: 'cypress/screenshots',
      },
    },

  },
  video: false,
  e2e: {
    setupNodeEvents(on, config) {
      return require('./cypress/plugins/index.js')(on, config);
    },
  }
});

As a workaround use cypress-multi-reporters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions