Autotest adapters
Use official adapters to bind automated tests to Tracera cases and upload results.
Before you start
- Your instance URL (
TRACERA_BASE_URL). - A project Autotest token (
TRACERA_AUTOTEST_TOKEN) — Project settings → Autotest (see Tokens). - The project id (
TRACERA_PROJECT_ID). - The test case id (
testCaseId) from the case card.
Requirements
Tested on:
- Node.js 22.19–26.12 (all JS adapters).
- Python 3.11–3.15 (all Python adapters).
- JDK 17–27 (all JVM adapters).
- .NET 8–10 (all .NET adapters).
- Go 1.25–1.27 (all Go adapters).
- Dart 3.8–3.13 (all Dart adapters).
- Swift 6–6.4 (macOS 15–27 / Xcode 16–27; all Swift adapters).
Environment
The adapter reads each variable from the process environment first. If a TRACERA_* key is unset or empty, it fills that key from the nearest .env file starting at the working directory and walking up parent folders (not your home directory). Other keys in the file are ignored. A non-empty process value wins over .env.
| Variable | Required | Description |
|---|---|---|
TRACERA_BASE_URL | yes | Instance URL |
TRACERA_AUTOTEST_TOKEN | yes | Project Autotest token |
TRACERA_PROJECT_ID | yes | Project id |
TRACERA_TEST_RUN_ID | no | Attach to an existing run (report only; no finish). Omit to create a new run |
TRACERA_RUN_TITLE | no | Title for a newly created run (≤128). Only when creating a run; ignored if TRACERA_TEST_RUN_ID is set |
TRACERA_REQUIRE_REPORT | no | Default false; true → fail the suite if a run cannot be created or result upload fails |
TRACERA_LOG_LEVEL | no | error, warn, info (default), debug |
Run mode
- Omit
TRACERA_TEST_RUN_ID— the adapter creates an empty run, uploads results into it, and finishes that run when the suite ends. - Set
TRACERA_TEST_RUN_ID— report only into that run; the adapter does not finish it.
To start CI from the UI when you Run or Rerun a test run, see Integrations.
Hooks
Only per-test hooks map to the result’s Setup / Teardown. Suite-level hooks are not reported as steps. If suite setup fails and the runner still schedules bound tests, they are reported as Failed with that error on the result (usually no steps). Suite teardown does not change results that already finished as Passed.
Retries
When the runner retries a Failed test, only the final attempt is reported. On an autotest retry
(retry > 0), the result Env tab includes a runner-specific key such as PLAYWRIGHT_RETRY or
JEST_RETRY (1 is the second run). Each runner that supports retries documents that Env key on its page.
Comments, errors, and attachments
tracera.comment, tracera.error, and tracera.attachment are added to the current step when
called inside a step; outside any step they are added to the result.
tracera.error only adds error text — it does not fail the test. Use the runner’s fail API for Failed.
Attachment limits
| Limit | Value |
|---|---|
| Per step | up to 10 files |
| Per result (outside steps) | up to 10 files |
| File size | up to 50 MB each |
The server detects the type from content and file extension. Unsupported types are rejected (upload error in the adapter log).
Allowed types
Images: image/png, image/jpeg, image/gif, image/webp
Documents / data: text/plain, text/csv, application/pdf, application/json,
application/xml, application/zip
Archives: application/gzip, application/x-tar
Video: video/webm, video/mp4
Other files: application/octet-stream
Runners
JavaScript: Playwright JS, Cypress, WebdriverIO, Jest, Vitest
Python: Pytest, Playwright Python, Robot Framework, Behave
JVM: JUnit 5, TestNG, Kotest, Cucumber JVM, Android
Swift: Swift Testing, XCUITest