Skip to content

Commit 7f69925

Browse files
author
arturdmt-alt
committed
docs: add CI/CD badge, remove Future Enhancements, Key Learnings, and Notes sections
1 parent 08897cf commit 7f69925

1 file changed

Lines changed: 81 additions & 87 deletions

File tree

README.md

Lines changed: 81 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
# Advanced API Testing Framework
22

3-
Professional API testing framework using Python, Pytest, and JSONPlaceholder API. Demonstrates advanced testing concepts including layered validation, schema validation, and performance testing.
4-
53
[![API Tests](https://github.com/arturdmt-alt/QA_API_Advanced/actions/workflows/tests.yml/badge.svg)](https://github.com/arturdmt-alt/QA_API_Advanced/actions/workflows/tests.yml)
64

7-
## Project Overview
5+
Professional API testing framework using Python, Pytest, and JSONPlaceholder API. Demonstrates advanced testing concepts including layered validation, schema validation, and performance testing.
86

9-
This framework showcases industry-standard API testing practices with a focus on maintainability, scalability, and comprehensive test coverage. Built as part of a structured QA automation learning path.
7+
---
108

119
## Technology Stack
1210

13-
- Python 3.14
14-
- Pytest - Testing framework
15-
- Requests - HTTP client library
16-
- JSONSchema - Schema validation
17-
- Pytest-HTML - Test reporting
11+
* Python 3.11+
12+
* Pytest - Testing framework
13+
* Requests - HTTP client library
14+
* JSONSchema - Schema validation
15+
* Pytest-HTML - Test reporting
16+
17+
---
1818

1919
## Features
2020

21-
- Centralized API client with session management
22-
- Reusable validation utilities
23-
- JSON schema validation
24-
- Response time assertions
25-
- Layered validation approach (status → structure → content)
26-
- Comprehensive test data management
27-
- HTML test reporting
28-
- Clear separation of concerns (utils, tests, data)
21+
* Centralized API client with session management
22+
* Reusable validation utilities
23+
* JSON schema validation
24+
* Response time assertions
25+
* Layered validation approach (status → structure → content)
26+
* Comprehensive test data management
27+
* HTML test reporting
28+
* Clear separation of concerns (utils, tests, data)
29+
* CI/CD pipeline with GitHub Actions
30+
31+
---
2932

3033
## Test Coverage
3134

32-
### Users CRUD Operations
33-
- GET all users with pagination validation
34-
- GET single user by ID with schema validation
35-
- POST create new user
36-
- PUT update existing user
37-
- DELETE user
38-
- Negative test: 404 for non-existent user
35+
**Users CRUD Operations:**
36+
* GET all users with pagination validation
37+
* GET single user by ID with schema validation
38+
* POST create new user
39+
* PUT update existing user
40+
* DELETE user
41+
* Negative test: 404 for non-existent user
3942

40-
### Posts Operations
41-
- GET all posts
42-
- GET posts filtered by user ID
43-
- GET single post with schema validation
44-
- GET post comments (nested resources)
45-
- POST create new post
46-
- Negative test: 404 for invalid post ID
43+
**Posts Operations:**
44+
* GET all posts
45+
* GET posts filtered by user ID
46+
* GET single post with schema validation
47+
* GET post comments (nested resources)
48+
* POST create new post
49+
* Negative test: 404 for invalid post ID
4750

48-
**Total: 12 automated tests**
51+
**Total:** 12 automated tests
52+
53+
---
4954

5055
## Project Structure
5156
```
@@ -69,15 +74,16 @@ QA_API_Advanced/
6974
└── README.md
7075
```
7176

72-
## Setup Instructions
77+
---
7378

74-
### Prerequisites
79+
## Setup Instructions
7580

76-
- Python 3.11 or higher
77-
- pip (Python package manager)
78-
- Git
81+
**Prerequisites:**
82+
* Python 3.11 or higher
83+
* pip (Python package manager)
84+
* Git
7985

80-
### Installation
86+
**Installation:**
8187

8288
1. Clone the repository:
8389
```bash
@@ -97,28 +103,32 @@ source venv/bin/activate # macOS/Linux
97103
pip install -r requirements.txt
98104
```
99105

106+
---
107+
100108
## Running Tests
101109

102-
### Run all tests:
110+
Run all tests:
103111
```bash
104112
pytest tests/ -v
105113
```
106114

107-
### Run specific test file:
115+
Run specific test file:
108116
```bash
109117
pytest tests/test_users_crud.py -v
110118
```
111119

112-
### Generate HTML report:
120+
Generate HTML report:
113121
```bash
114122
pytest tests/ --html=reports/test_report.html --self-contained-html
115123
```
116124

117-
### Run with verbose output:
125+
Run with verbose output:
118126
```bash
119127
pytest tests/ -v -s
120128
```
121129

130+
---
131+
122132
## Test Results
123133

124134
![Test Report Summary](screenshots/test_report_summary.png)
@@ -127,6 +137,8 @@ pytest tests/ -v -s
127137

128138
All tests passing with response times under 3 seconds.
129139

140+
---
141+
130142
## Technical Approach
131143

132144
### Layered Validation Strategy
@@ -145,75 +157,57 @@ This approach provides clear error messages and catches issues early.
145157
### API Client Pattern
146158

147159
Centralized HTTP client provides:
148-
- Consistent headers across all requests
149-
- Session reuse for performance
150-
- Timeout handling to prevent hanging tests
151-
- Context manager support for proper cleanup
160+
* Consistent headers across all requests
161+
* Session reuse for performance
162+
* Timeout handling to prevent hanging tests
163+
* Context manager support for proper cleanup
152164

153165
### Schema Validation
154166

155167
JSON Schema validation ensures:
156-
- API contract compliance
157-
- Early detection of breaking changes
158-
- Documentation of expected response structure
168+
* API contract compliance
169+
* Early detection of breaking changes
170+
* Documentation of expected response structure
171+
172+
---
159173

160174
## Challenges and Solutions
161175

162176
### Challenge 1: Response Time Variability
163177

164-
**Problem**: Initial tests failed due to network latency causing response times to exceed 2000ms limit.
178+
**Problem:** Initial tests failed due to network latency causing response times to exceed 2000ms limit.
165179

166-
**Solution**: Adjusted timeout threshold to 3000ms for public API testing. In production environment with internal APIs, lower thresholds (500-1000ms) would be more appropriate.
180+
**Solution:** Adjusted timeout threshold to 3000ms for public API testing. In production environment with internal APIs, lower thresholds (500-1000ms) would be more appropriate.
167181

168182
### Challenge 2: Mock API Limitations
169183

170-
**Problem**: JSONPlaceholder is a fake API that doesn't persist data, limiting certain test scenarios.
184+
**Problem:** JSONPlaceholder is a fake API that doesn't persist data, limiting certain test scenarios.
171185

172-
**Solution**: Documented limitation in README and focused on testing API contract and response validation rather than data persistence. For real-world projects, would use test database with proper cleanup.
186+
**Solution:** Documented limitation and focused on testing API contract and response validation rather than data persistence. For real-world projects, would use test database with proper cleanup.
173187

174188
### Challenge 3: Test Data Management
175189

176-
**Problem**: Hardcoded test data scattered across test files made maintenance difficult.
177-
178-
**Solution**: Centralized all test data in `data/test_data.py` including valid data, invalid data, edge cases, and JSON schemas. Single source of truth for test data.
179-
180-
## Key Learnings
181-
182-
Through this project I gained experience with:
190+
**Problem:** Hardcoded test data scattered across test files made maintenance difficult.
183191

184-
- Professional API testing patterns and best practices
185-
- Layered validation approach for robust assertions
186-
- JSON Schema validation for API contract testing
187-
- Test framework architecture and separation of concerns
188-
- Performance testing basics (response time validation)
189-
- Writing maintainable and scalable test automation
190-
- Proper error handling and debugging strategies
192+
**Solution:** Centralized all test data in `data/test_data.py` including valid data, invalid data, edge cases, and JSON schemas. Single source of truth for test data.
191193

192-
## Future Enhancements
193-
194-
- Add parametrized tests for data-driven testing
195-
- Implement authentication testing with different API
196-
- Expand to include albums and photos endpoints
197-
- Add rate limiting tests
198-
- Implement parallel test execution
199-
- Add API mocking for offline testing
194+
---
200195

201196
## API Used
202197

203-
This project uses [JSONPlaceholder](https://jsonplaceholder.typicode.com/) - a free fake REST API for testing and prototyping.
204-
205-
Endpoints tested:
206-
- `/users` - User management
207-
- `/posts` - Blog posts
208-
- `/comments` - Post comments
198+
This project uses **JSONPlaceholder** - a free fake REST API for testing and prototyping.
209199

210-
## Author
200+
**Endpoints tested:**
201+
* `/users` - User management
202+
* `/posts` - Blog posts
203+
* `/comments` - Post comments
211204

212-
Artur Dmytriyev - QA Automation Engineer
205+
---
213206

214-
- GitHub: https://github.com/arturdmt-alt
215-
- LinkedIn: https://www.linkedin.com/in/arturdmytriyev
207+
## Author
216208

217-
## Notes
209+
**Artur Dmytriyev**
210+
QA Automation Engineer
218211

219-
Built as part of a QA automation learning path to demonstrate advanced API testing skills. Focuses on professional testing practices and maintainable test architecture.
212+
* GitHub: [github.com/arturdmt-alt](https://github.com/arturdmt-alt)
213+
* LinkedIn: [linkedin.com/in/arturdmytriyev](https://www.linkedin.com/in/arturdmytriyev)

0 commit comments

Comments
 (0)