cypress-realworld-app

A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.

Github星跟蹤圖

💬 Note from maintainers

This application is purely for demonstration and educational purposes. Its setup and configuration resemble typical real-world applications, but it's not a full-fledge production system. Use this app to learn, experiment, tinker, and practice application testing with Cypress.

Happy Testing


Features

🛠 Built with React, XState, Express, lowdb, Material-UI and TypeScript
⚡️ Zero database dependencies
🚀 Full-stack Express/React application with real-world features and tests
👮‍♂️ Local Authentication
🔥 Database Seeding with End-to-end Tests
💻 CI/CD + Cypress Dashboard

Getting Started

The Cypress Real-World App (RWA) is a full-stack Express/React application backed by a local JSON database (lowdb).

The app is bundled with example data (data/database.json) that contains everything you need to start using the app and run tests out-of-the-box.

🚩 Note

You can login to the app with any of the example app users. The default password for all users is s3cret.
Example users can be seen by running yarn list:dev:users.

Prerequisites

The only requirement for this project is to have Node.js version 12 installed on your machine. Refer to the .node-version file for the exact version.

TypeScript will be added as a local dependency to the project, so no need to install it.

Installation

yarn install

Run the app

yarn dev

Start Cypress

yarn cypress:open

Tests, Type, Location, ----, ----------------------------------------, api, cypress/tests/api, ui, cypress/tests/ui, unit, src/__tests__, ## Database

Additional NPM Scripts, Script, Description, --------------, -------------------------------------------------------------------, dev, Starts backend in watch mode and frontend, start, Starts backend and frontend, types, Validates types, db:seed, Generates fresh database seeds for json files in /data, start:empty, Starts backend, frontend and Cypress with empty database seed, tsnode, Customized ts-node command to get around react-scripts restrictions, list:dev:users, Provides id and username for users in the dev database, For a complete list of scripts see package.json

Code Coverage Report

The Cypress Real-World App uses the @cypress/code-coverage plugin to generate code coverage reports for the app frontend and backend.

To generate a code coverage report:

  1. Run yarn cypress:run --env coverage=true and wait for the test run to complete.
  2. Once the test run is complete, you can view the report at coverage/index.html.

License

license

This project is licensed under the terms of the MIT license.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

主要指標

概覽
名稱與所有者cypress-io/cypress-realworld-app
主編程語言TypeScript
編程語言TypeScript (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2020-01-06 18:39:43
推送於2025-06-01 05:33:14
最后一次提交
發布數19
最新版本名稱v1.0.18 (發布於 )
第一版名稱v1.0.0 (發布於 2020-06-19 12:17:59)
用户参与
星數5.7k
關注者數83
派生數2.4k
提交數1.3k
已啟用問題?
問題數178
打開的問題數13
拉請求數1024
打開的拉請求數26
關閉的拉請求數364
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?