sorry-cypress
  • Documentation
  • Guide
    • Get Started
    • Dashboard and API
    • Cloud Setup
  • Cloud
    • AWS
      • Basic AWS Setup
      • Advanced AWS Setup
      • AWS Networking
      • AWS S3 Manual Setup
    • Google Cloud
      • Google Cloud & MinIO - Deprecated
    • Microsoft Azure
    • Heroku
    • Kubernetes
    • Docker Images
  • Integrating Cypress
    • Integration options
    • cy2 - Deprecated
    • Agent Configuration - Deprecated
    • CLI One Liners - Deprecated
  • Configuration
    • Basic Setup
    • Full Setup
    • Director Service
      • AWS Role Assumption via Service Account
      • AWS S3 Configuration
      • Minio Configuration
      • Azure Blob Storage Configuration
    • API Service
    • Web Dashboard
      • Configuration
    • MongoDB Configuration
    • Troubleshooting
  • Integrations
    • Events
    • Webhooks
    • Slack Integration
    • GitHub Integration
    • BitBucket Integration
    • MS Teams Integration
  • Concepts
    • Parallelization Explained
    • Flaky Tests
    • Test Details
    • Test Status
  • CI
    • GitHub Actions
    • Travis
    • Jenkins
    • AWS Codebuild
  • Development
    • Changelog
    • Development Guide
  • Community Content
  • ❤️ Contributions
  • Support
  • Legal
  • FAQ
Powered by GitBook
On this page
  • Install and configure cypress-cloud and cypress
  • Running cypress tests in parallel
Edit on GitHub
  1. Guide

Get Started

Get started with a free parallelization using sorry-cypress

PreviousDocumentationNextDashboard and API

Last updated 1 year ago

Let's start by running a basic sorry-cypress configuration:

docker run -p 1234:1234 agoldis/sorry-cypress-director

We've just launched director service on - this service coordinates cypress agents and enables free parallelization.

Install and configure cypress-cloud and cypress

is an open-source tool for integrating Cypress with alternative cloud services like Currents or Sorry Cypress.

npm install cypress-cloud cypress

Create a new configuration file: currents.config.js in the project’s root, set cloudServiceUrl to self-hosted director service of Sorry Cypress

// currents.config.js
module.exports = {
  projectId: "yyy", // the projectId, can be any values for sorry-cypress users
  recordKey: "xxx", // the record key, can be any value for sorry-cypress users
  cloudServiceUrl: "http://localhost:1234",   // Sorry Cypress users - set the director service URL
};

Add cypress-cloud/plugin to cypress.config.{js|ts|mjs}

// cypress.config.js
const { defineConfig } = require("cypress");
const { cloudPlugin } = require("cypress-cloud/plugin");
module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      return cloudPlugin(on, config);
    },
  },
});

Running cypress tests in parallel

Let's open several terminal windows and run cypress-cloud in each. Make sure you have cypress tests defined in advance.

# run in each terminal
npx cypress-cloud run --parallel --record --key somekey --ci-build-id hello-cypress

You'll notice that different instances of cypress agents are running different tests.

🎉 We've just finished the basic setup of sorry-cypress and ran our tests in parallel!

  • Use the same --ci-build-id to associate different cypress agents with the same run

  • This basic director configuration keeps all the test results in memory. Restarting it wipes all the data

  • --key and projectId do not have any effect on the basic setup

You can run as many as you want - each will run a different test suite

http://localhost:1234
cypress-cloud
cypress agents