Introduction to Testing

Get an introduction to the testing of the web application and why testing is so important.

Importance of testing

Testing and quality assurance in general is undervalued, often deferred, and not taken as seriously as it should be. You may have heard expressions similar to the following:

  • “We don’t have time to write tests! The next release needs to launch to make sure we hit our milestone.”
  • “Let’s release this new feature ASAP and write tests later.”
  • “We dedicate every nth sprint to writing tests.”

There are little secrets you need to know for each of the above statements.

“We don’t have time to write tests! The next release needs to launch to make sure we hit our milestone.”

Writing tests needs to be part of the planning process and baked into everything the team does. If whoever is in charge of the roadmap does not value testing, the product is highly likely to be doomed before it even starts. This will not manifest itself right away, maybe not even in the first year or two, but once the team grows or team members leave, development velocity will come to a grinding halt, and with each release, the possibility of regression bugs increases.

"Let’s release this new feature asap and write tests later."

“Later” never happens because the next release will be more important than writing tests for the previously released feature.

"We dedicate every nth sprint to writing tests."

You will not. This is a tactic used by inexperienced product managers to devalue the importance of testing. Even if you did write tests every nth sprint, it would be too late, as features may have been broken for a few sprints. On top of that, writing tests for a feature developed and released n sprints ago will not be as efficient and thorough as writing tests while you develop a feature, or even before (!) you write a feature, as is the case in test-driven development (TDD).

Before we dive into the specific approach we will take in this course, we should clearly understand the importance of side-by-side testing:

Not writing, maintaining, and monitoring an automated test suite for your application is like a human not sleeping. For a while, it is all fine, but in the long run, things will break in unexpected ways.

There is one more concept you should know about, the test pyramid. It was introduced in Mike Cohn’s book Succeeding with Agile.

Test Pyramid

Before Cypress

The test pyramid suggests writing a lot of unit tests, fewer system tests, and even fewer end-to-end tests.

Get hands-on with 1200+ tech skills courses.