nyc_output folder not generated during automated build
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
- Área
- build-system, ci-cd, testing
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.
- With
@cypress/instrument-craand"start:coverage": "nyc --silent node index"(https://www.cypress.io/blog/2019/09/05/cypress-code-coverage-for-create-react-app-v3/)
- With
- 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_outputfolder? Is there.nyc_output/out.jsonfile. 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(nycobject) 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?

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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cypress-io/code-coverage
-
Dificultad 3/5 Medio día Aptitud para principiantes 40/100
cypress-io/code-coverage#1018 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cypress-io/code-coverage#993 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cypress-io/code-coverage#967 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cypress-io/code-coverage#959 ·
Los mantenedores suelen responder en 1 día
-
performance
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
cypress-io/code-coverage#933 ·
Los mantenedores suelen responder en 1 día
Todos los issues de cypress-io/code-coverage
Issues similares
-
test-reliability
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure/azure-sdk-for-js#40672 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
HarperFast/studio#2067 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
liberation-data/drivine#639 · 2 comentarios ·
Los mantenedores suelen responder en 1 día