Skip to content

Commit 7ae73b2

Browse files
author
“Rajat
committed
#18: 📝 README.md file added
1 parent bea53ae commit 7ae73b2

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

README.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<!--
2+
#/**
3+
# * @author Rajat Verma
4+
# * Email: rajatvermaa95@gmail.com
5+
# * GitHub Profile: https://github.com/rajatt95
6+
# * GitHub Page: https://rajatt95.github.io/
7+
# * LinkedIn: https://www.linkedin.com/in/rajatt95/
8+
# * Topmate: https://topmate.io/rajatt95
9+
# * Telegram: https://t.me/rajatt95
10+
# * Instagram: https://www.instagram.com/rajattvermaa95/
11+
# * YouTube: https://www.youtube.com/@rajatt95
12+
# * WhatsApp Community: https://chat.whatsapp.com/DVRP0ViD0YwELUKF2XMJHy
13+
# * WhatsApp Channel: https://whatsapp.com/channel/0029Va9XXMhJ93waOU5Xer3r
14+
# */
15+
#/***************************************************/
16+
-->
17+
---
18+
# 💻 Test Automation Framework | API
19+
20+
[![Playwright](https://img.shields.io/badge/Playwright-34495E?style=for-the-badge&logo=playwright&logoColor=white)](https://playwright.dev/)
21+
[![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
22+
23+
24+
[![VS Code](https://img.shields.io/badge/VS_Code-007ACC?style=for-the-badge&logo=visual-studio-code&logoColor=white)](https://code.visualstudio.com/)
25+
[![Playwright HTML Reporter](https://img.shields.io/badge/Playwright%20HTML%20Reporter-<COLOR>?style=for-the-badge&logo=playwright&logoColor=white)](https://www.npmjs.com/package/playwright-html-reporter)
26+
[![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-2088FF?style=for-the-badge&logo=github-actions&logoColor=white)](https://github.com/features/actions)
27+
28+
## 📑 Table of Contents
29+
<!-- # - [Video Tutorial](#video-tutorial) -->
30+
- [Introduction](#introduction)
31+
- [Prerequisites](#prerequisites)
32+
- [Getting Started](#getting-started)
33+
- [Running Tests](#running-tests)
34+
- [Project Structure](#project-structure)
35+
- [Configuration](#configuration)
36+
- [Continuous Integration](#continuous-integration)
37+
- [Reporting](#reporting)
38+
- [Other Projects](#other-projects)
39+
- [Technical Documents](#technical-documents)
40+
- [Contacts](#contacts)
41+
42+
## 📖 Introduction
43+
This repository contains a Test Automation Framework built using Playwright and Typescript for automated testing of REST APIs.
44+
45+
<!-- ## 🎥 Video Tutorial
46+
47+
<a href="https://www.youtube.com/watch?v=g0nG6aPbpl4&list=PLrBBHmoBFxBUu9G7haETpa0B03H9GnfKX"> <img src="https://img.youtube.com/vi/g0nG6aPbpl4/0.jpg" alt="Test Automation Framework | WEB | Cypress + JS" width="200"> </a>
48+
49+
Click on the image above to watch the tutorials. -->
50+
51+
## 🛠️ Prerequisites
52+
53+
- [![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/) (v18.16.1 or higher recommended)
54+
- [![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/) (v9.5.1 or higher recommended)
55+
56+
## ▶️ Getting Started
57+
58+
1. Clone the repository:
59+
60+
```bash
61+
git clone https://github.com/rajatt95/TestAutomationFramework_YT_Rajat_API_Playwright_TS.git
62+
```
63+
64+
2. Navigate to the project directory:
65+
66+
```bash
67+
cd TestAutomationFramework_YT_Rajat_API_Playwright_TS
68+
```
69+
70+
3. Install dependencies:
71+
72+
```bash
73+
npm install
74+
```
75+
76+
## 🚀 Running Tests
77+
78+
```bash
79+
npm run playwright:tests
80+
```
81+
82+
## 📁 Project Structure
83+
84+
The tests follow a modular and maintainable structure:
85+
86+
```
87+
|-- .github
88+
| |-- workflows
89+
| |-- 01_api_tests.yml
90+
| |-- 02_api_tests_select_env.yml
91+
|-- test-data
92+
| |-- login
93+
| |-- login-successful.json
94+
| |-- login-unsuccessful.json
95+
| |-- register
96+
| |-- register-successful.json
97+
| |-- register-unsuccessful.json
98+
| |-- users
99+
| |-- user_create.json
100+
| |-- user_update_patch.json
101+
| |-- user_update.json
102+
|-- tests-reqres
103+
| |-- login.spec.ts
104+
| |-- register.spec.ts
105+
| |-- users.spec.ts
106+
|-- utils
107+
| |-- EndpointUtils.ts
108+
| |-- RequestBodyUtils.ts
109+
| |-- RequestUtils.ts
110+
| |-- ResponseUtils.ts
111+
| |-- TokenUtils.ts
112+
| |-- VerificationUtils.ts
113+
|-- .gitignore
114+
|-- package.json
115+
|-- playwright.config.ts
116+
```
117+
118+
- `playwright-report`: Contains the HTML report for tests (Logs are attached).
119+
- `test-data`: Contains external files (example: user create/update data) that can be used to mock data during tests.
120+
- `tests-reqres`: Contains the actual test files. You can organize your tests into subdirectories as needed.
121+
- `utils`: Contains the Utilities that provides methods for asserting different conditions on web elements, handling requests and responses.
122+
123+
## ⚙️ Configuration
124+
125+
- Modify `playwright.config.ts` for playwright configuration settings such as
126+
- `baseURL`
127+
- `testDir`
128+
- `reporter`
129+
130+
## 🔄 Continuous Integration
131+
132+
This project is configured for CI using Github Actions. Check the configurations in `.github/workflows/*.yml`.
133+
134+
- `01_api_tests.yml`: This workflow executes tests in pre-defined environment PROD.
135+
- `02_api_tests_select_env.yml`: This workflow will first ask User to select the environment (DEV / Pre-PROD / PROD) for tests execution.
136+
137+
## 📊 Reporting
138+
139+
Playwright HTML report (Logs are attached) is stored in the `playwright-report` directory.
140+
141+
## 🔭 Other Projects
142+
143+
- [![Java](https://img.shields.io/badge/Java-007396?style=for-the-badge&logo=java&logoColor=white)](https://github.com/stars/rajatt95/lists/programming-language-java) -
144+
[![Selenium](https://img.shields.io/badge/Selenium-43B02A?style=for-the-badge&logo=selenium&logoColor=white)](https://github.com/stars/rajatt95/lists/selenium-automation-frameworks)
145+
[![Appium](https://img.shields.io/badge/Appium-40C4FF?style=for-the-badge&logo=appium&logoColor=white)](https://github.com/stars/rajatt95/lists/appium-automation-frameworks)
146+
[![Rest Assured](https://img.shields.io/badge/Rest%20Assured-5B47A5?style=for-the-badge&logo=rest-assured&logoColor=white)](https://github.com/stars/rajatt95/lists/restassured-automation-framework)
147+
148+
- [![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://github.com/stars/rajatt95/lists/programming-language-javascript) -
149+
[![Cypress](https://img.shields.io/badge/Cypress-17202C?style=for-the-badge&logo=cypress&logoColor=white)](https://github.com/stars/rajatt95/lists/cypress-automation-frameworks)
150+
[![Playwright](https://img.shields.io/badge/Playwright-34495E?style=for-the-badge&logo=playwright&logoColor=white)](https://github.com/stars/rajatt95/lists/playwright-automation-frameworks)
151+
152+
- [![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://github.com/stars/rajatt95/lists/programming-language-python) -
153+
[![Requests](https://img.shields.io/badge/Requests-2CA5E0?style=for-the-badge&logo=python&logoColor=white)](https://github.com/stars/rajatt95/lists/requests-automation-framework)
154+
155+
## 📄 Technical Documents
156+
157+
- [![Google Drive](https://img.shields.io/badge/Google%20Drive-4285F4?style=for-the-badge&logo=google-drive&logoColor=white)](https://drive.google.com/drive/folders/1tne9pZjgWvfrS0l9tVHs6k1jnQHpTLoA?usp=sharing)
158+
- [![GitHub Repository](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/rajatt95/Documents)
159+
160+
## 📧 Contacts
161+
162+
- [![Email](https://img.shields.io/badge/Email-rajatvermaa95%40gmail.com-green)](mailto:rajatvermaa95@gmail.com)
163+
- [![GitHub Profile](https://img.shields.io/badge/GitHub-Profile-blue)](https://github.com/rajatt95)
164+
- [![GitHub Page](https://img.shields.io/badge/GitHub-Page-lightgrey)](https://rajatt95.github.io/)
165+
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-Profile-blue)](https://www.linkedin.com/in/rajatt95)
166+
- [![Topmate](https://img.shields.io/badge/Topmate-Profile-red)](https://topmate.io/rajatt95)
167+
- [![Telegram](https://img.shields.io/badge/Telegram-Channel-blue)](https://t.me/rajatt95)
168+
- [![Instagram](https://img.shields.io/badge/Instagram-Profile-orange)](https://www.instagram.com/rajattvermaa95/)
169+
- [![YouTube](https://img.shields.io/badge/YouTube-Channel-red)](https://www.youtube.com/@rajatt95)
170+
- [![WhatsApp Community](https://img.shields.io/badge/WhatsApp-Community-brightgreen)](https://chat.whatsapp.com/LP20xMGvxnEL88GoB58bo1)
171+
- [![WhatsApp Channel](https://img.shields.io/badge/WhatsApp-Channel-brightgreen)](https://whatsapp.com/channel/0029Va9XXMhJ93waOU5Xer3r)
172+
173+
Feel free to reach out if you have any questions, or suggestions, or just want to chat!
174+
175+
Thanks for visiting my GitHub profile! 😊
176+
177+
<p align="left"> <img src="https://komarev.com/ghpvc/?username=rajatt95&label=Profile%20views&color=0e75b6&style=flat" alt="rajatt95" /> </p>

0 commit comments

Comments
 (0)