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

cypress json reporter options does not generate output file #12020

Closed
lmordell opened this issue Sep 14, 2022 · 5 comments
Closed

cypress json reporter options does not generate output file #12020

lmordell opened this issue Sep 14, 2022 · 5 comments
Assignees
Labels
blocked: third-party outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx stale type: bug

Comments

@lmordell
Copy link

Current Behavior

Run cypress e2e tests with a json reporter and define an output file. The output file is not generated; or, if the file exists, the json output is not written to the file.

Expected Behavior

When setting --reporter json --reporterOptions output=results.json, the output file should be generated and contain the results from the test run in JSON format.

Steps to Reproduce

Run the e2e suite for a given app. Set the reporter to json and reportOptions to output=results.json

e.g. nx e2e my-app-e2e --reporter json --reporterOptions output=results.json

Environment

 >  NX   Report complete - copy this into the issue template

   Node : 16.16.0
   OS   : darwin x64
   npm  : 8.11.0

   nx : 14.5.6
   @nrwl/angular : 14.5.6
   @nrwl/cypress : 14.5.6
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.6
   @nrwl/eslint-plugin-nx : 14.5.6
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.6
   @nrwl/js : 14.5.6
   @nrwl/linter : 14.5.6
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.5.6
   @nrwl/web : 14.5.6
   @nrwl/workspace : 14.5.6
   typescript : 4.7.4
   ---------------------------------------
   Local workspace plugins:
   ---------------------------------------
   Community plugins:
   	 @nguniversal/express-engine: 14.2.0
   	 @nguniversal/builders: 14.2.0
@barbados-clemens barbados-clemens self-assigned this Sep 15, 2022
@barbados-clemens barbados-clemens added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Sep 15, 2022
@barbados-clemens
Copy link
Contributor

I just tried this with defining it also in the cypress.json file and the same behavior happens as the command line. Where it prints the JSON to the console, but doesn't write a file.

Looks to be a bug with cypress and mocha reporter integration currently
cypress-io/cypress#18014

@lmordell
Copy link
Author

Thanks for the investigation @barbados-clemens . Hope it gets resolved on cypress' end soon.

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@Co0olCat
Copy link

Co0olCat commented Apr 6, 2023

BUMP

@github-actions
Copy link

github-actions bot commented May 7, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: third-party outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx stale type: bug
Projects
None yet
Development

No branches or pull requests

3 participants