UiPath Documentation
uipath-cli
2026.10
false
UiPath-CLI-Benutzerhandbuch

UIP-TM warten

Syntax and options for `uip tm wait`, which polls a test execution until it reaches a terminal state, prints a summary, and exits non-zero when a test failed or the run was cancelled.

uip tm wait polls a test execution until it reaches a terminal state (Finished or Cancelled) and then prints a summary with the passed and failed counts. It turns the asynchronous uip tm testsets run into a blocking step in a CI pipeline, and the exit code carries the verdict: 0 when no test failed, 1 when a test failed or the run was cancelled.

wait wird als Verb der obersten Ebene unter tm registriert, nicht als Ressource. Rufen Sie sie als uip tm wait und nicht uip tm executions wait auf.

Zusammenfassung​

uip tm wait --execution-id <uuid> (--project-key <key> | --project-id <id> | --test-set-key <key>)
            [--timeout <seconds>]
uip tm wait --execution-id <uuid> (--project-key <key> | --project-id <id> | --test-set-key <key>)
            [--timeout <seconds>]

Beachten Sie die globalen Optionen. Die von diesem Befehl verwendeten Codes finden Sie unter Exit-Codes .

UIP-TM warten​

Blockieren Sie, bis die angegebene Ausführung einen Endstatus erreicht, und rufen Sie den Test Manager alle 60 Sekunden ab.

Argumente​

Keine.

Optionen​

  • --execution-id <uuid> (erforderlich) – Ausführung, auf die gewartet werden soll. Rufen Sie es von uip tm testsets run ab.

  • --project-key <key> – Besitz des Projektschlüssels.

  • --project-id <id> – besitzende Projekt-ID. Verwenden Sie sie anstelle von --project-key.

    Übergeben Sie --project-id, --project-key oder --test-set-key. Wenn Sie mehrere übergeben, wird zuerst --project-id verwendet, dann --project-key und dann das Projektpräfix von --test-set-key.

  • --test-set-key <key> – Testsatzschlüssel (z. B. DEMO:42); Der Projektschlüssel ist aus dem Präfix abgeleitet.

  • --timeout <seconds> – maximale Wartezeit in Sekunden: eine ganze Zahl von 0 bis 604800 (eine Woche). Standardmäßig auf 1800 (30 Minuten). Übergeben Sie 0 , um unbegrenzt zu warten. Jeder andere Wert wird mit Exitcode 3 abgelehnt.

Hinweis:

In diesem Befehl ist kein --poll-interval -Flag vorhanden. Das Abrufintervall ist auf 60 Sekunden festgelegt.

Warnung:

Eine manuelle Ausführung, die früh mit executions finish geschlossen wurde, behält Status: "Running" bei, sodass wait nie einen Endstatus sieht. wait blockiert bis --timeout und beendet dann 4. Überprüfen Sie stattdessen den ExecutionFinished -Zeitstempel einer solchen Ausführung mit executions get-stats .

Beispiel​

# wait up to 15 minutes
uip tm wait \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --timeout 900
# wait up to 15 minutes
uip tm wait \
  --execution-id a1b2c3d4-0000-0000-0000-000000000001 \
  --project-key DEMO \
  --timeout 900

Data shape (finished with no failed test)​

{
  "Result": "Success",
  "Code": "WaitComplete",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Finished",
    "EndTime": "2025-04-15T10:32:11Z",
    "Duration": "00:02:11",
    "Passed": 12,
    "Failed": 0,
    "None": 0
  }
}
{
  "Result": "Success",
  "Code": "WaitComplete",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Finished",
    "EndTime": "2025-04-15T10:32:11Z",
    "Duration": "00:02:11",
    "Passed": 12,
    "Failed": 0,
    "None": 0
  }
}

Passed, Failed, and None count the tests that passed, failed, and have no result. Tests with no result do not fail the wait, because a manual run can finish with tests that nobody recorded.

Data shape (a test failed or the run was cancelled)​

{
  "Result": "Failure",
  "Code": "ExecutionTestsFailed",
  "ErrorCode": "execution_failed",
  "Message": "2 of 12 tests failed in execution 'a1b2c3d4-0000-0000-0000-000000000001'.",
  "Instructions": "List the failed tests with 'uip tm executions testcaselogs list --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-id 11111111-2222-3333-4444-555555555555 --results Failed', or download a JUnit report with 'uip tm result download --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-id 11111111-2222-3333-4444-555555555555'.",
  "Retry": "RetryWillNotFix",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Finished",
    "EndTime": "2025-04-15T10:32:11Z",
    "Duration": "00:02:11",
    "Passed": 10,
    "Failed": 2,
    "None": 0
  }
}
{
  "Result": "Failure",
  "Code": "ExecutionTestsFailed",
  "ErrorCode": "execution_failed",
  "Message": "2 of 12 tests failed in execution 'a1b2c3d4-0000-0000-0000-000000000001'.",
  "Instructions": "List the failed tests with 'uip tm executions testcaselogs list --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-id 11111111-2222-3333-4444-555555555555 --results Failed', or download a JUnit report with 'uip tm result download --execution-id a1b2c3d4-0000-0000-0000-000000000001 --project-id 11111111-2222-3333-4444-555555555555'.",
  "Retry": "RetryWillNotFix",
  "Data": {
    "ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Finished",
    "EndTime": "2025-04-15T10:32:11Z",
    "Duration": "00:02:11",
    "Passed": 10,
    "Failed": 2,
    "None": 0
  }
}

Data holds the same fields as on success. Status is the terminal state Test Manager reports: Finished or Cancelled. Code is ExecutionTestsFailed when a test failed and ExecutionCancelled when the run was cancelled. Both exit 1.

Datenform (Timeout)​

{
  "Result": "TimeoutError",
  "ErrorCode": "timeout",
  "Message": "Timed out after 900s waiting for execution 'a1b2c3d4-0000-0000-0000-000000000001'. Last status: Running.",
  "Instructions": "The execution may still be running. Run 'uip tm wait --execution-id a1b2c3d4-0000-0000-0000-000000000001' again, or check it with 'uip tm executions get-stats --execution-id a1b2c3d4-0000-0000-0000-000000000001'."
}
{
  "Result": "TimeoutError",
  "ErrorCode": "timeout",
  "Message": "Timed out after 900s waiting for execution 'a1b2c3d4-0000-0000-0000-000000000001'. Last status: Running.",
  "Instructions": "The execution may still be running. Run 'uip tm wait --execution-id a1b2c3d4-0000-0000-0000-000000000001' again, or check it with 'uip tm executions get-stats --execution-id a1b2c3d4-0000-0000-0000-000000000001'."
}

Exitcodes​

wait follows the standard exit codes:

Code beendenBedeutung
0The execution finished and no test failed.
1A test failed, the run was cancelled, the execution was not found, polling failed (three consecutive API errors or an interrupt), sign-in failed, or no project was given. See the Code, ErrorCode, and Message fields for detail.
2The login has no permission to read the execution.
3Validierungsfehler (false Flag-Wert, fehlende erforderliche Option).
4Zeitüberschreitung. Das Timeout ist verstrichen, bevor die Ausführung einen Endstatus erreicht hat.

An error that waiting cannot fix, such as an unknown execution ID (ErrorCode: "not_found"), stops the wait on the first read instead of at --timeout. Other errors are retried up to three times in a row.

Skriptmuster​

uip tm wait \
  --execution-id "$id" \
  --project-key DEMO \
  --timeout 1800
case $? in
  0) ;;
  1) echo "tests failed, run cancelled, or wait failed" >&2; exit 1 ;;
  4) echo "timed out" >&2; exit 4 ;;
  *) echo "wait failed" >&2; exit 1 ;;
esac
uip tm wait \
  --execution-id "$id" \
  --project-key DEMO \
  --timeout 1800
case $? in
  0) ;;
  1) echo "tests failed, run cancelled, or wait failed" >&2; exit 1 ;;
  4) echo "timed out" >&2; exit 4 ;;
  *) echo "wait failed" >&2; exit 1 ;;
esac
  • testsets run – erzeugt das ExecutionId , auf das gewartet werden soll.
  • report — summary of the counts and the failed test cases, to read once wait returns.
  • Ergebnis – JUnit-XML-Export.
  • Ausführungswiederholung – führen Sie die fehlgeschlagenen Fälle einer abgeschlossenen Ausführung erneut aus.
  • Ausführungen abbrechen – eine laufende automatisierte Ausführung anhalten; Rufen Sie es mit Cancelled mit wait ab.
  • run – Führen Sie jeden Test in einem hochgeladenen Paket aus, warten Sie und schreiben Sie einen Bericht in einem Befehl.

Siehe auch​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben