cypress-io / code-coverage

Saves the code coverage collected during Cypress tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"combineCoverage" logged in stdout, creating huge logs

jhpedemonte opened this issue · comments

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

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.

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().