- 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 attachment downloads the files captured by the test case logs in a test execution — screenshots, serialized state, recorded logs, any file the automation attached to a log. Use it after a run to pull evidence into your CI workspace, usually alongside a JUnit report from uip tm result download.
Synopsis
uip tm attachment download --execution-id <uuid> (--project-key <key> | --test-set-key <key>)
[--test-case-name <name>]… [--only-failed] [--result-path <path>]
uip tm attachment download --execution-id <uuid> (--project-key <key> | --test-set-key <key>)
[--test-case-name <name>]… [--only-failed] [--result-path <path>]
All verbs honor the global options and the standard exit codes. Every verb accepts -t, --tenant <name> and --log-level <level> (default Information).
uip tm attachment download
Download attachments for the test case logs of a single execution. The command pages through the logs, optionally narrows to failed-only or to named test cases, then lists and downloads every attachment into a per-test-case subdirectory under --result-path. Failures on individual attachments are logged and recorded in a Skipped field; they do not abort the overall run.
Arguments: none.
Options:
--execution-id <uuid>(required) — execution whose attachments to pull.--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.--test-case-name <name>— filter by test case name (case-insensitive substring). Can be repeated to accept any of several names. Matching is against the package entry point name, falling back to the test case name and the automation test case name.--only-failed— download attachments only for test case logs with resultFailed.--result-path <path>— output directory. Defaults to the current working directory (.). The directory is created if missing.
Layout on disk:
<result-path>/
<sanitized test case name>/
<sanitized attachment file name>
<sanitized attachment file name>
<sanitized test case name>/
<sanitized attachment file name>
<result-path>/
<sanitized test case name>/
<sanitized attachment file name>
<sanitized attachment file name>
<sanitized test case name>/
<sanitized attachment file name>
File and directory names are sanitized — characters that are illegal on Windows or Unix (< > : " / \ | ? * and control characters) are replaced with _, and names are truncated to 200 characters.
Examples:
# download everything
uip tm attachment download \
--execution-id a1b2c3d4-0000-0000-0000-000000000001 \
--project-key DEMO \
--result-path ./attachments
# only failed tests, narrowed to two named cases
uip tm attachment download \
--execution-id a1b2c3d4-0000-0000-0000-000000000001 \
--project-key DEMO \
--only-failed \
--test-case-name login \
--test-case-name checkout \
--result-path ./attachments
# download everything
uip tm attachment download \
--execution-id a1b2c3d4-0000-0000-0000-000000000001 \
--project-key DEMO \
--result-path ./attachments
# only failed tests, narrowed to two named cases
uip tm attachment download \
--execution-id a1b2c3d4-0000-0000-0000-000000000001 \
--project-key DEMO \
--only-failed \
--test-case-name login \
--test-case-name checkout \
--result-path ./attachments
Data shape — normal run:
{
"Code": "AttachmentDownload",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"OutputPath": "./attachments",
"Downloaded": 3,
"MatchedTestCases": 2
}
}
{
"Code": "AttachmentDownload",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"OutputPath": "./attachments",
"Downloaded": 3,
"MatchedTestCases": 2
}
}
Data shape — when no test case log matches the filters:
{
"Code": "AttachmentDownload",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"Message": "No matching test case logs found.",
"Downloaded": 0
}
}
{
"Code": "AttachmentDownload",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"Message": "No matching test case logs found.",
"Downloaded": 0
}
}
Data shape — when some attachments fail to list or download, a Skipped array is appended with one entry per failure, formatted "<test case name>: <error message>":
{
"Code": "AttachmentDownload",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"OutputPath": "./attachments",
"Downloaded": 2,
"MatchedTestCases": 3,
"Skipped": ["Login flow: HTTP 404: Not Found"]
}
}
{
"Code": "AttachmentDownload",
"Data": {
"ExecutionId": "a1b2c3d4-0000-0000-0000-000000000001",
"OutputPath": "./attachments",
"Downloaded": 2,
"MatchedTestCases": 3,
"Skipped": ["Login flow: HTTP 404: Not Found"]
}
}
Related
- testset execute — produces the
ExecutionIdconsumed here. - wait — block until the execution is terminal before pulling attachments.
- result — JUnit XML of the same execution.
- report — human-readable summary.