Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override 'cypress-multi-reporters' and configFile 'multi reporter-config.json' #208

Open
patoski123 opened this issue Dec 9, 2024 · 1 comment

Comments

@patoski123
Copy link

The cypress parallel plugin in good but is possible for user to override the cypress multi reports and use their own reporter and configFile ?

i tried but i just override the below

`I have followed all the script command in doc to override and use my own 'reporter' but it is still using the 'cypress-multi-reporter' and the configFile.

`> cypress run --headless --browser chrome --reporter json --reporter-options output=.run/reports/json/cucumber-report.json --spec cypress/features/e2eTests/login.feature,cypress/features/e2eTests/report.feature --reporter cypress-multi-reporters --reporter-options configFile=/Users/patricko/Documents/cypress-ts-project/multi-reporter-config.json``

I have this in my config file

` videosFolder: '.run/reports/video',
downloadsFolder: '.run/reports/downloads',
screenshotsFolder: '.run/reports/screenshot',

async setupNodeEvents(on, config) {
  // Add Cucumber Preprocessor Plugin
  await addCucumberPreprocessorPlugin(on, config);

  // Set up file preprocessor with esbuild
  on(
    'file:preprocessor',
    createBundler({
      plugins: [createEsbuildPlugin(config)],
    }),
  );

  // After run handler to write test results
  on('after:run', async (results) => {
    if (results) {
      await afterRunHandler(config);
      writeFileSync('.run/results.json', JSON.stringify(results));
    }
  });

  return config;

`



then i have this in my package.json file

`"cy:run": "cypress run --headless --browser chrome --reporter json --reporter-options output=.run/reports/json/cucumber-report.json",
"test:parallel": "cypress-parallel -s cy:run -d cypress/features -t 3 --verbose",
"test:parallel-with-report": "npm run test:parallel && npm run generate-test-report",
"generate-test-report": "node generate-consolidated-html-report.js",`
@ykushch
Copy link

ykushch commented Dec 10, 2024

@patoski123 there are some nuances. Here is the instruction that worth exploring: #90 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants