nyc_output folder not generated during automated build

Abierto
#522 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cypress, nodejs, react

Línea de trabajo

Comienza con la sección Debugging del README y reproduce el comando DEBUG=code-coverage npx cypress run localmente y en el entorno de build automatizado. Compara .nyc_output/out.json y window.__coverage__, y después inspecciona la configuración de @cypress/instrument-cra y el recorrido de npm run build. Se considera terminado cuando se haya identificado la causa de la salida de coverage o instrumentación ausente y se haya verificado el comportamiento esperado del build automatizado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Logs and screenshots
Please provide debug logs by running Cypress from the terminal with DEBUG=code-coverage environment variable set, see the Debugging section of the README file.

Versions

  • What is this plugin's version? If this is NOT the latest released version can you try the latest version, please? "^3.9.11
  • 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? ^6.0.0
  • What is your operating system? Microsoft OS
  • What is the shell? CMD
  • What is the Node version? 16.3.0
  • What is the NPM version? 7.15.1
  • How do you instrument your application? Cypress does not instrument web application code, so you need to do it yourself.
  • 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? Yes
  • 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? Yes
  • Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files: No
  • Do you run Cypress tests in a Docker container?: No

Describe the bug
I'm running Cypress with the command
DEBUG=code-coverage npx cypress run
Cypress is able to generate .nyc_output locally, but not in automated build (Codebuild). Should the .nyc_output always be generated by Cypress on every cypress run?

image

I've recently discovered that my app built out to a server is NOT showing code coverage instrumentation in window.__coverage. Does this CRA instrumentation package work only for local environments? How do I instrument the app with npm run build?

Lenguaje dominante
TypeScript
Estrellas
440
Forks
114
Merge medio
42 min
PR fusionados (30 d)
19

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cypress-io/code-coverage

Todos los issues de cypress-io/code-coverage

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.