You can use the codebuild-tests-run
CLI command to split and run your tests
across parallel execution environments. The following section provides buildspec.yml
samples for various frameworks, illustrating the usage of the codebuild-tests-run
command.
-
Each example below includes a
parallelism
level of five, meaning that five identical execution environments will be created to split your tests across. You can choose aparallelism
level to suit your project by modifying theparallelism
value in thebuild-fanout
section. -
Each example below shows configuring your tests to be split by the test file name, which is by default. This distributes the tests evenly across the parallel execution environments.
Before you get started, see Execute parallel tests in batch builds for more information.
For a full list of options when using the codebuild-tests-run
CLI command,
see Use the codebuild-tests-run CLI command.