Q30 of 38 · Manual & exploratory

Walk me through how you'd build a regression suite from scratch for a 2-year-old product.

Manual & exploratorySeniorregression-suiteautomation-strategytechnical-debtsenior

Short answer

Short answer: Start with risk and traffic — automate the highest-impact, most-trafficked flows first (login, checkout, the core 3-5 user journeys). Layer in critical regressions from the past 12 months of bug history. Build incrementally over 2-3 quarters; resist the urge to 'cover everything' first.

Detail

A 2-year-old product without a regression suite has accumulated technical debt and a long bug history. The temptation is to write 1000 tests; that's wrong. The right approach is targeted, incremental, and ROI-led.

Phase 1 — establish the foundation (week 1–2): set up the framework, CI pipeline, reporting, and test data management. Write a smoke suite of 10–15 tests covering "the app boots, login works, the homepage renders, the cart adds an item." This is the gating suite for any regression work.

Phase 2 — top-flow coverage (week 3–8): identify the 5–10 highest-traffic / highest-impact user journeys via product analytics. Login, search, add to cart, checkout, payment, profile. Automate end-to-end happy paths first, then negative variants (invalid card, declined payment).

Phase 3 — bug-history coverage (week 9–12): pull the last 12 months of production bugs. For each S1/S2 bug, write a regression test that would have caught it. This phase converts pain into safety net and tells you where the product is fragile.

Phase 4 — coverage by area (ongoing, quarterly): use risk-based testing to prioritise areas: payments > admin tools, public APIs > internal scripts. Pair with developers to write integration and contract tests at the lower levels (the regression suite shouldn't be all E2E).

Cross-cutting throughout: definition of done now includes regression tests for new features; quarantine — not retry — for flakes; run on every PR (not just nightly); test code is reviewed like production code; maintain a coverage map visible to the team.

What I wouldn't do: try to write 500 tests in week one. A small, trusted suite beats a large, ignored one. After 6 months you should have ~150–300 well-maintained tests covering the highest-risk areas; trying for 1000 in the same time produces a brittle suite nobody trusts.

// WHAT INTERVIEWERS LOOK FOR

Phased, ROI-led approach. Strong candidates use product analytics and bug history to prioritise. Bonus for naming the trap of 'test everything' as the failure mode.

// COMMON PITFALL

Suggesting a top-down coverage push ('every page, every form, every button') — that produces a year of work and a brittle suite.