currents upload
Learn how to upload test results to Currents using currents upload command
currents upload uploads test results created form the followin sources:
Reports created using currents convert command
The command uploads results previously generated by one of supported reporters from process.env.CURRENTS_REPORT_DIR or --reportDir <path> , or the most recently created directory named .currents/[timestamp]-[uuidv4()] (in the current working directory).
Usage
npx currents upload --project-id=xxx --key=yyy# Generate jest results
$ npx jest --reporters=@currents/jest --reporters=default
[currents]: Run started
[currents]: Report directory is set to - /Users/agoldis/immer/.currents/2024-07-16T20-33-12-555Z-478913e1-1916-499b-8d8d-c08043d50f3d
# ....
[currents]: [__tests__/base.js] - spec results written to file: /Users/agoldis/immer/.currents/2024-07-16T20-33-12-555Z-478913e1-1916-499b-8d8d-c08043d50f3d/instances/Aql-q2CM.json
[currents]: Run completed
# Upload the results to Currents
$ npx currents upload --key=XXX --project-id=C3lBM6
Currents config: {
projectId: 'C3lBM6',
recordKey: '*****',
removeTitleTags: false,
disableTitleTags: false,
debug: false
}
Report directory: '.currents/2024-07-16T20-33-12-555Z-478913e1-1916-499b-8d8d-c08043d50f3d'
[root] Run created: 'https://app.currents.dev/run/8466c149d9bbf745'
Script execution finished
✨ Done in 17.96s.Configuration
currents upload options apart from --project-id and --key are optional. Use --help flag to list the available options.
-k, --keyThe record key to record the results to Currents. Read more: Record Key
Environment variable:
CURRENTS_RECORD_KEYType:
string
-p, --project-idThe id of the project for reporting
Environment variable:
CURRENTS_PROJECT_IDType:
string
--ci-build-idThe id of the build to record the test run. Read more CI Build ID
Environment variable:
CURRENTS_CI_BUILD_IDType:
stringDefault value:
auto:[random-string]
--report-dirDirectory with the test results generated by one of currents reporters
Environment variable:
CURRENTS_REPORT_DIRType:
stringDefault value:
.currents/[timestamp]-[uuidv4]
-t, --tagComma-separated tag(s) to attach to the recorded run
Environment variable:
CURRENTS_TAGType:
string
--disable-title-tagsDisable extracting tags from test title, e.g.
Test name @smokewould not be tagged withsmokeEnvironment variable:
CURRENTS_DISABLE_TITLE_TAGSType:
booleanDefault value:
false
--remove-title-tagsRemove tags from test names in Currents, e.g.
Test name @smokebecomesTest namein the dashboardEnvironment variable:
CURRENTS_REMOVE_TITLE_TAGSType:
booleanDefault value:
false
--debugEnable debug logs
Environment variable:
DEBUG=currents*Type:
boolean
Last updated
Was this helpful?