API Testing · Senior · Question 46 of 75
What is a safe way to test destructive endpoints in a shared environment?
- 1Run them against the oldest records in the database
- 2Run them only at night when nobody is working
- 3Use isolated tenants or data created by the test itself
Show the answer
Correct answer: Use isolated tenants or data created by the test itself
Explanation
Deleting someone else's data breaks their tests. Isolation by tenant, prefix or ephemeral environment keeps it safe.