Calculates the test shards for your Xcode tests.
Description
This step looks at the test bundle and calculates the test shards for your Xcode tests. It finds all of the tests and divides them into the specified number of shards.
These shards can be used to run the tests in parallel, which can significantly speed up the testing process. Use the
Xcode Test without building step's Test Selection
input to specify which test shard information to use.
Add this step directly to your workflow in the Bitrise Workflow Editor.
You can also run this step directly with Bitrise CLI.
Inputs
Key | Description | Flags | Default |
---|---|---|---|
product_path |
The path of the test bundle. The step supports the following formats: - xcresrun - xctestproducts It will use the specified file to collect the built tests and generate the test shards. | required | |
test_plan |
Shard the provided test plan's test. Leave this input empty to run the default Test Plan or Test Targets associated with the Scheme. The input value sets xcodebuild's -testPlan option. |
||
shard_count |
The number of test shards to create. The output folder will contain shard_count number of files, each containing the tests to run in that shard. |
required | |
shard_calculation |
Defines the strategy to use when splitting the tests into shards The available options are: - alphabetically : The tests are sorted alphabetically and split into shards |
required | alphabetically |
destination |
Destination specifier describes the device to use as a destination. The input value sets xcodebuild's -destination option. In a CI environment, a Simulator device called Bitrise iOS default is already created. It is a compatible device with the selected Simulator runtime, pre-warmed for better performance. If a device with this name is not found (e.g. in a local dev environment), the first matching device will be selected. |
required | platform=iOS Simulator,name=Bitrise iOS default,OS=latest |
verbose |
Enable logging additional information for debugging. | required | false |
Outputs
Environment Variable | Description |
---|---|
BITRISE_TEST_SHARDS_PATH |
This folder contains the generated test shard information. |
We welcome pull requests and issues against this repository.
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.
Learn more about developing steps: