Scrivio Interview library
LeadershipAdvanced7 min read · updated 12 November 2026

Your organisation relies on a large, slow end-to-end suite that takes 3 hours and fails often. How would you change the test strategy across teams?

I would first find out which end-to-end tests actually catch defects, because in a large suite most duplicate what lower-level tests could check and many fail only for environmental reasons. Then I would move that coverage down to service-level integration tests and contract tests owned by each team, and keep a short end-to-end smoke suite for the critical paths. I would measure change failure rate and lead time before and after, and give teams real time and platform support to build the lower-level tests, rather than simply switching the old suite off.

Why this question is asked

A three-hour end-to-end suite that fails often is usually the result of a sensible decision made long ago: when the system was small, testing it as a whole was the easiest way to be safe. As the system grew, the suite grew with it, and now it slows every release and tells teams little when it fails. Interviewers ask this leadership question because changing it is hard: the suite feels like safety, it is often owned by a central QA team, and removing tests looks like removing protection. In this answer, we will see how to analyse the suite with data, how to move coverage to the teams and the right levels, what to keep at the top, how to prove the change worked with delivery metrics, and how to support the teams through it.

1Why Large End-to-End Suites Decay

An end-to-end test exercises the whole deployed system, which is its strength and its problem. Every test depends on every service, every database, the network and the test data being in the right state. If each of 30 services is available 99.5 percent of the time during a test run, the chance that all of them are fine is about 86 percent, so a long suite fails regularly for reasons that have nothing to do with the change being tested. Failures are also expensive to diagnose, because the failing assertion is far from the cause.

Over time, the team responds rationally: reruns become routine, failures are triaged by a central group instead of by the team that caused them, and releases are batched to avoid paying for the suite too often. Bigger batches then make each release riskier. So a slow, flaky suite does not only waste time; it pushes the organisation towards bigger, less frequent, riskier changes, the opposite of what the suite was meant to achieve.

2Find Out Which Tests Catch Defects

The suite should be judged by evidence. I would take the last six months of runs and classify every failure: a real defect, an environment problem, test data, or a flaky test. For each real defect, I would ask what the lowest level of test is that could have caught it: a unit test, a slice test in the service, a contract test between two services, or only a full end-to-end test.

The result is usually striking. Most end-to-end tests have never caught a real defect in that period. Of the defects caught, most could have been caught by a cheaper test inside one service or by a contract between two. Only a small number, often wiring and configuration problems such as a wrong service URL or a security setting between services, really needed the whole system. That analysis is the basis for every later decision, and sharing it openly helps people accept the change, because it is about their own suite's track record.

3Move Coverage Down to the Teams

For each group of end-to-end tests, the owning team of the behaviour builds the equivalent lower-level coverage. Business rules move into unit tests; the service's API behaviour into slice and service-level integration tests with the service's own database and broker in Testcontainers and its dependencies stubbed with WireMock; and the agreements between services into consumer-driven contract tests with Pact or Spring Cloud Contract, verified in each provider's pipeline.

Ownership is as important as level. Today a central suite fails and someone else has to investigate. When each team owns tests in its own pipeline, a failure is reported to the people who caused it, within minutes of their change, which is when it is cheapest to fix. The old end-to-end tests are retired one group at a time, once the replacement coverage exists and has run in parallel for a few weeks without missing anything the old tests caught.

Step throughRetiring a group of end-to-end tests
  1. Classify six months of failuresDefect, environment, data or flaky
  2. Map each caught defect to the lowest levelUnit, service integration, contract or truly end-to-end
  3. Owning team builds lower-level coverageIn its own pipeline, with platform templates
  4. Run old and new side by side for a few weeksCompare what each catches
  5. Did the old tests catch anything the new ones missed?
    YesAdd the missing lower-level test, keep watchingNoRetire that group of end-to-end tests
  6. Keep a short smoke suite for critical pathsTarget: under 15 minutes

6 steps in order. Play them, or step through them one at a time.

4Keep a Short Smoke Suite

Some end-to-end testing should remain, because some failures only appear when everything is deployed together: wrong configuration, networking and service discovery, security between services, and the critical user journeys as a whole. I would keep a smoke suite of perhaps 20 to 40 tests covering the journeys whose failure would hurt most, such as sign-up, checkout and payment, designed to run in under 15 minutes against a deployed environment, and to be stable enough that a failure is taken seriously.

The smoke suite has strict rules: every test has an owner, flaky tests are quarantined immediately, and a new test is added only when a lower-level test cannot check the behaviour. That keeps it from growing back into the three-hour suite.

5Measure the Effect on Delivery

To know whether the change helps, I would measure delivery outcomes, not only test numbers, starting before the change. The two most useful are lead time for changes, from commit to running in production, and change failure rate, the share of deployments that cause an incident or need a rollback. Both are part of the well-known DORA metrics. Alongside them, the pipeline duration and the share of runs failing for non-defect reasons show the direct effect.

The expected result is that lead time drops sharply, because a three-hour gate becomes a pipeline of minutes, and that change failure rate stays the same or improves, because defects are now caught earlier and by the team that caused them. If change failure rate went up, that would show a gap in the new coverage, and the analysis in step 1 would tell us where to look. Having these numbers is also how we keep leadership support when the first incident happens, as one eventually will, and someone asks whether removing tests caused it.

6Give Teams Time and Support

None of this works if teams are told to build new tests on top of their roadmap. I would agree with product leadership on dedicated capacity for a defined period, for example two quarters with a share of each team's time, and track the migration like any other project. The platform team provides templates that make the right tests cheap: Testcontainers configurations, WireMock stub helpers, a contract broker and CI steps to publish and verify contracts.

The people who maintain the current suite, often a central QA team, are essential. They know which journeys matter and why tests were added, and they can pair with product teams to write the new tests and own the smoke suite. Treating them as partners in the change, not as owners of the thing being removed, avoids the most common source of resistance.

7Follow-up questions

What if a defect gets through after an end-to-end test was removed?

We do what we would do with any escaped defect: find the lowest level that could have caught it and add a test there. The metrics then show whether such escapes are rarer or more common than before. In most organisations they become rarer, because tests closer to the code catch defects earlier and more precisely.

Why not just parallelise the three-hour suite?

Parallelising helps the duration but not the flakiness or the late, unclear feedback. Running more tests at the same time against a shared environment often makes flakiness worse. It can be a short-term relief while the real change happens, but it is not the strategy.

How do you handle teams that resist owning tests?

By making ownership cheap and visible. The templates reduce the work, the migration capacity is agreed with their management, and failures in their own pipeline are simply faster to fix than failures in a central suite. Showing a pilot team's results, such as shorter lead time and fewer rerun builds, usually persuades the others.

8Conclusion

In this answer, we changed a slow, flaky end-to-end strategy step by step. We started with evidence: classifying six months of failures and mapping each caught defect to the lowest level that could have caught it. Coverage then moved down to service-level integration and contract tests owned by each team, running in parallel with the old tests before each group was retired. A short smoke suite stayed for critical paths. Lead time and change failure rate, measured before and after, showed whether it worked, and teams got dedicated time and platform support to do the work.

What to say in the interviewAbout 90 seconds aloud

Open with

I'd start with data, not opinions. I'd take six months of runs and classify every failure as a real defect, an environment problem, test data or flakiness, and for each real defect ask what the lowest level of test is that could have caught it.

Then, if they want more

Usually most end-to-end tests have caught nothing in that time, most defects they did catch could have been caught by a unit test, a service-level integration test or a contract test, and only a few wiring and configuration problems really needed the whole system.

Then I'd move coverage down and to the owning teams: business rules into unit tests, each service's API and persistence into service-level integration tests with Testcontainers and WireMock, and the agreements between services into consumer-driven contract tests verified in the provider's pipeline.

Each group of end-to-end tests runs side by side with its replacement for a few weeks before it's retired. I'd keep a smoke suite of maybe 20 to 40 tests for critical journeys like checkout and payment, under 15 minutes, with owners and immediate quarantine for flakes.

I'd measure lead time for changes and change failure rate before and after, plus pipeline time and non-defect failures, so we can show the change works and spot gaps. And I'd make sure teams get real capacity, agreed with product leadership, plus platform templates, and involve the QA engineers who know the current suite as partners.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your organisation relies on a large, slow end-to-end suite that takes 3 hours and fails...": https://scrivio-interview-library.netlify.app/java/test-strategy/7ca347f75a/