Knowledgebase

Running Tests in Parallel Print

  • softwaretestingqa, software, troubleshooting, database, guide, howto, solution, zillionkinghost
  • 0

Reducing suite duration.

WHY IT IS NECESSARY

Suites grow, and duration determines how often they run.

WHAT PARALLELISM REQUIRES

Tests that are independent Data that does not collide Resources that can be shared or duplicated

WHAT BREAKS UNDER PARALLELISM

Shared test accounts Fixed identifiers Shared database state Tests assuming they are alone

WHAT TO DO ABOUT DATA

Each test creating its own, with unique values.

HOW TO ENSURE UNIQUENESS

Generated identifiers, not fixed ones.

WHAT TO DO ABOUT ACCOUNTS

One per test, or a pool with allocation.

WHAT LEVELS OF PARALLELISM EXIST

Across test files Within a file Across machines

WHAT TO START WITH

File-level parallelism, which is usually safe.

WHAT TO MEASURE

Duration before and after Failure rate before and after

WHY THAT SECOND

Parallelism reveals hidden dependencies as new flakiness.

WHAT TO DO WHEN IT DOES

Fix the dependency, rather than reducing parallelism.

WHAT TO BALANCE

Parallelism against resource contention.

WHAT TO WATCH

Whether the environment under test becomes the bottleneck.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot