Runner.concurrency Method

Specifies that tests should run concurrently.

concurrency(n) → this

TestCafe opens n instances of the same browser and creates a pool of browser instances. Tests run concurrently against this pool, that is, each test runs in the first available instance.

The concurrency function takes the following parameters:

Parameter Type Description
n Number The number of browser instances that are invoked.

See Concurrent Test Execution to learn more about concurrent test execution.

Related configuration file property: concurrency

The following example shows how to run tests in three Chrome instances:

runner
    .browsers('chrome')
    .concurrency(3);