Summary
This summary outlines the testing of the Urban Grocers API, focusing on:
Adding products to a kit.
Calculations for fast delivery.
A total of 57 tests were conducted: 28 for the first requirement and 29 for the second.
(👇 Full test case data sheet available 👇)
Requirement 1: Adding Products to a Kit
Key Findings
Parameters: Tested scenarios around the 30-item limit, invalid product IDs, and kit IDs.
Major Bugs
Verifying Body Response When Requesting An Excess of 30 Items
In addition to using Postman, I wrote JavaScript scripts and ran them through Node.js to manually test the same API scenarios. These scripts replicate the Postman tests, ensuring the Urban Grocers API correctly adheres to the 30-item limit for kits. You can view the scripts in my GitHub repository: Click here!
Exceeding 30 Items:
Interestingly, when adding multiple different products, each with a single quantity, to a kit that had under 30 items (causing it to exceed 30), the API behaved correctly & returned HTTP 400.
Requesting Non-existent Product IDs
This could lead to users believing they have successfully added a valid product to their kit when, in fact, the product does not exist in the system.
Invalid Inputs
The system was tested with various invalid product IDs and kit IDs (e.g., using Latin letters, symbols, decimal points, non-Latin letters).
Requirement 2: Fast Delivery Calculations
Test Cases Overview
Total Tests: 29
Focus: Parameters for the fast delivery method.
Test Scenarios
Inconclusive Tests
Two tests were deemed inconclusive, pointing to a significant flaw in the design of the API's cost calculation system.
These tests highlighted a gap in the defined ranges for host delivery cost:
Major Flaw in Design:
The current requirements have a gap between the $3 price range (0-2.5 kg) and the $6 price range (2.6-6 kg). This ambiguity creates uncertainty in expected outcomes for product weights that fall within this gap (e.g., 2.51 kg and 2.59 kg).
Conclusion
Overall, the system demonstrated significant issues with both the 30-item limit for kits and incorrect handling of delivery cost calculations. The bugs identified indicate areas where the API's functionality and validation mechanisms need to be strengthened.
Freevisitorcounters.com