Hey there! 👋
This project is an automated API testing using Python and pytest
.
I'm testing a public API (Reqres), which provides fake user data and typical API endpoints like:
- Getting lists of users (with pagination)
- Creating users
- Handling errors (like user not found)
The tests include:
- Validating response status codes
- Checking JSON response structures
- Ensuring the API key authorization works correctly
This project shows how to:
- Organize tests using
pytest
- Write clean, reusable code with a helper function for API requests
- Use Python’s
requests
library to interact with APIs
git clone https://github.com/uncleejay/api-automation-python.git
cd api-automation-python
Create a virtual environment to keep dependencies isolated:
python3 -m venv venv
source venv/bin/activate # Mac/Linux
# OR
venv\Scripts\activate # Windows
pip install -r requirements.txt
Once everything is setup, run all tests with
pytest