https://github.com/brunobzs/cypress-test-automation
Test automation project developed with Cypress and TypeScript
https://github.com/brunobzs/cypress-test-automation
ci-cd cypress cypress-io page-object-model test-automation testing-framework typescript
Last synced: 3 months ago
JSON representation
Test automation project developed with Cypress and TypeScript
- Host: GitHub
- URL: https://github.com/brunobzs/cypress-test-automation
- Owner: brunobzs
- Created: 2024-12-18T01:36:11.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-01-28T01:38:49.000Z (3 months ago)
- Last Synced: 2025-01-28T02:34:37.932Z (3 months ago)
- Topics: ci-cd, cypress, cypress-io, page-object-model, test-automation, testing-framework, typescript
- Language: TypeScript
- Homepage: https://cloud.cypress.io/projects/8zypge
- Size: 2.67 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Test Automation with Cypress and TypeScript
This repository contains a test automation project developed with **Cypress** and **TypeScript**. The goal of this project is to validate the functionalities of an [e-commerce](https://magento.softwaretestingboard.com/), ensuring that the main user journeys work as expected.
## ๐ ๏ธ About the Project
This project was created to perform automated tests on an e-commerce, including:
- Authentication (Login and Registration)
- Product Search
- Shopping Cart## ๐ Technologies Used
- [Cypress](https://www.cypress.io/) - Framework for end-to-end testing.
- [TypeScript](https://www.typescriptlang.org/) - JavaScript superset for static typing.## ๐ฆ Installation and Configuration
Follow the steps below to install and configure the project:
1. **Installation of `devDependencies`**:
Make sure [Node.js](https://nodejs.org/) is installed.
To install the `devDependencies`, run:
```bash
npm install```
2. **Running the Tests**:
- To open the Cypress App, run:
```bash
npm run cy:open```
- To run the tests in headless model run:
```bash
npm test```
## ๐ Project Structure
```
โโโ cypress
โ โโโ e2e # Test files
โ โโโ support # Cypress support files
โโโ cypress.config.ts # Cypress configuration
โโโ package.json # Project dependencies, npm scripts, etc.
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # Project documentation
```## Available Tese Cases
The below test cases are currently implemented.
```sh
cypress/e2e/auth.cy.ts (3 tests)
โโ Authentication
โโ successfully logs in
โโ shows an error message when trying to login with invalid credentials
โโ successfully registers a new usercypress/e2e/search.cy.ts (2 tests)
โโ Search
โโ searches for an existing product
โโ searches for an non-existing productcypress/e2e/shoppingCart.cy.ts (1 test)
โโ Shopping Cart
โโ successfully adds a product to the cart```
## ๐งช How to Add New Tests
1. Create a new file in the `cypress/e2e` folder with the name of the functionality that will be tested (e.g., `productDetails.cy.ts`).
2. Use the best practices of Cypress and TypeScript to implement the test.
3. Run the tests to validate that they're working as expected.## ๐ค Contribution
Feel free to contribute to this project! To do so:
1. Fork the repository
2. Create a new branch:```bash
git checkout -b branch-name-here```
3. Commit your changes and push them to your fork
4. Open a Pull Request explaining your changes
---
If you have any questions or suggestions, feel free to contact me.