@currents/cmd
The package has CLI commands and tools for Currents platform
Requirements
Create an account at https://app.currents.dev
Obtain the Project Id (see Project Settings) and the Record Key
Setup
Usage
currents
will upload the results, as follows:
use
process.env.CURRENTS_REPORT_DIR
or--reportDir
to read the results previously generated by one of supported reporters, otherwiseuse the most recently created directory named
.currents/[timestamp]-[uuidv4()]
in the current working directory
Get familiar with CI Build ID before using currents
in CI.
It is important to set the CI Build ID
explicitly using --ci-build-id
option, if you are using CI sharding or multiple CI machines to parallelize your tests.
If not set explicitly, the CI Build ID
will be set to a random value and it will affect your reporting.
Example
Configuration
All options apart from --project-id
and --key
are optional. Use --help
flag to list the available options.
-k, --key
The record key to record the results to Currents. Read more: Record Key
Environment variable:
CURRENTS_RECORD_KEY
Type:
string
-p, --project-id
The id of the project for reporting
Environment variable:
CURRENTS_PROJECT_ID
Type:
string
--ci-build-id
The id of the build to record the test run. Read more CI Build ID
Environment variable:
CURRENTS_CI_BUILD_ID
Type:
string
Default value:
auto:[random-string]
--report-dir
Directory with the test results generated by one of currents reporters
Environment variable:
CURRENTS_REPORT_DIR
Type:
string
Default value:
.currents/[timestamp]-[uuidv4]
-t, --tag
Comma-separated tag(s) to attach to the recorded run
Environment variable:
CURRENTS_TAG
Type:
string
--disable-title-tags
Disable extracting tags from test title, e.g.
Test name @smoke
would not be tagged withsmoke
Environment variable:
CURRENTS_DISABLE_TITLE_TAGS
Type:
boolean
Default value:
false
--remove-title-tags
Remove tags from test names in Currents, e.g.
Test name @smoke
becomesTest name
in the dashboardEnvironment variable:
CURRENTS_REMOVE_TITLE_TAGS
Type:
boolean
Default value:
false
--debug
Enable debug logs
Environment variable:
DEBUG=currents*
Type:
boolean
Troubleshooting
Run the CLI command with the --debug
argument or prefix it with DEBUG="currents*"
to obtain detailed information about the command execution process.
Last updated