🛒 Market App
Grocery store e-commerce API for testing CRUD operations, basket management, and order workflows
Overview
The Market App simulates a real grocery store backend with products, shopping basket, and order management. Perfect for practicing API testing scenarios commonly found in e-commerce systems.
What You Can Test
- Products: Create, read, update, delete grocery items
- Basket: Add products, update quantities, calculate totals
- Orders: Create orders from basket, track order status
- Stock Management: Verify stock decreases after orders
- Price Calculations: Test subtotals, taxes, and total amounts
Requirements & Fields
Product Fields:
name- string, required, max 100 charscategory- string (fruits, vegetables, dairy, etc.)price- decimal, required, min 0.01stock- integer, required, min 0description- string, optional
Basket Fields:
product_id- UUID, requiredquantity- integer, required, min 1
Order Fields:
status- string (pending, confirmed, shipped, delivered, cancelled)total_amount- decimal, calculated from basketitems- array of products with quantities
Test Case Examples
/api/productsExpected: Product created successfully, returned in response
TC-002: Create Product with Invalid Price
Objective: Verify validation for negative or zero price
Steps:
- Send POST request with price = -10
- Verify response status 400
- Verify error message indicates invalid price
Expected: Request rejected with validation error
TC-003: Stock Deduction After Order
Objective: Verify stock decreases when order is created
Steps:
- Create product with stock = 50
- Add 10 units to basket
- Create order from basket
- Verify product stock is now 40
Expected: Stock reduced by order quantity
TC-004: Basket Total Calculation
Objective: Verify basket calculates total correctly
Steps:
- Add Product A (price 5.00, qty 3) to basket
- Add Product B (price 10.50, qty 2) to basket
- Get basket total
- Verify total = (5.00 * 3) + (10.50 * 2) = 36.00
Expected: Total calculated accurately
TC-005: Update Product Stock
Objective: Verify product stock can be updated
Steps:
- Create product with stock = 100
- Send PUT request to update stock to 150
- Verify response status 200
- Get product and verify stock = 150
Expected: Stock updated successfully