- Overview
- Get started
- Concepts
- Using UiPath CLI
- How-to guides
- CI/CD recipes
- Command reference
- Overview
- Exit codes
- Global options
- uip codedagent
- uip docsai
- add-test-data-entity
- add-test-data-queue
- add-test-data-variation
- analyze
- build
- create-project
- diff
- find-activities
- get-analyzer-rules
- get-default-activity-xaml
- get-errors
- get-manual-test-cases
- get-manual-test-steps
- get-versions
- get-workflow-example
- indicate-application
- indicate-element
- inspect-package
- install-data-fabric-entities
- install-or-update-packages
- list-data-fabric-entities
- list-workflow-examples
- pack
- restore
- run-file
- search-templates
- start-studio
- stop-execution
- uia
- uip traces
- Migration
- Reference & support
UiPath CLI user guide
uip tm wait polls a test execution until it reaches a terminal state (Passed, Failed, Cancelled, etc.) and then prints a one-line summary. Use it to turn the asynchronous uip tm testset execute into a blocking step in a CI pipeline.
wait is registered as a top-level verb under tm, not as a resource — invoke it as uip tm wait, not uip tm execution wait.
Synopsis
uip tm wait --execution-id <uuid> (--project-key <key> | --test-set-key <key>) [--timeout <seconds>]
uip tm wait --execution-id <uuid> (--project-key <key> | --test-set-key <key>) [--timeout <seconds>]
Honors the global options. See Exit codes below for the domain-specific behavior on timeout.
uip tm wait
Block until the given execution reaches a terminal state, polling Test Manager once every 60 seconds.
Arguments: none.
Options:
--execution-id <uuid>(required) — execution to wait on. Get it fromuip tm testset execute.--project-key <key>— owning project. Either this or--test-set-keyis required.--test-set-key <key>— test set key (e.g.DEMO:42); the project key is derived from the prefix.--timeout <seconds>— maximum seconds to wait. Defaults to1800(30 minutes). Pass0to wait indefinitely.-t, --tenant <name>— override the active session's tenant for this call.--log-level <level>—debug,info,warn,error. Defaults toInformation.
Example:
uip tm wait \
--execution-id a1b2c3d4-0000-0000-0000-000000000001 \
--project-key DEMO \
--timeout 900
uip tm wait \
--execution-id a1b2c3d4-0000-0000-0000-000000000001 \
--project-key DEMO \
--timeout 900
Data shape — when the execution reaches a terminal state before the timeout:
{
"Code": "WaitComplete",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"Status": "Passed",
"EndTime": "2025-04-15T10:32:11Z",
"Duration": "00:02:11"
}
}
{
"Code": "WaitComplete",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"Status": "Passed",
"EndTime": "2025-04-15T10:32:11Z",
"Duration": "00:02:11"
}
}
Status can be any terminal state Test Manager reports (including Passed, Failed, Cancelled). "Reached a terminal state" is the success signal for wait — the verb exits 0 regardless of whether tests inside the execution passed or failed. To branch on pass/fail, read the report get output after wait returns.
Exit codes
wait follows the standard exit codes for 0, 1, and 3, with one domain-specific reuse of 2:
| Exit code | Meaning |
|---|---|
0 | Execution reached a terminal state within the timeout. |
1 | Polling failed (repeated API errors, interrupt, abort) — see the Message field for detail. |
2 | Timed out. The timeout elapsed before the execution reached a terminal state. |
3 | Validation error (bad flag value, missing required option). |
Exit code 2 is domain-specific. The shared CLI contract reserves 2 for AuthenticationError, but wait reuses it for timeout so that scripts can distinguish "took too long" from "polling genuinely failed" without parsing text. See Exit-code behavior on execution for the full pattern.
Script pattern:
if ! uip tm wait --execution-id "$id" --project-key DEMO --timeout 1800; then
case $? in
2) echo "timed out" >&2; exit 2 ;;
*) echo "wait failed" >&2; exit 1 ;;
esac
fi
if ! uip tm wait --execution-id "$id" --project-key DEMO --timeout 1800; then
case $? in
2) echo "timed out" >&2; exit 2 ;;
*) echo "wait failed" >&2; exit 1 ;;
esac
fi
Related
- testset execute — produces the
ExecutionIdto wait on. - report — summary to read once
waitreturns0. - result — JUnit XML export.
- execution retry — re-run the failed cases of a finished execution.
See also
- Test Manager overview
- Exit codes — shared contract.
- Scripting patterns — the launch-wait-verify pipeline.