once test

Test a declared target.

Synopsis#

plaintext
once test [OPTIONS] [TARGET]

Description#

Builds the target as needed, then executes its test capability through the action cache. Output paths and result groups are owned by the target kind that exposes the capability. With --changed-path or --all, stable target batches are pulled from a duration-informed dynamic queue. --jobs caps local workers without changing the plan or batch identities. With no target or selection flags, Once runs the first-party tests reported by each discovered workspace root.

Arguments#

ArgumentRequiredDescription
<TARGET>noTarget id, such as tests/unit or ./unit. Omit it to test the discovered workspace's first-party tests.

Options#

FlagValueDefaultDescription
--sandbox<SANDBOX>offLocal filesystem sandbox policy for command actions.
--config<KEY=VALUE>Override the workspace build configuration. See once build --config.
-j, --jobs<COUNT>Maximum number of test batches to execute concurrently. Defaults to the host's available parallelism for an affected plan.
--shard-plan<UUID>Download, execute, and report an exact hosted shard plan UUID.
--shard-index<SHARD_INDEX>Zero-based hosted shard index. Defaults to TUIST_SHARD_INDEX.
--shard-attempt<SHARD_ATTEMPT>Positive execution attempt. Defaults to TUIST_SHARD_ATTEMPT or the CI attempt.
--shard-report-revision<SHARD_REPORT_REVISION>0Immutable report revision within this attempt. Defaults to zero.
--plan<FILE>Execute an exported once.portable_test_plan.v1 document.
--batch<ID>Select an opaque batch ID from --plan. Repeat to select multiple batches.
--external-group<UUID>Attribute native diagnostics to an external test-report group UUID.
--partition-index<PARTITION_INDEX>Nonnegative external CI partition index. The coordinator owns its report.
--all(flag)Run every discovered test target through the dynamic scheduler.
--changed-path<PATH>Select tests affected by a workspace-relative changed path. Repeat for multiple paths. Cannot be combined with a target id.
--test-unit<UNIT>Run one current, filterable unit from once query test-manifest. The request is rejected before scheduling when the target does not support exact filtering or the unit is absent from the manifest.
--test-batch<ID>Run one batch ID from the current plan for this target. Inspect it with once query test-plan --target <target>.