Repaso
EspaƱol

In the test pyramid, which tests should you have the most of?

Options

  1. End-to-end UI tests in the browser
  2. Manual exploratory tests by testers
  3. Fast, isolated unit tests of functions (Correct option)
  4. Load and stress tests under traffic

Answer

Fast, isolated unit tests

Why

The test pyramid: a wide base of many small, fast unit tests; a middle layer of integration tests (several parts together, e.g. code + database); a small top of end-to-end tests (the whole app, like a real user).

Unit tests run in milliseconds and point exactly to the bug. End-to-end tests are slow and fragile, so keep only a few for critical paths.

Remember

Many unit tests, some integration tests, few end-to-end tests.

Key terms

Practice this question in Repaso