Skip to content

FAQ

Frequent questions about regressions: how to distinguish them from bugs, when to write the test, and how many tests are enough.

Regression vs bug?

A bug is a mismatch between code and spec. A regression is a bug that did not exist before a change. All regressions are bugs; not all bugs are regressions.

When to write a regression test?

After every reported bug, before the fix. The test asserts the bug cannot return.

How many regression tests?

Enough to cover every path that has ever been fixed. If a bug was fixed once, a test must exist to prove it stays fixed.

Are end-to-end tests regression tests?

They can be, but a suite of only e2e tests is slow and fragile. Distribute regressions across the pyramid.