@currents/cmd v1.1.2
@currents/cmd
CLI tool for Currents - a cloud platform for debugging, troubleshooting, and analyzing CI tests.
Installation
npm install @currents/cmd --save-dev
Usage
- Generate test results with one of the supported reporters
- Upload the results
npx currents upload --project-id=xxx --key=yyy
ā¹ļø 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.
Notes
Obtain --project-id
and --key from https://app.currents.dev to identify the project and associate the results with your organization.
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, otherwise - use the most recently created directory named as
.currents/[timestamp]-[uuidv4()]
in the current working directory
Configuration
Please note that all options apart from --project-id
and --key
are optional.
Property | Type | Description | Environment variable | Default |
---|---|---|---|---|
-k, --key | string | The record key to record the results to Currents. Read more: https://currents.dev/readme/guides/record-key | CURRENTS_RECORD_KEY | - |
-p, --project-id | string | The id of the project for reporting | CURRENTS_PROJECT_ID | - |
--machine-id | string | Unique identifier of the machine running the tests. If not provided, it will be generated automatically. See: https://currents.dev/readme/readme?q=machineId | CURRENTS_MACHINE_ID | [random-string] |
--report-dir | string | The directory containing the test results created with one of the supported reporters | CURRENTS_REPORT_DIR | .currents/* |
--ci-build-id | string | The id of the build to record the test run. Read more: https://currents.dev/readme/guides/ci-build-id | CURRENTS_CI_BUILD_ID | auto:[random-string] |
--debug | boolean | Enable debug logs | DEBUG="currents,currents:*" | false |
-t, --tag | string | Comma-separated tag(s) for recorded runs in Currents | CURRENTS_TAG | - |
--disable-title-tags | boolean | Disable extracting tags from test title, e.g. Test name @smoke would not be tagged with smoke | CURRENTS_DISABLE_TITLE_TAGS | false |
--remove-title-tags | boolean | Remove tags from test names in Currents, e.g. Test name @smoke becomes Test name in the dashboard | CURRENTS_REMOVE_TITLE_TAGS | false |
The configuration is also available by running the CLI command with the --help
argument.
Troubleshooting
Run the CLI command with the --debug
argument or prefix it with DEBUG="currents,currents:*"
to obtain detailed information about the command execution process.
7 months ago
7 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago