An open API service indexing awesome lists of open source software.

https://github.com/dutraa45/qa-mastery

User management project focused on QA with Cypress, Node.js/Express (Jest), MongoDB (Docker), and GitHub Actions for testing and code quality.
https://github.com/dutraa45/qa-mastery

cicd eslint nodejs qa reactjs security

Last synced: about 1 month ago
JSON representation

User management project focused on QA with Cypress, Node.js/Express (Jest), MongoDB (Docker), and GitHub Actions for testing and code quality.

Awesome Lists containing this project

README

          

# 💻 QA Mastery

![Preview do Projeto](./.github/images/Thumbnail.png)

## Description
User management project focused on QA with Cypress, Node.js/Express (Jest), MongoDB (Docker), and GitHub Actions for testing and code quality.

---

## Technologies Used
### Front-end
- React
- React Admin
- Cypress (for testing)

### Back-end
- Node.js
- Express
- Jest (unit and integration tests)

### Database
- MongoDB (Docker)

### QA and CI/CD
- Cypress
- Jest
- ESLint
- GitHub Actions

---

## Features
- **User management (CRUD):** Create, view, update, and delete users.
- **Comprehensive QA focus:**
- Front-end automated tests with Cypress.
- Back-end unit, integration, and system tests with Jest.
- Security and code quality analysis.
- Continuous integration with GitHub Actions.

---

## How to Run the Project

### Prerequisites
Ensure you have the following installed:
- Node.js (>= 16.x)
- MongoDB

### Steps

1. Clone the repository:
~~~bash
git clone https://github.com/DutraA45/qa-mastery.git
cd qa-mastery
~~~

2. Install and configure MongoDB locally.
- Create a database (for example: users_db).
- Copy your MongoDB URI (e.g., mongodb://127.0.0.1:27017/users_db).

3. Update the following files inside user-api (backend):
- app.js
- app.spec.js
- cleardatabase.js
- user-repository.spec.js

> Replace the current URI with your local MongoDB URI and **uncomment** the local usage line.

Example:
~~~javascript
beforeAll(async () => {
const uri = 'mongodb://127.0.0.1:27017/users_db'; // Local usage
// const uri = 'mongodb://root:root@localhost:27017'; // Docker Workflow (CI/CD)
client = new MongoClient(uri);
await client.connect();
collection = client.db('users_db').collection('users');
userRepository = new UserRepository(collection);
});
~~~

1. Install dependencies:
~~~bash
cd user-api
npm install
~~~

~~~bash
cd ../user-admin
npm install
~~~

2. Run the application:
- backend and front-end
~~~bash
run start
~~~

1. Access the application in your browser:
- Front-end: http://localhost:3000
- API: http://localhost:4000

---

## Testing
### Front-end Testing (Cypress)
Run automated front-end tests:
~~~bash
npm run cypress
~~~

### Back-end Testing (Jest)
Run unit and integration tests:
~~~bash
npm test
~~~

---

## CI/CD and Code Quality
This repository uses GitHub Actions for:
- Automated test pipelines.
- Security and code quality analysis with ESLint and other tools.

---

## Contributing
Feel free to open issues and submit pull requests. Contributions are always welcome!

---

## License
This project is licensed under the MIT License.