For the complete documentation index, see llms.txt. This page is also available as Markdown.

currents run upload

Upload test results of the Jest and Node.js test runner reporters, or JUnit XML reports, to Currents with the currents run upload command

currents run upload uploads test results to Currents. It reads the reports written by a Currents reporter:

With --input-format, it first converts JUnit XML reports to the Currents format, then uploads them. See Upload JUnit XML reports.

For Detox runs, the command also uploads the videos, screenshots and logs that Detox recorded, attached to the test attempt they belong to, and detox.trace.json. Run it after detox test exits.

Usage

npx currents run upload --key <record-key> --project-id <project-id> --ci-build-id <ci-build-id>

The command uploads the reports in --report-dir. Without it, the command uploads the newest folder in .currents in the current folder, which is where the reporters write by default. It prints Run created: and the link to the run.

For example, with Jest:

npx jest --reporters=@currents/jest --reporters=default
npx currents run upload --key <record-key> --project-id <project-id> --ci-build-id <ci-build-id>

Options

--key and --project-id are required. The other options are optional.

Option
Environment variable
Description

-k, --key <record-key>

CURRENTS_RECORD_KEY

-p, --project-id <id>

CURRENTS_PROJECT_ID

The project ID from the Currents dashboard.

--ci-build-id <id>

CURRENTS_CI_BUILD_ID

The CI build ID to record the run with. By default it is taken from the CI environment, or a random value. See CI Build ID.

--report-dir <folder>

CURRENTS_REPORT_DIR

The folder of the reports to upload. Default: the newest folder in .currents.

-t, --tag <tag>

CURRENTS_TAG

Tags to add to the run. Comma-separated or repeated.

--machine-id <id>

CURRENTS_MACHINE_ID

The ID of the machine that ran the tests. Default: a random value.

--disable-title-tags

CURRENTS_DISABLE_TITLE_TAGS

Do not read tags from test names. For example, Test name @smoke is not tagged with smoke. Default: false.

--remove-title-tags

CURRENTS_REMOVE_TITLE_TAGS

Remove tags from test names in Currents. For example, Test name @smoke becomes Test name in the dashboard. Default: false.

--debug

CURRENTS_DEBUG

Print debug logs. Keys are hidden in them. Default: false.

The options for converting JUnit XML reports (--input-format, --input-file, --framework, --framework-version, --output-dir) are on Upload JUnit XML reports.

Examples

Add the tags tagA and tagB to the run:

Upload the reports of another folder:

Troubleshooting

If the command finds no reports, it prints the folder it looked in:

Run the test command with the Currents reporter before run upload, in the same folder, or pass --report-dir.

Last updated

Was this helpful?