Why Wasn’t This Tested?!

Using End to End Tests for Code Coverage.

By Filip Hric

30. 09. 2021 from 16:35 CET

About this presentation

Why wasn’t this tested? - the dreaded question that testers get asked once in a while. There are many reasons for a testing oversight. One way to reduce that oversight is using code coverage. While this is mostly being used with unit tests, with Cypress, you can generate code coverage from your end-to-end tests. To do that, you need to instrument your app. What that means and how to do that is the topic of this talk. We’ll go through setup, cover our app with tests, and interpret coverage reports. Code coverage has a great ability to give you an insight into the blind spots of your tests. However, we’ll talk about code coverage shortcomings too, and how to not get fooled by 100% code coverage.

Key takeaways

  • How instrument a web application for collecting code coverage data

  • How to setup Cypress for generating code coverage report

  • How to use Cypress tests to cover the code of web application

  • What to be aware of when reading code coverage report

Who will benefit?

  • SDET and test automation engineers

Expected knowledge

  • Basics of web development

About Filip Hric

SDET & QA lead at Slido, official Cypress.io ambassador. I studied psychology and landed in tech, where I now combine the knowledge from both. Huge passion for music and running. Author of Cypress.io bootcamp. Always learning, blogging, streaming, creating videos, and online courses. All can be found on filiphric.com. Father of three beautiful children.