Test Case Attachments
An attachment is a file bound to a test case, a step, or a case run — usually a
screenshot, a log, a HAR, a trace or a PDF. Attachments are stored by the
platform, count toward the space’s storage quota, and are shown inline in a case
and in its run reports.
About URLs in examples: all examples use
localhost:5770as the default Mockarty address. If your instance runs on a remote server, replacelocalhost:5770with its actual address. See Tips & Useful Features for details.
Related pages: Test Case Management · Review Workflow · Case Run View
Adding a file
- To a step — in the case editor, drop a file onto the step’s drop zone or
click it to choose a file. In the step’s rich-text fields you can also paste a
screenshot from the clipboard. The same drop zone works while you resolve a
manual step in a run. - To a case — open the case’s Attachments tab and upload there; the file
is shared by every version of the case. - To a run or a step run — attach evidence while resolving a step; it stays
with that execution.
The upload starts immediately and the file appears in the list when it is stored.
If an upload is refused, the message names the reason (too large, wrong file
type, storage quota reached).
Viewing a file
Click an attachment to open the preview — no download round-trip and no leaving
the page:
- Images, video, audio and PDF render inline.
- Markdown is rendered formatted; text, logs, JSON, CSV, XML and YAML open
in a monospace viewer. - Word (
.docx) and Excel (.xlsx) open read-only (Word as formatted text,
Excel as per-sheet tables). To change them, upload an edited file. - Files larger than 15 MiB show a download button instead of an inline preview.
A case-run report lists every file of its steps, up to 10,000. If the list cannot
be read or exceeds that limit, opening the report fails with an explicit error
instead of showing an empty list — retry after storage recovers, or reduce the
number of files collected per run.
Editing and annotating
- Text artefacts can be edited in place. Open a text, Markdown, JSON, CSV,
XML or YAML attachment, click Edit, change the content and Save — the
same attachment is updated, so existing links keep working. - Images can be annotated. Open an image and click Annotate to draw
arrows, rectangles, ellipses, highlights, freehand marks or text.
Save as copy keeps the original and adds the marked-up version;
Replace original overwrites the same attachment. Annotated screenshots
appear in the run report you send to developers.
Limits and quotas
| Limit | Value |
|---|---|
| Size of one file | 25 MiB |
| Storage per space | 50 GiB by default; set in Settings → Test cases & tasks → Retention & Quotas |
| Hard enforcement | On by default — an upload over the quota is refused with 409; turn off Hard-enforce to allow over-quota uploads |
| Report file list | 10,000 files per case-run report |
The accepted file types are PNG, JPEG, WebP, GIF, PDF, JSON, XML, plain text,
CSV, ZIP, HAR and application/octet-stream. Other types are refused with
415 Unsupported Media Type. If the optional virus scanner cannot scan a file,
the upload is recorded as a tcm.attachment.scan_failed event in the audit log
and the file is not stored.
Deleting and retention
- Deleting an attachment asks for confirmation and moves it to the space’s
recycle bin; it is removed from the case or run at once. - A file shared by several attachments or cases is kept until nothing references
it, so deleting one attachment does not break the others. - Physical cleanup runs in the background after the retention period. A legal
hold blocks deletion even after retention expires. - When automatic cleanup is enabled, temporary files left over from a disabled or
expired import integration are reclaimed too; published attachments, retained
report history and files under legal hold stay protected.
Files that come from CI
Evidence uploaded by an external CI run is read-only through the attachment
API: adding a file to an accepted result, or to one of its steps, returns 409
with code: accepted_result_read_only (this covers upload, presigned upload and
confirm). Send the evidence through the result-reporting flow instead.
Launch-wide files imported from a saved Allure TestOps integration are read-only
in the same way (409, code: imported_report_read_only) and are refreshed by
the import integration. Ordinary local attachments stay editable. If ownership of
an imported file cannot be verified, the file is unavailable until the import is
repaired.
To page through the files of an imported launch over the API, use
GET …/media?parentKind=test_plan_run&parentId=<runId>&limit=100. Keep the first
page’s snapshot and send it on every following page; if the files change
mid-paging, the API answers 409 with code: imported_report_changed and no
page — restart from the first page without a snapshot. The Go, Python and Java
SDKs paginate this list for you.
From the CLI and the SDKs
| Workflow | CLI | Go | Python | Java |
|---|---|---|---|---|
| upload | mockarty-cli attachments upload <file> |
client.Media().Upload |
client.media.upload |
client.media().upload |
| link a large file (presigned) | same command — the printed via says which lane ran |
Link |
link |
link |
| list a parent’s files | attachments list --parent-kind --parent-id |
List |
list |
list |
| metadata | attachments get <id> |
Get |
get |
get |
| content link | attachments url <id> --variant view |
ContentURL |
content_url |
contentUrl |
| delete | attachments delete <id> |
Delete |
delete |
delete |
Settings routes, the personal-workplace mailbox and Cloud ingress webhooks are
not exposed by the SDKs or the CLI: they are operator surfaces, not repeatable
customer automation.
Storage settings (server administrators)
The platform stores files in a local directory or in S3-compatible object
storage, chosen when the server starts. Existing files stay where they were
uploaded; switching backends affects new uploads only and needs a restart.
- Local filesystem (default) —
MOCKARTY_BLOB_FS_ROOTsets the directory
(default./data/blobs). Set it explicitly on containers, Helm or systemd when
the working directory is not persistent, otherwise attachments can disappear
with the container. - For S3-compatible storage, set
MOCKARTY_BLOB_BACKEND=s3plus
MOCKARTY_BLOB_S3_ENDPOINTandMOCKARTY_BLOB_S3_BUCKET. Optional:
MOCKARTY_BLOB_S3_REGION,MOCKARTY_BLOB_S3_ACCESS_KEY,
MOCKARTY_BLOB_S3_SECRET_KEY,MOCKARTY_BLOB_S3_PREFIXand
MOCKARTY_BLOB_S3_USE_SSL(defaulttrue). AWS S3, MinIO, Yandex Object
Storage, VK Cloud and Cloud.ru work. If the storage address is only
reachable from the server, useMOCKARTY_BLOB_S3_PUBLIC_ENDPOINTfor
the host and port browsers can reach.MOCKARTY_BLOB_S3_PUBLIC_USE_SSL
selects HTTPS for those links and defaults totrue.
For large CI artefacts, MOCKARTY_EXTERNAL_RUN_BLOB controls whether inline
attachments of an external run are moved into that storage: leave it unset (or
inline) to keep them inline, or set auto, fs or s3 to offload them. The
actual backend is always the one selected by MOCKARTY_BLOB_BACKEND; if storage
is temporarily unreachable, the run is still recorded with the file inline.