Loading Engineer Africa…
Loading Engineer Africa…
THE FREE ENGINEERING LAB
Make a request. Find the bug. Prove the fix.
Learn the testing habits that make software more dependable.
API FOUNDATIONS
…/ 03 lessons
Your next useful skill starts here.
LESSON 03 / 03 · 15 MIN
Combine positive, negative, and regression checks into a reviewable result.
Your team adds a discount code. The feature is small, but it touches existing price calculations and input validation. A release review should show what you checked, what failed, and what remains outside the scope of the test.
LEARN10 reduces the subtotal by ten percent, and the API treats coupon letters without regard to case. Two items cost 5,000 cents before the discount and 4,500 after it. An unknown coupon must return INVALID_COUPON. A good suite checks the feature, protects a normal order, and retains an important boundary test. Integer cents keep this exercise free from floating-point currency surprises.
Teaching simulator: requests run entirely in your browser. They do not contact a server, create orders, or take payments.
400 INVALID_QUANTITY. Above 10: 400 QUANTITY_LIMIT.LEARN10 gives 10% off and ignores letter case. Any other value: 400 INVALID_COUPON.200 with currency, quantity, unitPrice, subtotal, discount, and total. Money uses USD cents. Unit price is 2500; total = subtotal − discount.Repair the lowercase-coupon total, run the five-case reference suite, and export the evidence for a review.
POST /sandbox/quote
// Send a request to inspect // its actual response here. // Nothing leaves your browser.
JSON data. Match the status and the body fields that matter.
03 / REVIEW THE EVIDENCE
Run your suite to see the result of every assertion.
The checklist below measures coverage as well as correctness.Protect a normal order: quantity 2, no coupon, total 5000
Check LEARN10 on quantity 2 gives total 4500
Check learn10 on quantity 2 also gives total 4500
Reject coupon UNKNOWN with status 400 and INVALID_COUPON
Keep the maximum order boundary: quantity 10, total 25000
Run a reference suite with every assertion passing
A release report is an argument supported by evidence. Name the build and checks, retain the failures, and state the limits. Passing these tests does not establish security, accessibility, or real payment correctness.