Playwright · Senior · Question 68 of 77
How do you test that a feature behind a flag works in both states?
- 1Release the flag to all users before the test run
- 2Test only the enabled state since it's the new one
- 3Set the flag per test through an API, cookie or init script
Show the answer
Correct answer: Set the flag per test through an API, cookie or init script
Explanation
Controlling the flag in the test makes both paths deterministic, and projects can run the suite with the flag on and off.