agoldis/sorry-cypress-dashboard!Update Dockerhub Images
director serviceapi servicedashboard service[***] as api_url of <cypress-root>/packages/server/config/app.ymlcypress run --parallel --record --key xxx --ci-build-id <buildId>!Running Cypress test in parallel demo
!Web dashboard prototype
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.
docker-compose -f docker-compose.full.yml upThis 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.ymlafter you've set up S3 bucket.
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.
Moved to Wiki - Heroku Tutorial
🎉 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:
Read more in Wiki - AWS Tutorial or just hit the button 👇🏻
director serviceThe director service is responsible for:
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 👆
shcd 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.
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"
The director uses "drivers" that define different aspects of its functionality.
...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.
...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.
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 [***]
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.
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:
27017director service on port 1234api service on 4000You can change the configuration using the environment variables defined in docker-compose.yml file.
--ci-build-id and other CLI parametersThe director creates or fetches an existing run, based on the parameters and responds with a randomly generated machineId and the allocated runId
Each cypress client requests a next available task for the runId which was returned previously
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
I was upset because:
Yes, Cypress is an open source software.
Yes.
MIT
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
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 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务