Automated API testing project focused on validating the POST /api/v1/kits endpoint of the Urban Grocers application, with special emphasis on the name field.
Miguel Bautista Gomez
Sprint: 7
Cohort: 28
This project automates and validates the kit creation functionality exposed by the Urban Grocers API. The test suite ensures that the name field behaves according to the specifications defined in the official API documentation.
The API documentation is provided via apiDoc (API URL + /docs/).
Language
- Python 3.13
Libraries
- requests – Used to perform HTTP requests to the API
- pytest – Used to write and execute automated tests
- Ensure Python 3.13 is installed.
- Install the required libraries using one of the following methods:
- Via PyCharm → Python Packages
- Via Git Bash:
pip install requests pytest
- **🧠 Testing Approach**:
- Unit testing of REST API endpoints
- File separation aligned with API documentation
- Response validation based on documented API behavior
# 🧪 Included Tests
The automated tests are implemented in the following file: create_kit_name_kit_test.py
⚠️ Known Issues
Test cases 3, 4, 8, and 9 do not return the expected 400 status code due to a known bug in the API. These failures are documented and are not related to test implementation.
# ▶️ How to Run the Tests
From the project root directory, open a terminal (Git Bash) and run: pytest create_kit_name_kit_test.py