Skip to content

Commit 9a00b88

Browse files
committed
docs: add E2E test flows to README and update API testing docs
1 parent 4079020 commit 9a00b88

36 files changed

Lines changed: 618 additions & 110 deletions

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ dist/
3434
# IDE
3535
.idea/
3636

37-
# K11 Tech custom
38-
artifacts/
39-
4037
# Ignore Excel/DB test data
4138
*.xlsx
4239
*.csv

README.md

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ A robust, real-world Playwright automation framework for **K11 Software Solution
3030

3131
## 🧪 Automated Test Scenarios
3232

33-
The framework covers critical user journeys, advanced flows, component-level tests, and visual regression for K11 Software Solutions, including:
33+
34+
The framework covers critical user journeys, advanced flows, component-level tests, E2E test flows, and visual regression for K11 Software Solutions, including:
3435

3536
- Home page UI and navigation
3637
- Forms Lab: form filling, validation, and submission
@@ -41,11 +42,64 @@ The framework covers critical user journeys, advanced flows, component-level tes
4142
- Advanced hooks, fixtures, and reporting integration
4243
- Screenshot and video capture for every test and card
4344
- Documentation and comparison articles for Playwright CT, JS, TS, and Python
45+
- E2E test flows (UI + API)
4446

4547
Each scenario validates real user interactions, UI consistency, business logic, and visual correctness, making the suite suitable for smoke, regression, CI pipelines, and component-level quality assurance.
4648

4749
---
4850

51+
## 🔗 API Testing
52+
53+
The framework supports API testing using Playwright's built-in APIRequestContext. You can:
54+
- Validate REST endpoints (GET, POST, PUT, DELETE, etc.)
55+
- Chain API and UI flows
56+
- Save API responses as JSON artifacts for traceability
57+
58+
**API test files are located in:**
59+
```
60+
tests/api/
61+
```
62+
**API response artifacts are saved in:**
63+
```
64+
apiresponse/
65+
```
66+
67+
### Example: JSONPlaceholder API Test
68+
```js
69+
const { test, expect } = require('@playwright/test');
70+
const { saveApiResponse } = require('../../utils/saveApiResponse');
71+
72+
const API_URL = 'https://jsonplaceholder.typicode.com';
73+
74+
test('should GET a post', async ({ request }) => {
75+
const response = await request.get(`${API_URL}/posts/1`);
76+
expect(response.status()).toBe(200);
77+
const body = await response.json();
78+
saveApiResponse('jsonplaceholder_get_post', body);
79+
expect(body).toHaveProperty('id', 1);
80+
});
81+
82+
test('should POST a new post', async ({ request }) => {
83+
const payload = { title: 'foo', body: 'bar', userId: 1 };
84+
const response = await request.post(`${API_URL}/posts`, {
85+
data: payload,
86+
headers: { 'Accept': 'application/json' }
87+
});
88+
expect(response.status()).toBe(201);
89+
const body = await response.json();
90+
saveApiResponse('jsonplaceholder_post_post', body);
91+
expect(body).toHaveProperty('id');
92+
});
93+
```
94+
95+
API tests can be run with:
96+
```bash
97+
npx playwright test tests/api/JSONPlaceholderAPITests.spec.js
98+
```
99+
100+
---
101+
## 🧪 Automated Test Scenarios
102+
49103

50104
## 🧩 Tech Stack
51105

@@ -199,3 +253,38 @@ K11 Tech QA Team
199253
---
200254

201255
For questions, contributions, or support, please contact the K11 Tech QA team.
256+
257+
258+
## License
259+
260+
MIT
261+
262+
263+
## Author
264+
265+
**Kavita Jadhav**
266+
267+
Accomplished Full Stack Developer and Test Automation Engineer specializing in modern web application development, robust full stack solutions, and scalable automation frameworks. Expert in Playwright, advanced quality engineering, and driving best practices for high-impact, reliable software delivery.
268+
269+
LinkedIn: [https://www.linkedin.com/in/kavita-jadhav-tech/](https://www.linkedin.com/in/kavita-jadhav-tech/)
270+
271+
272+
## About k11 Software Solutions
273+
274+
**k11 Software Solutions** is a leading provider of modern, AI-powered test automation, DevOps, and quality engineering services. We help organizations accelerate digital transformation with robust, scalable, and intelligent automation solutions tailored for SaaS, web, and enterprise platforms.
275+
276+
- Website: [https://k11softwaresolutions.com](https://k11softwaresolutions.com)
277+
- Contact: k11softwaresolutions@gmail.com
278+
279+
*Partner with us to future-proof your QA and automation strategy!*
280+
281+
## Follow Me
282+
<p align="center">
283+
<a href="https://github.com/K11-Software-Solutions/" target="_blank">
284+
<img src="https://img.shields.io/badge/K11%20Tech%20Lab-FFFFFF?style=for-the-badge&logo=github&logoColor=black" alt="K11 Tech Lab"/>
285+
</a>
286+
<a href="https://k11softwaresolutions.com" target="_blank">
287+
<img src="https://img.shields.io/badge/k11softwaresolutions-00B386?style=for-the-badge&logo=google-chrome&logoColor=white" alt="k11softwaresolutions"/>
288+
</a>
289+
</p>
290+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"slip": {
3+
"id": 181,
4+
"advice": "Rule number 1: Try not to die. Rule number 2: Don't be a dick."
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"slip": {
3+
"id": 213,
4+
"advice": "Quality beats quantity."
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"slip": {
3+
"id": 202,
4+
"advice": "Never waste an opportunity to tell someone you love them."
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"slip": {
3+
"id": 139,
4+
"advice": "If you're going bald, don't comb your hair over your bald patch."
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"slip": {
3+
"id": 108,
4+
"advice": "Don't ever name files or folders using the word \"Final\"."
5+
}
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)