Key takeaways
Run every test at the same time, each in its own environment, so the suite finishes in the time of its slowest test.
Run one after another, 200 tests that take five minutes each need more than 16 hours, and run fully in parallel they need about five minutes.
Make every test independent before you run it in parallel.
Give each test its own user account and data, and have it delete anything an earlier run left behind before it starts, so no test depends on another's state or order.
Choose full parallelization over sharding once your suite is growing.
Sharding splits a suite across a fixed number of machines that each run their share one test at a time, so the run gets longer with every test you add.
Size your test environment for every test running at once as a separate user.
The app under test, its database and its third-party services all carry the load of the whole suite at the same moment.
Fix flaky tests before you run your whole suite in parallel, and capture logs, video and traces from every test.
Parallel runs surface hidden timing and shared-state problems, and each failure needs its own evidence once execution order no longer explains it.
Parallel testing runs many automated tests at the same time, each in its own isolated environment, instead of one after another. A fully parallel suite finishes in about the time of its slowest test, however many tests it has.
That speed is what makes continuous deployment practical, because every change can go through the full end-to-end suite before it ships. Most teams that try parallel testing stop at sharding, which keeps run time growing with the suite.
What is parallel testing?
Parallel testing is a software testing technique that runs multiple tests at the same time, each in its own environment, rather than one after another. Instead of waiting for test A to finish before test B starts, both run at once, each with its own browser or device, its own data and its own execution context.
If you have 200 tests that each take five minutes, running them in sequence takes more than 16 hours, and running them fully in parallel takes about as long as the slowest one, so the time saved grows with every test you add.
QA Wolf runs every test in a suite this way on its infrastructure for web app testing, mobile app testing and desktop app testing.
Parallel testing vs. sequential testing
Sequential testing runs one test at a time, each waiting for the last to finish, so a run takes as long as all its tests combined. Parallel testing runs tests at the same time across separate environments, so a run takes about as long as its slowest test, provided there's capacity for every test.
| Sequential testing | Parallel testing | |
|---|---|---|
| How tests run | One at a time, in order | All at once, each in its own environment |
| How long a run takes | The time of every test added together | About the time of the slowest test |
| As the suite grows | Every new test makes the run longer | Run time stays about the same, given enough capacity |
| What the tests need | They can share state and depend on order | Each must be independent, with its own data |
When sequential testing still makes sense
A handful of tests that already finish quickly gain little from parallel runs. A test that truly depends on state another test creates also has to run in order until someone rewrites it. That dependency is usually a test design problem, and independent, atomic tests can run in parallel.
What is the difference between full parallelization and sharding?
Full parallelization gives every test its own environment, so every test starts at once. Sharding divides a suite into groups, called shards, and runs each group on its own machine, or node, where its tests still run one after another.
With sharding, run time grows with the suite unless you keep adding nodes. Take 200 tests that each take 5 to 10 minutes. On 10 nodes, they run 20 to a node, one after another, and the run takes about two and a half hours. Fully parallel, the same suite is done in 10 minutes, when its longest test finishes.
QA Wolf
Every test at once, each in its own container
10 parallel nodes
10 tests at a time, 20 on each node
200 tests that take 5 to 10 minutes each, run two ways. QA Wolf runs every test at once, each in its own container, so the suite is done in 10 minutes, the time of its longest test. On 10 parallel nodes, each node runs 20 of the tests one after another, so the suite takes about 2 and a half hours.
Playwright, like most test runners, runs tests in parallel worker processes on one machine, and its --shard option splits a suite across CI machines. Both still run a fixed number of tests at a time, so a growing suite needs more workers or more machines to keep its run time flat.
Benefits of parallel testing
When a test run takes hours, teams start trading safety for speed. They run fewer tests, batch changes together to avoid triggering long runs and hold releases until results come back, so coverage shrinks and bugs reach production.
Parallel testing pays off in four ways: faster feedback, more coverage without longer runs, better use of compute and continuous delivery.
1. Faster feedback
Developers get results while the change is still fresh, before more code is written on top of a bug and before they've switched to other work. A bug found within the same pull request costs far less to fix than one found after a release.
2. More coverage without longer runs
With sequential runs, every new test makes the run longer, so teams stop adding them. With parallel runs, the run takes about as long however many tests you add, so you can give every practical user flow a test.
3. Better use of compute
Sequential runs tie up machines for hours while one test runs at a time. Parallel runs use a burst of capacity and then release it.
4. Continuous delivery
Deploying several times a day needs a full regression suite that finishes between deploys. Parallel runs make it practical to run the whole suite on every pull request instead of a sample before each release.
What are the common challenges with parallel testing?
Most teams hit the same four problems when they start running tests in parallel: shared state between tests, flaky tests and race conditions, infrastructure complexity and cost, and debugging failures across parallel runs.
Shared state between tests
When tests use the same database records, user accounts or test data, they interfere with each other. One test changes data another depends on, and both fail in ways that don't repeat.
To fix it, design every test to run on its own. Give each test a unique user account and its own data, and have it delete anything an earlier run left behind before it starts. If some tests truly must share a resource, move them into a separate suite that runs in order, so they don't hold up the rest.
Flaky tests and race conditions
Parallel runs expose timing assumptions that sequential runs hide. A test that passes alone can fail now and then when it runs alongside others, because of resource contention or waits that assume a fixed order.
To fix it, first fix performance or stability problems in the app or the test environment. Then remove dependencies on execution order, and replace fixed sleeps with waits for the condition the test needs. A test that fails in parallel and passes alone has a design problem, so fix the flaky test rather than retry it until it passes or go back to sequential runs.
Infrastructure complexity and cost
Full parallelization needs infrastructure that can start an isolated environment for every test at once, collect the results and shut everything down. Building that in-house is complex and expensive, which is why many teams stop at sharding.
To fix it, run on infrastructure built to give every test its own environment. If you build it yourself, budget for orchestration, capacity, retries and storage for every test's artifacts.
Debugging failures across parallel runs
Without execution order to go on, a failure is harder to trace back to its cause.
To fix it, capture logs, screenshots, video and network data for every test, linked to its result, so each failure carries its own evidence.
What do you need to run tests in parallel?
You need four things: independent tests, an isolated environment for every test, a test runner that runs tests in parallel, and reliable tests.
Independent tests
Each test should:
- Create its own test data: Don't rely on pre-seeded data that other tests might change.
- Use unique identifiers: Prefix generated data with a run ID or timestamp so tests can't collide.
- Clean up before it starts: Delete anything an earlier run left behind, so every test starts from a known state.
- Run in any order: Test B never assumes test A ran first.
An isolated environment for every test
- Its own container, VM, browser or device: Shared environments cause contention and flaky failures.
- Enough capacity to run every test at once: With 200 tests and 10 parallel nodes, a run takes about 20 times as long as a fully parallel one.
- Fast startup: Pre-booted nodes and pre-built container images keep startup from eating the time parallel runs save.
- One report: The system collects every test's result into a single report.
- Artifact storage: Videos, logs and screenshots from hundreds of tests add up, so storage can't become the bottleneck.
The app under test needs capacity too, since every test acts as a separate user at the same moment. Run tests in a dedicated staging or test environment, or a preview environment for each pull request, and size it for the whole suite. QA Wolf's guide to preparing environments suggests at least 4–8 vCPUs and 8–16 GB of memory for every 500 concurrent tests.
A test runner that runs tests in parallel
Playwright runs tests in parallel out of the box. This config runs four tests at a time on one machine, including tests in the same file, and retries a failure once:
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
fullyParallel: true, // run the tests inside each file in parallel too
workers: 4, // parallel worker processes on this machine
retries: 1, // retry a failure once to rule out a flake
});
To split the suite across CI machines, run npx playwright test --shard=1/4 on the first machine, --shard=2/4 on the second, and so on. Selenium Grid spreads tests across a pool of browser nodes. Cypress splits spec files across CI machines through Cypress Cloud, and each machine still runs its specs one at a time. Playwright is the strongest choice for a new suite, and teams on Cypress do best writing new tests in Playwright and migrating their critical flows first.
Reliable tests
Faster results only help if your team trusts them. Fix flaky tests, remove shared state and make sure each test gives the same result every time before you run the whole suite at once, because developers who see intermittent failures start ignoring the results.
How do you run tests in parallel in CI/CD?
Run the whole suite from your pipeline on every pull request, with every test independent and the environment sized for all of them at once:
- Make every test independent. Give each its own user account and data, and clean up before setup.
- Deploy a test environment that can take the load. A preview environment for each pull request keeps runs from interfering with each other.
- Turn on parallel execution. Set workers in your test runner, or run every test in its own container.
- Start the run after each deploy. Have the pipeline trigger the suite against the new build, so continuous testing covers every change.
- Collect results in one report. Retry a failed test once to rule out a flake, and investigate what still fails.
How does QA Wolf run tests in parallel?
QA Wolf runs every test in your suite at the same time, each in its own container, on every run. Its AI agents write the tests in Playwright and Appium, run them, investigate every failure and keep the tests current, and when an agent needs an answer, such as whether a change was intended, it asks your team. From QA Wolf's docs and engineering posts:
- Every test gets its own container. QA Wolf's infrastructure runs on Kubernetes clusters with pre-booted nodes, and each container gets the code for a single test, with its own browser, iOS or Android device, or desktop VM. When a run needs more capacity than is on hand, the system adds nodes, so the whole suite finishes in the time of its slowest test, whether it has 200 tests or 20,000.
- Each test runs as its own user. Every flow behaves like a separate user, and QA Wolf's tests use a unique account for each test and clear out what an earlier run left behind before they start, so tests running at once don't collide.
- Runs start on every pull request. PR testing runs your flows against each pull request's preview deploy and reports the result on the pull request, and triggers start runs on a deploy or a schedule.
- Every failure gets investigated. QA Wolf retries a failed test to rule out a flake, then its AI starts investigating while the rest of the suite is still running. Real bugs reach you with a recording, logs and steps.
- The agents write and maintain the tests. When a product change breaks a test, the agents fix it, with unlimited repairs. On 1,567 evals across web, iOS and Android apps, QA Wolf passed 93%, against 78% for Claude Code and 74% for Codex.
A build of 10 tests arrives at a cluster with 3 pre-booted nodes, each running 2 pods of one container. The first 6 tests go straight into the 6 ready containers. The cluster boots 2 more nodes for the other 4, so every test gets its own container and none waits for another to finish. When the last test is done, those containers shut down, the 2 new nodes go, and the 3 nodes boot fresh containers for the next build. The next build, of 5 tests, fits in the containers that are ready.
On QA Wolf's full service, the same agents do the work and send their questions to QA Wolf's engineers instead of your team.
Drata is a perfect example. Its developers used to wait up to two hours for regression results. QA Wolf grew Drata's automated regression suite from about 100 test cases to more than 400, and with every test running in parallel, automated regression testing takes about 10 minutes.
Start now and ask the agent to build tests for your critical flows and run them all in parallel on your next pull request, or talk to sales.
Frequently asked questions
What is parallel testing in software testing?
Parallel testing runs many automated tests at the same time, each in its own isolated environment, instead of one after another. A fully parallel suite finishes in about the time of its slowest test, so adding tests doesn't make the run longer. QA Wolf runs every test in a suite this way, each in its own container.
What is the difference between serial and parallel testing?
Serial, or sequential, testing runs one test at a time, so a run takes as long as all its tests combined. Parallel testing runs tests at the same time in separate environments, so a run takes about as long as the slowest test. Parallel runs need independent tests that don't share data or depend on order.
How do you run tests in parallel?
Make each test independent, with its own user account and data, then turn on parallel execution in your test runner, such as Playwright's workers setting, and give the run a test environment that can handle every test at once. To run the whole suite at once instead of a few tests per machine, each test needs its own browser, device or container.
How do you run tests in parallel in CI/CD?
Add a pipeline step after each deploy that starts the test run against that build with parallel execution turned on, and collect every test's result and artifacts into one report. Running on each pull request's preview deploy catches regressions before merge. QA Wolf starts runs from a deploy, a pull request or a schedule and runs every test at once.
How do you run parallel tests effectively?
Keep every test independent, start each one from a clean state, and fix flaky tests instead of retrying them. Give every test its own environment so tests don't compete for resources, and capture logs, video and traces from each test so every failure can be debugged on its own.
How many environments should a team provision for parallel testing?
Each test needs its own isolated execution environment, such as a container, browser or device, while the app under test usually runs in one dedicated staging environment or a preview environment per pull request. Size that environment for every test acting as a separate user at once. QA Wolf's docs suggest at least 4–8 vCPUs and 8–16 GB of memory for every 500 concurrent tests.
How can you parallelize mobile and web testing?
Run web tests in their own browsers and mobile tests on their own devices or emulators, all at the same time, with every test independent. QA Wolf runs web tests in parallel, each in a clean browser, and mobile tests in parallel on real iPhones, iPads and Android devices and on matched Android emulators, with a clean device for every test.
How do you run Cypress tests in parallel?
Cypress runs tests in parallel by splitting spec files across several CI machines, coordinated by Cypress Cloud, and each machine still runs its specs one at a time. QA Wolf recommends Playwright instead, which runs tests in parallel on its own, and suggests that teams on Cypress write new tests in Playwright and migrate their critical flows first.
What is the best parallel testing infrastructure for web apps?
The best setup runs every test at once, each in its own clean browser, so a suite takes as long as its slowest test however many tests it has. QA Wolf runs web tests that way, each Playwright test in its own container with a fresh browser, and records every run. Infrastructure that sells a fixed number of parallel sessions runs the rest of the suite in batches.