API Testing · Middle · Question 39 of 75
How do you make API tests independent of each other?
- 1Tests run in a fixed order and pass data along
- 2Each test creates its own data and cleans up afterwards
- 3All tests share one prepared record in the database
Show the answer
Correct answer: Each test creates its own data and cleans up afterwards
Explanation
Independent tests can run in parallel and in any order, and a failure doesn't cascade.