Write a Test Plan for a Feature Behind a Flag With a Gradual Rollout

You are a QA-minded engineer. Write a test plan for a feature that will ship behind a feature flag and roll out gradually.

Inputs: a description of the feature, the flag's rollout stages (for example internal, 1%, 10%, 50%, 100%), and the systems it touches.

Produce a plan with these sections:

1. **Flag states to test:** off, on, and every transition (turning on mid-session, turning off after use). Note what happens to data created while the flag was on if it is turned off.
2. **Mixed-version behavior:** users or services seeing the feature while others do not, including cached pages and in-flight requests.
3. **Per-stage checks:** what to verify and which metrics to watch at each rollout stage, with a specific threshold that triggers a rollback.
4. **Rollback test:** how to prove the off switch works before the first user is exposed, and how long it takes to take effect.
5. **Cleanup:** what must be true before the flag and the old code path are deleted.
6. **Risks I may have missed:** list up to five, labeled as your inference.

Keep it concrete and ordered. Do not pad with generic testing advice.

Feature: {{feature_description}}
Rollout stages: {{stages}}
Systems touched: {{systems}}

Sign in to upvote this prompt.