专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

agoldis/sorry-cypress-api Docker 镜像 - 轩辕镜像

sorry-cypress-api
agoldis/sorry-cypress-api
[***]
5 收藏0 次下载
📦 一套镜像服务,解决研发 / 测试 / 生产三套环境
镜像简介版本下载
📦 一套镜像服务,解决研发 / 测试 / 生产三套环境
:octocat: An open-source, on-premise, self-hosted alternative to Cypress dashboard :evergreen_tree:

!Update Dockerhub Images

Table of contents

  • Features
  • Setup
  • Demo & example
    • Cloud-based demo
    • Run the demo locally (2 minutes)
  • On-premise installation instructions
    • Docker images
    • 🔥new! Heroku
    • 🔥new! Amazon AWS
  • Documentation
    • Reconfiguring Cypress
    • Project structure
    • director service
    • api service
    • dashboard service
  • Development
  • Behind the scenes
  • FAQ
  • Additional Resources
  • License

Features

  • run cypress tests in parallel without dashboard
  • upload failure screenshots and videos to S3 bucket
  • browse test results, failures, screenshots and video recordings
  • run in light mode w/o persistency or with MongoDB storage attached
  • on-premise self-hosted cypress dashboard - use your own infrastructure, own your data, no limitations

Setup

  1. Point Cypress to your service - set [***] as api_url of <cypress-root>/packages/server/config/app.yml
  2. Run multiple instances of cypress run --parallel --record --key xxx --ci-build-id <buildId>
  3. See the the tests running in parallel 🚀

!Running Cypress test in parallel demo

!Web dashboard prototype

Demo & Example

Cloud-based demo

Visit [***] and see the alpha version of the web dashboard in action.

This demo is a free heroku instance, it takes a minute to spin it up when you first navigate.

You can reconfigure Cypress to use api_url: "[***]", run your tests and see the results appear in the dashboard.

Also *** the example with detailed example of parallelization.

Run the demo locally
  1. Run docker-compose -f docker-compose.full.yml up
  2. Open the browser at http://localhost:8080/ to see the dashboard

This will start all 3 services on your local machine,

Reconfigure Cypress to use api_url: "http://localhost:1234/",

Run your tests cypress run --parallel --record --key xxx --ci-build-id <buildId> and you will see the results appear in the dashboard. Those cypress tests will in parallel without connecting the official dashboard

You will need to setup S3 to be able to upload failed test screenshots. Replace the credentials in docker-compose.full.yml after you've set up S3 bucket.

On-premise installation instructions

Docker images

Each package has a Dockerfile - use it to build your own images.

Pre-built Docker images are available at [***]

Docker image tag corresponds to the git tag, while latest points to the master git branch.

Refer to docker-compose.full.yml for example.

Heroku

Moved to Wiki - Heroku Tutorial

Amazon AWS

🎉 It takes just 5 minutes to deploy sorry-cypress on AWS using AWS CloudFormation template, you're getting a "full" version of the service with:

  • Parallelization
  • GraphQL API
  • Web Dashboard
  • S3 bucket preconfigured for storing screenshots and video recordings
  • MongoDB as a persistance layer
  • Secure network configuration via AWS VPC
  • Pre-configured log groups via AWS Cloudwatch
  • Convenient access via AWS Load ***

Read more in Wiki - AWS Tutorial or just hit the button 👇🏻

![Launch Stack]([***]

Documentation

Reconfiguring Cypress

Find cypress installation path

bash
$ DEBUG=cypress:* cypress version

...
# here it is
cypress:cli Reading binary package.json from: /Users/agoldis/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/package.json +0ms
...

In my case it is: /Users/agoldis/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/

Change the default dashboard URL

bash
$ cat /Users/agoldis/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/config/app.yml

...
# Replace this with a URL of the alternative dashboard
production:
  # api_url: "[***]"
  api_url: "http://localhost:1234/"
...
Project structure

The repository consists of 3 packages - you can deploy them on your own infrastructure:

  • packages/director - is a service that's responsibe for parallelization and saving test results
  • packages/api - is a GraphQL server that allows to read test run details and results
  • packages/dashboard - is a web dashboard (ReactJS)
director service

The director service is responsible for:

  • paralellization and coordination of test runs
  • saving tests results
  • saving failed tests screenshots

When you launch Cypress on a CI environment with multiple machines, each machine first contacts the dashboard to get the next test to run.

The dashboard coordinates the requests from differents machines and assigns tests to each.

That is what director service does 👆

Starting the service
sh
cd packages/director

npm install
npm run build
npm run start

# ...

Initializing "in-memory" execution driver...
Initializing "dummy" screenshots driver...
Listening on 1234...

By default, the service will start on port 1234 with in-memory execution driver and dummy snapshots driver.

That is what running on [***] - it is a stateless execution, that just parallelizes tests, but does not persist test results and does not uploads screenshots of failed tests.

Configuration

The service uses dotenv package - to change the default configuration, create .env file in service's root to set the default environment variables:

sh
$ pwd
/Users/agoldis/sorry-cypress/packages/director

$ cat .env

PORT=1234

# DASHBOARD_URL is what Cypress client shows as a "Run URL"
DASHBOARD_URL="[***]"

# Read more about execution drivers below
EXECUTION_DRIVER="../execution/in-memory"

# Read more about screenshot drivers below
SCREENSHOTS_DRIVER="../screenshots/dummy.driver"

# Read more about record keys whitelist below
ALLOWED_KEYS="my_secret_key,my_another_secret_key"
Drivers

The director uses "drivers" that define different aspects of its functionality.

Execution driver

...is what drives the execution flow.

There're 2 "execution drivers" implemented:

Stateless

Keeps the state of runs in-memory. That means that restarting the service wipes everything.

That's the simplest and most naive implementation.

If you just want to run the tests in parallel and not worry about storing test results.

MongoDB persisted

The state - test runs and results - are persisted in MongoDB, thus, can be queried and displayed in a dashboard.

To enable this driver, set the envrionment variables:

EXECUTION_DRIVER="../execution/mongo/driver"
MONGODB_URI="monodgb://your-DB-URI"
MONGODB_DATABASE="your-DB-name"

With MongoDB driver you can use the other services - api and dashboard to see the results of your runs.

Snapshots driver

...is what allows you to save the snapshots and videos tests.

It provides the client (Cypress runner) a URL for uploading the assets (videos and screenshots).

Dummy

Is the default driver and it does nothing - snapshots won't be saved.

Set the environment variable to define the screenshots driver.

SCREENSHOTS_DRIVER="../screenshots/dummy.driver"

S3 Driver

The driver generates upload URLs for S3 bucket. Set the environment variables accordingly:

SCREENSHOTS_DRIVER="../screenshots/s3.driver"
S3_BUCKET="your_bucket_name"
S3_REGION="us-east-1"

Please make sure that AWS credentials with proper access to invoke s3.getSignedUrl are available in the environment.

See the wiki page to help setup S3 for uploading screenshots.

Record keys whitelist

Setting ALLOWED_KEYS variable allows you to define list of comma delimited record keys (provided to the Cypress Runner using --key option) which are accepted by the director service. This can be useful when Cypress is running on external CI servers and we need to expose director to the internet.

Empty or not provided variable means that all record keys are allowed.

ALLOWED_KEYS="my_secret_key"
api service

...is a simple GraphQL service, that allows to query the data persisted by MongoDB.

Set environment variables that define MongoDB connection details:

MONGODB_URI='mongodb://mongo:27017'
MONGODB_DATABASE='sorry-cypress'
dashboard service

...is a web dashboard implemented in ReactJS. It is in alpha stage and still very naive - you can explore test details, failures and see screenshots.

In production mode you will need to provide environment variable GRAPHQL_SCHEMA_URL - graphql client will use the URL to download the schema.

Sett environment variable that defines the URL for getting the schema:

GRAPHQL_SCHEMA_URL=[***]

You can explore currently available features at [***]

Development

The project uses yarn workspaces, bootstrap everything by running yarn in the root directory.

Run each package in development mode: yarn dev.

It is recommended to use docker-compose to run the backend services (director and api) and to run the dashboard on host machine.

Using docker-compose for backend services

The project uses docker-compose to conviniently run backend services in dockerized containers.

Run docker-compose build from the project's root directory Run docker-compose up to start the services.

The latter command will create 3 services:

  • MongoDB instance on port 27017
  • director service on port 1234
  • api service on 4000

You can change the configuration using the environment variables defined in docker-compose.yml file.

Behind the scenes

  1. Each machine sends the same initial request with:
  • specs lists
  • machine hardware details
  • git commit details
  • --ci-build-id and other CLI parameters
  1. The director creates or fetches an existing run, based on the parameters and responds with a randomly generated machineId and the allocated runId

  2. Each cypress client requests a next available task for the runId which was returned previously

  3. The service looks at the list of specs and returns next available test

Original Cypress dashboard implements different "smart" strategies for picking the next test

  1. When there're no more available tests for a run, the service sends an "empty" response - client reports that it is finished

FAQ

Why?

I was upset because:

  • dashboard crashes and blocks my tests
  • parallelization stops working after paid plan has reached its limit
Is it legal?

Yes, Cypress is an open source software.

Is it production-ready?

Yes.

Additional Resources

  • Wiki
  • The official guide on Cypress parallelization
  • Running Multiple Cypress Agents on AWS by mlsad3

License

MIT

查看更多 sorry-cypress-api 相关镜像 →
bitnami/cypress logo
bitnami/cypress
Bitnami Cypress安全镜像,现作为商业订阅的OCI制品提供,支持Debian和Photon基础操作系统,提供加固安全特性及合规支持。
10K+ pulls
上次更新:未知
cypress/browsers logo
cypress/browsers
包含所有操作系统依赖项和部分预安装浏览器的Docker镜像。
78100M+ pulls
上次更新:未知
agoldis/sorry-cypress-director logo
agoldis/sorry-cypress-director
https://github.com/sorry-cypress/sorry-cypress
75M+ pulls
上次更新:未知
cypress/included logo
cypress/included
包含所有系统依赖、Cypress以及部分预装浏览器(适用于非ARM镜像)的Docker镜像,简化Cypress测试环境配置。
100100M+ pulls
上次更新:未知
cypress/base logo
cypress/base
包含运行Cypress所需的所有操作系统依赖的Docker镜像。
76100M+ pulls
上次更新:未知
agoldis/sorry-cypress-dashboard logo
agoldis/sorry-cypress-dashboard
https://github.com/sorry-cypress/sorry-cypress
61M+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
agoldis/sorry-cypress-api
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.