Currents Documentation
Currents.devGitHubChangelog
  • Getting Started
    • What is Currents?
    • Playwright
      • Playwright: Quick Start
      • Troubleshooting Playwright
    • Cypress
      • Your First Cypress Run
      • Integrating with Cypress
        • Compatibility
        • Alternative Cypress Binaries
      • Troubleshooting Cypress
    • Jest
      • Your First Jest Run
      • Detox + Jest
      • Troubleshooting Jest
    • Others
    • CI Setup
      • GitHub Actions
        • Cypress - GitHub Actions
        • Playwright - GitHub Actions
        • Jest - GitHub Actions
        • Node.js - GitHub Actions
        • Commit data for GitHub Actions
        • Custom Docker runners
        • Named Runners
      • GitLab
        • Cypress - GitLab CI/CD
        • Playwright - GitLab CI/CD
        • Custom Docker runners
      • Jenkins
        • Cypress - Jenkins
        • Playwright - Jenkins
      • CircleCI
        • Cypress - CircleCI
        • Playwright - CircleCI
      • Bitbucket
        • Cypress - Bitbucket Pipelines
      • Azure DevOps
        • Cypress - Azure DevOps
        • Playwright - Azure DevOps
      • AWS Code Build
        • Cypress - AWS Code Build
        • Playwright - AWS Code Build
      • NX
        • Playwright - NX
        • Cypress - NX
  • Guides
    • Record Key
    • CI Build ID
    • Reporting
      • Reporting Strategy
      • Reporting in CI
      • Step-Level Reporting
    • CI Optimization
      • Playwright Parallelization
      • Orchestration Setup
      • Fully Parallel Mode
      • Re-run Only Failed Tests
      • Cloud Spot Instances
      • Failing Fast
      • Load Balancing
    • Code Coverage
      • Code Coverage for Playwright
      • Code Coverage for Cypress
    • Currents Actions
      • Setup Currents Actions
      • Using Currents Actions
      • Reference
        • Conditions
        • Actions
    • Playwright Component Testing
    • Playwright Visual Testing
    • Playwright Annotations
    • Playwright Tags
    • MCP Server
  • Dashboard
    • Projects
      • Projects Summary view
      • Project Settings
      • Archive and Unarchive Projects
    • Runs
      • Run Status
      • Run Details
      • Commit Information
      • Tags
      • Run Timeouts
      • Cancelling Runs
      • Deleting Runs
      • Run Progress
    • Tests
      • Spec File Status
      • Test Status
      • Flaky Tests
      • Test History
    • Test Suite Explorer
      • Test Explorer
        • Tests Performance
      • Spec Files Explorer
        • Spec Files Performance
      • Errors Explorer
  • Automated Reports
  • Insights and Analytics
  • Administration
    • Email Domain Based Access
    • SSO SAML2.0
      • SAML2.0 Configuration
      • SCIM User Provisioning
      • IdP-initiated Sessions
      • JumpCloud
        • JumpCloud User provisioning
      • Okta
        • Okta User provisioning
      • Troubleshooting SSO
    • Billing & Usage
  • Billing and Pricing
  • Resources
    • Reporters
      • cypress-cloud
        • Batched Orchestration
        • Migration to Cypress@13
      • @currents/cli
      • @currents/playwright
        • Configuration
        • pwc
        • pwc-p (orchestration)
        • Playwright Fixtures
      • @currents/jest
      • @currents/node-test-reporter
      • @currents/cmd
        • currents api
        • currents upload
        • currents cache
        • currents convert
      • Data Format Reference
    • Integrations
      • GitHub
        • GitHub App
        • GitHub OAuth
      • GitLab
      • Slack
      • Microsoft Teams
      • HTTP Webhooks
      • Bitbucket
    • API
      • Introduction
      • Authentication
      • API Keys
      • Errors
      • Pagination
      • API Resources
        • Instances
        • Runs
        • Projects
        • Spec Files
        • Test Signature
        • Test Results
    • Data Privacy
      • Access to Customer Data
      • Data Retention
      • Cloud Endpoints
    • Support
Powered by GitBook
On this page
  • Usage
  • Configuration

Was this helpful?

  1. Resources
  2. Reporters
  3. @currents/cmd

currents upload

Learn how to upload test results to Currents using currents upload command

Previouscurrents apiNextcurrents cache

Last updated 5 months ago

Was this helpful?

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, --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 with smoke

    • 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 becomes Test name in the dashboard

    • Environment variable: CURRENTS_REMOVE_TITLE_TAGS

    • Type: boolean

    • Default value: false

  • --debug

    • Enable debug logs

    • Environment variable: DEBUG=currents*

    • Type: boolean

Jest reporter