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
  • Prerequisites
  • Bare CircleCI configuration
  • Using Cypress Orb with default executor

Was this helpful?

  1. Getting Started
  2. CI Setup
  3. CircleCI

Cypress - CircleCI

Running Cypress tests in parallel on CircleCI and Currents dashboard

PreviousCircleCINextPlaywright - CircleCI

Last updated 10 days ago

Was this helpful?

TL;DR Check out the example repository:

This is an example repository that showcases using with .

We are hosting independent versions of the Cypress App and with pre-installed binaries. Please refer to the for the list of supported binaries and versions.

The example installs the custom Cypress App and runs 3 containers with Cypress tests in parallel using various setup scenarios.

Prerequisites

  • Create an account at https:/app.currents.dev.

  • Obtain ProjectId and Record Key.

  • Set CURRENTS_RECORD_KEY:

    • create and set CURRENTS_RECORD_KEY.

    • alternatively, set CURRENTS_RECORD_KEY

  • Follow the setup instructions at to create currents.config.js set your projectId

Bare CircleCI configuration

Please refer to the setup scenario that fits your needs.

Use Docker image with pre-installed Cypress

CircleCI configuration that uses Docker image with pre-installed cypress app. Refer to the for the list of supported binaries and versions.

version: 2.1

jobs:
  # Use pre-built image with alternative Cypress binary
  noorbs currents-image:
    parallelism: 3
    docker:
      - image: currentsdev/cypress-included:12.17.4
    steps:
      - checkout
      - run:
          name: Install Dependencies
          command: npm ci
      - run:
          name: Run tests
          command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY

workflows:
  noorbs:
    jobs:
      - noorbs currents-image:
          context: currents

Explicitly downloading alternative Cypress binary

version: 2.1

jobs:
  # Explicitly download Cypress binary
  noorbs explicit-download:
    parallelism: 3
    docker:
      - image: cypress/base:18.16.1
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: npm ci
      - run:
          name: Download Alternative Cypress Binaries
          command: CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force
      - run:
          name: Run tests
          command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY

workflows:
  noorbs:
    jobs:
      - noorbs explicit-download:
          context: currents

Using Cypress Orb with default executor

Using cypress/default executor example

version: 2.1

orbs:
  cypress: cypress-io/cypress@3

jobs:
  # Use cypress/default executor example
  default-executor cypress-install:
    executor: cypress/default
    steps:
      - cypress/install:
          post-install: CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev npx cypress install --force
      - persist_to_workspace:
          root: ~/
          paths:
            - .cache/Cypress
            - project

  default-executor cypress-run:
    executor: cypress/default
    parallelism: 3
    steps:
      - attach_workspace:
          at: ~/
      - cypress/run-tests:
          cypress-command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY

workflows:
  with-orbs default-executor:
    jobs:
      - default-executor cypress-install
      - default-executor cypress-run:
          context: currents
          requires:
            - default-executor cypress-install

Using custom executor with pre-installed Cypress App

version: 2.1

orbs:
  cypress: cypress-io/cypress@3

executors:
  # define custom executors
  currents-executor:
    docker:
      - image: currentsdev/cypress-included:12.17.4

jobs:
  # Use currentsdev executor with pre-installed Cypress binary
  custom-executor cypress-install:
    executor: currents-executor
    steps:
      - cypress/install
      - persist_to_workspace:
          root: ~/
          paths:
            - project

  custom-executor cypress-run:
    executor: currents-executor
    parallelism: 3
    steps:
      - attach_workspace:
          at: ~/
      - cypress/run-tests:
          cypress-command: npx cypress-cloud run --parallel --record --key $CURRENTS_RECORD_KEY

workflows:
  with-orbs custom-executor:
    jobs:
      - custom-executor cypress-run:
          context: currents

Use Docker image with pre-installed Cypress


Here's an example of the demo run in Currents.dev dashboard, note that 3 cypress agents were used as part of this run:

CircleCI configuration that explicitly downloads alternative Cypress binary. Refer to the for the list of supported binaries and versions.

has pre-defined commands that facilitate creating CircleCI configuration. The examples below show how to integrate Cypress tests with Currents using Cypress Orb and various setup scenarios.

The examples below use to run cypress-cloud for recording test results and parallelization with

The configuration below uses the default cypress/default and installs custom Cypress binary during cypress/install step:

The configuration below uses the with pre-installed Cypress App.

CircleCI configuration that uses Docker image with pre-installed cypress app. Refer to the for the list of supported binaries and versions.

https://github.com/currents-dev/circleci-example
CircleCI
Currents.dev
docker images
documentation
config file
CircleCI context
Environment variable
https://currents.dev/readme/integration-with-cypress/cypress-cloud
documentation
documentation
Cypress Orb
Custom Test Command
Currents.dev
CircleCI executor
custom executor
documentation
Running Cypress tests in parallel on CircleCI