Topic guide

Testing Strategy

A testing strategy that gives you confidence to ship: testing pyramid, TDD, E2E tests with Playwright, mutation testing, and quality in code review.

3 topics · 10 articles

Testing pyramid

The balance between unit, integration, and E2E tests.

Test-Driven Development

The red-green-refactor cycle day to day.

Quality & code review

Quality gates, pull requests, and practices that keep quality up.

Frequently asked questions

What does 70% unit, 20% integration, 10% E2E mean?

It is the testing pyramid: most of the suite is fast unit tests, and a few slow E2E tests cover the critical flows end to end.

Should I write tests after the code?

TDD (before) is ideal because it shapes the design. But tests written afterwards are far better than no tests.

How do I fix flaky tests?

Find the root cause: timing issues, external dependencies, or state leaking between tests. Isolate the test and fix the cause instead of adding retries.

What is mutation testing?

A tool deliberately changes your code to see whether the tests fail. If no test fails, that part of the code is not really covered.

What code coverage target?

Between 70% and 80% is a good target. High coverage helps but does not guarantee quality: what the tests check is what matters.