• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

262
Vistas
How to get cypress code coverage for iframe?

I'm trying to generate cypress code coverage for iframe which is part of my application. Cypress creates an object called __coverage__ for the instrumentation that is present in my iframe window(main content). But at the end of each spec, it shows the below message enter image description here

Without an iframe, it's generating the report.

I followed this link https://github.com/cypress-io/code-coverage#instrument-your-application

about 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I don't think adding an <iframe> can affect the code coverage, since the counters in __coverage__ are counting lines of javascript code and not HTML.

To check it out, I downloaded the latest repo from code-coverage/tree/v3.10.0 and added an <iframe> to one of the simple examples under /test-apps.

The coverage report was still created even though there was now an iframe on the page.

enter image description here

If you can provide more details, preferably a repo I can check further - but as it stands, it seems it's not reproducible.

BTW Cypress v10 is used in the code-coverage repo (not yet visible/released on the Cypress repo).

about 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda