API Testing · Middle · Question 14 of 75
How do you test that an API handles a double-click on "Pay" safely?
- 1Send requests one hour apart and compare results
- 2Send one request and check the response time
- 3Send two identical requests at once and check one charge
Show the answer
Correct answer: Send two identical requests at once and check one charge
Explanation
Parallel requests reveal race conditions that sequential tests miss: duplicate orders, double charges, wrong counters.