Skip to content

Dynamic Parallelism for Smarter Testing

New feature

Instead of always starting with full parallelism as set in the config, Dynamic Parallelism can scale the number of parallel nodes your test job needs depending on the number of tests that were selected by Smarter Testing’s Intelligent Test Selection.

Why we built this:

Parallelism used to be fixed in config, so a job set to 100 nodes started all 100 even when test selection picked only a handful of tests. Most of those nodes had little or nothing to run, so you ended up spending credits on them without any speedup.

How it works:

An upstream job calculates how many tests will run and passes that number to the downstream test job, which starts only the nodes it needs. By default, Smarter Testing picks the fewest nodes that will still finish in about the same time as running the full suite. If you’d rather optimize for developer time, set a target duration and Smarter Testing sizes parallelism to aim for it.

Getting started:

experimental:
  dynamic-parallelism:
    test:
      key: ci-tests-parallelism-key
      min: 1
      max: 20
      target: 1m
  • key: links the downstream job to the parallelism value calculated upstream.
  • min / max: the lowest and highest number of nodes the job can run with.
  • target (optional): the wall-clock time to aim for, such as 1m. This is useful if you keep your test suite at around a minute and don’t want to keep returning parallelism by hand.

See the Smarter Testing docs for full setup: here

Previous changes

Scoped API tokens