TOPIC 17/4018 MINNOT STARTED

Making a test suite fast: selection, sharding and parallel runs

Get answers sooner by running fewer checks, running them side by side and splitting them across machines, without breaking trust.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: checkout tills. A shop has one till and a long queue. The shop opens four tills, and the queue moves faster. It also opens a fast till for people with a few items. But if two tills share one cash drawer, the sums go wrong. So tills need to be kept apart.

Daily List is a to-do list app. Its automated checks now take most of an afternoon. Leo changes one in the morning and gets his answer after he has gone home. A slow answer is a late answer.

Mei says: three ideas can help. Run fewer checks. Run some at the same time. Split them over several machines. All three need care, and the care is about keeping checks apart.

The picture has limits. Shoppers do not depend on each other. Checks sometimes do, and that is where it goes wrong.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Getting a faster answer from a large suite by running fewer checks, running some side by side and splitting the rest across machines.

  1. Measure the slow checks
  2. Run fewer
  3. Run some together
  4. Keep each check apart
Fewer, together, apart

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
One long queueA slow suite
A fast till for few itemsA quick set for each change
More tillsMore workers or machines
A shared cash drawerShared data that breaks checks

WHERE THIS PICTURE STOPS

  • Shoppers do not depend on each other. Checks sometimes do.
  • Opening a till is easy. Making checks independent takes work.
  • A queue is fair to everyone. A split by time is not fair, but it is faster.

HOOK

Fewer, together, apart.

REMEMBER IT THIS WAY

A rule of thumb: if you see this, think that.

If checks will run side by side, usually give each its own data first so they stay apart.

What each part of the trick stands for
In the trickWhat it stands for
Side by siderun some at the same time
Own datashared data that breaks checks, tills share one cash drawer

Checks that only read data nobody changes can often share it safely.

TELL A FRIEND

A busy shop opens more tills and a fast till, but never shares a cash drawer.

OFTEN MIXED UP WITH Flaky tests. The flaky-tests lesson finds checks that give mixed results. This lesson uses isolation so that running at the same time does not create them.

PRACTISE AND KEEP

Sources for this topic — 8 sources
  1. Market practice

    Sharding (Playwright documentation) ↗ — Microsoft (Playwright) · A suite can be split into shards that run on separate machines, while workers are processes on one machine (search excerpt, page not opened)

    Shows splitting a suite into shards run on separate machines, and that workers are processes on one machine while shards are portions of the suite on separate jobs. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    Running tests across multiple CPUs (pytest-xdist documentation) ↗ — pytest-xdist · A plugin spreads tests across worker processes, and modes keep tests of one file or scope together on the same worker (search excerpt, page not opened)

    Explains how a plugin spreads tests across worker processes, with modes that send tests to any free worker or keep tests of one file or scope together on the same worker. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Grid architecture (Selenium documentation) ↗ — Selenium · A grid is built from parts such as a router, a distributor, nodes and a session map (search excerpt, page not opened)

    Describes Grid 4 components (router, distributor, new session queue, nodes, session map, event bus), slots, and hub and node versus distributed setups. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Test Impact Analysis (Datadog documentation) ↗ — Datadog · Test impact analysis runs the tests that cover changed code and cannot detect changes to dependencies, external services or data files (search excerpt, page not opened)

    Describes running only the tests that cover changed code and lists changes it cannot detect, such as library dependencies, compiler options, external services and data files. Vendor documentation. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    Test Sizes (Google Testing Blog, December 2010) ↗ — Google · Tests are sorted by size, small, medium and large, by what they need to run (search excerpt, page not opened)

    Defines small, medium and large tests by limits on network, database and time. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    How we sharded our test suite for 10x faster runs on GitHub Actions (Gel blog) ↗ — Gel (formerly EdgeDB) · Splitting a suite by past test durations so shards finish together; a bug in the splitting step could leave some tests unrun (search excerpt, page not opened)

    Describes splitting a test suite by past test durations so shards finish together, and warns that a bug in the splitting step could leave some tests unrun. Company blog, one team's experience. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  7. Market practice

    Continuous Integration (Martin Fowler) ↗ — Martin Fowler · No figure stated on purpose: a MoT thread on how long a CI suite should take shows no consensus; Fowler's CI article is cited for fast feedback only (search excerpt via secondary sources; the ten-minute wording was NOT confirmed first-hand). Stage targets are a team choice, taught as such.

    Defines continuous integration as merging at least daily with each integration checked by an automated, self-testing build. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  8. Market practice

    How long on average should test automation take to execute all checks in a CI/CD pipeline? ↗ — Ministry of Testing Club · No figure stated on purpose: a MoT thread on how long a CI suite should take shows no consensus; Fowler's CI article is cited for fast feedback only (search excerpt via secondary sources; the ten-minute wording was NOT confirmed first-hand). Stage targets are a team choice, taught as such.

    Learner question; practitioners give no single agreed number (community discussion, not a standard). · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.