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
  • Basic sorry-cypress Setup
  • Full sorry-cypress kit on Heroku
Edit on GitHub
  1. Cloud

Heroku

Sorry-cypress installation instructions for Heroku

PreviousMicrosoft AzureNextKubernetes

Last updated 2 years ago

Basic sorry-cypress Setup

Click the button below to deploy the basic, in-memory, standalone director service to Heroku.

Full sorry-cypress kit on Heroku

  • Download and install the

  • You must have set up locally to continue

We'll create 3 separate Heroku applications - one for each service. Publicly available docker images of 3 services are available at:

The images are automatically updated on each release and tagged in accordance with GitHub releases.

sorry-cypress uses MongoDB as a persistence layer for storing and retrieving test results. We'll use a free hosted solution to run a managed instance of MongoDB.

Creating Heroku Application

Create 3 new Heroku application and give them appropriate names

heroku create <prefix>-director
heroku create <prefix>-api
heroku create <prefix>-dashboard

Run the commands to deploy director , API and Dashboard services

# Sign into Heroku Container Registry.
heroku container:login

# Pull services image
docker pull agoldis/sorry-cypress-director:latest
docker pull agoldis/sorry-cypress-api:latest
docker pull agoldis/sorry-cypress-dashboard:latest

# Tag service images as Heroku app image
docker tag agoldis/sorry-cypress-director:latest registry.heroku.com/<name_of_director_app>/web
docker tag agoldis/sorry-cypress-api:latest registry.heroku.com/<name_of_api_app>/web
docker tag agoldis/sorry-cypress-dashboard:latest registry.heroku.com/<name_of_dashboard_app>/web

# Push the images to Heroku Container Registry
docker push registry.heroku.com/<name_of_director_app>/web
docker push registry.heroku.com/<name_of_api_app>/web
docker push registry.heroku.com/<name_of_dashboard_app>/web

# Deploy the image
heroku container:release --app <name_of_director_app> web
heroku container:release --app <name_of_api_app> web
heroku container:release --app <name_of_dashboard_app> web

Setup MongoDB

Choose the MongoDB provider of your choice and obtain connection details. You will need to set the credentials for newly deployed services.

Heroku has a plenty of add-ons that allows attaching a MongoDB cluster. The recommended way is to attach a MongoDB add-on to director application and use the same credentials for API service.

Because the creation of this cluster is very straightforward and well-written in the docs, we'll not cover that here.

Setup Recordings Storage

Setup director Service

# Use stateful mode and keep test results in MongoDB
EXECUTION_DRIVER="../execution/mongo/driver"

# Dashboard app url
DASHBOARD_URL=<dashboard_app_url>

# MongoDB database name
MONGODB_DATABASE=<atlas_database_name>

# MongoDB connection string
MONGODB_URI=<atlas_database_access_credentials>

# If you've set up S3 bucket for keeping screenshots
# Screenshots driver path
SCREENSHOTS_DRIVER="../screenshots/s3.driver"
# If you've set up minio for keeping screenshots
#SCREENSHOTS_DRIVER="../screenshots/minio"

# S3 Bucket name
S3_BUCKET="bucket_name"

# AWS region, default value is "us-east-1"
S3_REGION="us-east-1"

# AWS / MIIO credentials with write access to AWS S3 bucket
AWS_ACCESS_KEY_ID="key_id"
AWS_SECRET_ACCESS_KEY="secret_access"

Setup API Service

# MongoDB database name
MONGODB_DATABASE=<atlas_database_name>

# MongoDB connection string
MONGODB_URI=<atlas_database_access_credentials>

# Enable or disable Apollo playgroun landing page
APOLLO_PLAYGROUND=<apollo_playground>

Setup Dashboard Service

# For communicating with API
GRAPHQL_SCHEMA_URL=<api_app_url>

All you'll need is the database name and the access credentials so you can fill the Heroku config variables as we'll see right after. So go ahead to the , get your database running and grab that data!

Please refer to instructions to configure Recordings Storage (failed tests screenshots and videos) and obtains credentials.

and try running some tests. You will see test results appear in the newly installed dashboard.

MongoDB Atlas docs
Reconfigure cypress agents
Heroku CLI
Docker
https://hub.docker.com/repository/docker/agoldis/sorry-cypress-director
https://hub.docker.com/repository/docker/agoldis/sorry-cypress-api
https://hub.docker.com/repository/docker/agoldis/sorry-cypress-dashboard
Atlas
Storage Configuration