API Testing · Senior · Question 58 of 75
How should API tests handle feature flags?
- 1Set flags per test or project and test both states of key flags
- 2Turn all flags on in every environment before testing
- 3Flags only affect the UI, so API tests can ignore them
Show the answer
Correct answer: Set flags per test or project and test both states of key flags
Explanation
Flags change API behaviour too. Uncontrolled flags make tests flaky when someone toggles them in shared environments.