https://github.com/wlsf82/cypg
Sample project to demonstrate how to integrate Cypress with a PostgreSQL database.
https://github.com/wlsf82/cypg
cypress cypress-testing database db docker e2e-testing express-js git nodejs npm pg postgres postgres-db postgresql postgresql-database react talking-about-testing testing vite web-testing
Last synced: about 2 months ago
JSON representation
Sample project to demonstrate how to integrate Cypress with a PostgreSQL database.
- Host: GitHub
- URL: https://github.com/wlsf82/cypg
- Owner: wlsf82
- License: mit
- Created: 2025-01-31T23:45:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-12T23:14:09.000Z (over 1 year ago)
- Last Synced: 2025-02-13T00:23:14.647Z (over 1 year ago)
- Topics: cypress, cypress-testing, database, db, docker, e2e-testing, express-js, git, nodejs, npm, pg, postgres, postgres-db, postgresql, postgresql-database, react, talking-about-testing, testing, vite, web-testing
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cypg
Sample project to demonstrate how to integrate Cypress with a PostgreSQL database.
## Pre-requirements
You will need to have [Docker](https://www.docker.com/products/docker-desktop/), [git](https://git-scm.com/), [Node.js](https://nodejs.org/) and npm installed on your computer.
For this project, the following versions of git, Node.js, and npm were used:
```sh
$ git --version
# git version 2.42.1
$ node --version
# v22.13.1
$ npm --version
# 10.9.2
```
## Starting and running the app
- To start the database, [read the db docs](./db/README.MD).
- To install and start the backend, [read the backend docs](./backend/README.md).
- To install and start the frontend, [read the frontend docs](./frontend/README.md).
## Cypress tests
1. In the operating system where the app is running, define an environment variable called `DATABASE_URL` with the following value `postgresql://dbuser@localhost:5432/demo`.
2. Run `npm i` to install the dev dependencies.
3. Then, run `npm run cy:open` to open the Cypress App and run the tests in interactive mode, or, run `npm test` to run the tests in headless mode.
## License
This project is licensed under the MIT License.
___
Developed with 💚 by [Walmyr](https://walmyr.dev).