This repository documents Sprint 4 API testing work for Urban Grocers (Kits) and Fast Delivery, using JSON payloads.
- Endpoint:
POST /api/v1/kits/:id/products
- Test Scenarios:
- Valid kit ID vs non-existent kit ID → 200 / 404
- Product ID validation: non-existent products → 400
productsList
length ≤ 30 and JSON structure validation
- Endpoint:
POST /fast-delivery/v3.1.1/calculate-delivery
- Test Scenarios:
deliveryTime
vs operating hours (boundary tests)productsCount
andproductsWeight
limits (positive/negative)- Validate response JSON structure and values
- All test cases executed using JSON payloads.
- Positive and negative scenarios covered.
- Detailed test cases, execution results, and status documented in Google Sheets:
📎 Sprint 4 Test Cases (JSON)
- Send Request: Use Postman with JSON payloads.
- Verify Status Code: Check that response code matches expected (200, 400, 404).
- Validate Response Body: Confirm JSON structure and values are correct.
- Error Handling:
- Timeout, network issues, or server down → log and mark
Blocked
. - Unexpected 200 OK → log as defect and mark
Failed
.
- Timeout, network issues, or server down → log and mark
- JSON format adopted instead of previous XML for all API requests.
- Covers functional, positive, and negative test scenarios.
- Test results are fully documented and accessible via the linked Google Sheet.
This repository documents Sprint 4 API testing work for Urban Grocers (Kits) and Fast Delivery services.
The project validates API endpoints using Postman with JSON payloads, covering both positive and negative scenarios.
- Postman → API requests & automation
- JSON → request/response format
- Google Sheets → detailed test case management & evidence
- HTTP/REST → API communication
Before running tests, make sure you have:
- Installed Postman
- Access to UrbanGrocers API base URL (provided by project/environment)
- Internet connection to access Google Sheets evidence
Note: Postman exports are not included (
Status: Evidence-only
). You can replicate requests manually using the JSON payloads provided below.
- Open Postman.
- Create a new request and configure:
- Method:
POST
- URL: (see endpoints below)
- Headers:
Content-Type: application/json Accept: application/json
- Body: raw JSON (see examples).
- Method:
- Send request and validate response:
- Status code matches expectation (
200
,400
,404
). - Response body structure and values are correct.
- Status code matches expectation (
Endpoint: POST /api/v1/kits/:id/products
- Valid kit ID vs non-existent kit ID →
200 / 404
- Product ID validation → reject non-existent IDs →
400
- Quantity validation → must be
> 0
and≤ 30
→400
- JSON structure validation → reject malformed requests →
400
Endpoint: POST /fast-delivery/v3.1.1/calculate-delivery
- Delivery time vs operating hours (boundary tests)
- Product count and weight limits (positive/negative)
- Validate response JSON structure and delivery cost calculation
ID | Test Case Name | Endpoint | Expected | Actual | Status |
---|---|---|---|---|---|
P001 | Successful delivery calculation with valid data | /fast-delivery/v3.1.1/calculate-delivery |
200 OK – valid cost |
200 OK | ✅ PASSED |
P002 | Reject non-existent product ID | /api/v1/kits/6/products |
400 Bad Request |
200 OK | ❌ FAILED |
P004 | Reject quantity > 30 | /api/v1/kits/6/products |
400 Bad Request |
200 OK | ❌ FAILED |
P008 | Reject quantity = 0 | /api/v1/kits/6/products |
400 Bad Request |
200 OK | ❌ FAILED |
P010 | Reject kit exceeding total product limit (30 max) | /api/v1/kits/6/products |
400 Bad Request |
200 OK | ❌ FAILED |
👉 Full evidence with detailed steps, payloads, validations, and results is documented in Google Sheets:
📎 Sprint 4 Test Cases (JSON)
✅ Valid Delivery Request
{
"deliveryTime": 10,
"productsCount": 5,
"productsWeight": 2.5
}
❌ Invalid Kit Request (non-existent product ID)
{
"productsList": [
{ "id": 9999, "quantity": 2 }
]
}
❌ Invalid Request Structure
{
"productItems": [
{ "id": 3, "qty": 3 }
]
}