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

"combineCoverage" logged in stdout, creating huge logs #652

Open
jhpedemonte opened this issue May 12, 2023 · 2 comments
Open

"combineCoverage" logged in stdout, creating huge logs #652

jhpedemonte opened this issue May 12, 2023 · 2 comments
Labels

Comments

@jhpedemonte
Copy link

Logs and screenshots

Here's the end of the log for one of my tests (as stylized by Firefox):

Screenshot 2023-05-12 at 2 02 45 PM

Each of those "request combineCoverage" lines are huge.

Versions

  • What is this plugin's version? If this is NOT the latest released version can you try the latest version, please? 3.10.4
  • If the plugin worked before in version X, but stopped after upgrading to version Y, please try the released versions between X and Y to see where the breaking change was.
  • What is Cypress version? 12.10.0
  • What is your operating system? Debian, from Cypress Docker images
  • What is the shell? bash
  • What is the Node version? 16.17
  • What is the NPM version?
  • How do you instrument your application? Cypress does not instrument web application code, so you need to do it yourself. @cypress/instrument-cra
  • When running tests, if you open the web application in regular browser, and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot?
  • Is there .nyc_output folder? Is there .nyc_output/out.json file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?
  • Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files
      "nyc": {
    "extends": "@istanbuljs/nyc-config-typescript",
    "all": true,
    "exclude": [
      "build/**",
      "coverage-cypress/**",
      "cypress/**",
      "**/__fixtures__/**",
      "**/__mocks__/**",
      "**/__tests__/**",
      "**/messages.{ts,js}",
      "**/*.story.*",
      "**/story.*",
      "**/*.d.ts"
    ],
    "report-dir": "./coverage-cypress",
    "temp-dir": "./coverage-cypress/.nyc_output",
    "reporter": [
      "text-summary",
      "json",
      "html"
    ]
    }
    
  • Do you run Cypress tests in a Docker container? Yes

Describe the bug

The combineCoverage task is logged (in both files saved to cypress/logs and to stdout), even though that task is run with { log: false} (see 8f6154a).

Link to the repo

@chrisbreiding
Copy link

chrisbreiding commented May 15, 2023

log: false keeps the cy.log() call from logging to the Cypress command log. It has no effect on the code coverage logging.

Would need to add an option to prevent the logging here.

@chrisbreiding chrisbreiding removed their assignment May 15, 2023
@chrisbreiding chrisbreiding added the type: enhancement New feature or request label May 15, 2023
@jhpedemonte
Copy link
Author

That's only for the "Saving code coverage for ..." message (which is quite small). I'm more concerned about the "request combineCoverage {large JSON string}" messages. I did a quick scan of the code-coverage, but I can't find where that message is coming from -- makes me think this is logged by cy.task().

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

No branches or pull requests

2 participants