Feature Flag
A configuration mechanism that allows teams to enable or disable features in production without deploying new code, used for gradual rollouts, A/B testing, and instant kill switches.
Feature flags (also called feature toggles) decouple deployment from release. Code is deployed to production but the feature is hidden behind a flag that can be toggled on for specific users, percentages of traffic, geographic regions, or internal teams. This enables practices like trunk-based development (merging to main frequently) while controlling when features are visible.
Feature flag platforms like LaunchDarkly, Flagsmith, and Unleash provide dashboards for managing flags, targeting rules, and analytics. From a QA perspective, feature flags increase testing complexity because the application behaves differently depending on flag states.
Why It Matters for QA Teams
Feature flags mean QA must test multiple states of the application: feature on, feature off, and the transition between them. An untested flag combination can cause bugs visible only to certain user segments.
Example
A new recommendation engine is deployed behind a feature flag. QA tests three scenarios: flag off (old recommendations appear), flag on (new recommendations appear), and the transition (user had old recommendations cached, flag turns on mid-session). They discover that toggling the flag mid-session causes the recommendation widget to display a blank state until page refresh, and file a bug to handle the transition gracefully.