Skip to content

Tests splitting

Emcee can use different strategies to split tests.

Tests can be divided into buckets. A bucket is the unit of work that will be executed on the Emcee worker.

Here is the list of the available strategies:

  • individual - streaming execution of tests, the number of buckets will be equal the number of tests. Full tests isolation from each other but with higher infrastructure costs
  • equallyDivided - equal number of tests in each bucket
  • timeWeighted - Emcee will consider additional time param to split test to buckets by tests time. In other words, you can specify total tests time in each bucket
  • unsplit - all tests will be in one bucket
  • fixedBucketSize - fixed tests count in each bucket

By default, tests split strategy is timeWeighted with minBucketTime set to 0. Default minBucketTime is 0 means that Emcee will try to distribute tests to all available workers with equal bucket time.

Examples#

For individual, equallyDivided and unsplit you can set only the name of strategy:

tests:
    configurations:
        #...
    testsSplitter:
        type: individual

timeWeighted strategy support minBucketTime param, measured in seconds. This value means the minimum total tests time in bucket:

tests:
    configurations:
        #...
    testsSplitter:
        type: timeWeighted
        minBucketTime: 60

fixedBucketSize strategy require to set size param. This value means the tests count in bucket:

tests:
    configurations:
        #...
    testsSplitter:
        type: fixedBucketSize
        size: 10