What Is Feature Flags?
Feature flags (also called feature toggles) are conditional switches in code that allow teams to enable or disable features at runtime without deploying new code, supporting controlled rollouts, A/B testing, and quick rollback.
Free to start · 7-day trial on paid plans
In Depth
Feature flags decouple deployment from release. Code can be merged and deployed with features behind flags that are turned off for all users. When the feature is ready, the flag is enabled for specific user segments (internal testers, beta users, a percentage of production traffic) and eventually toggled on globally. If problems arise, the flag is turned off instantly without a redeployment.
For QA, feature flags introduce combinatorial complexity. The same codebase can behave differently depending on which flags are enabled. Testing must cover at least three states: flag off (existing behavior preserved), flag on (new feature works correctly), and flag transition (enabling/disabling mid-session does not corrupt state). For critical features, the test matrix expands further: flag on for segment A but off for segment B, interactions between multiple flags, and so on.
Flag hygiene is a common challenge. Without discipline, codebases accumulate stale flags that are always on, creating dead branches and testing confusion. Best practices include setting expiration dates on flags, tracking flag usage in dashboards, and including flag cleanup in the Definition of Done.
Why Interviewers Ask About This
Interviewers ask about feature flags because they are ubiquitous in modern development but create testing challenges that many teams handle poorly. Demonstrating awareness of these challenges shows maturity.
Example Scenario
A team launches a new checkout flow behind a feature flag. QA tests with the flag off (old checkout still works), flag on for internal users (new flow is correct), and flag toggled during an active session (user completes checkout without data loss). After a week at 100%, the team removes the flag and the old code path.
Interview Tip
Discuss the testing complexity that flags introduce. Mention the combinatorial challenge, the need to test flag-on and flag-off states, and the importance of cleaning up stale flags.
Related Terms
Explore related glossary terms to deepen your understanding.
Related Resources
Dive deeper with these related interview prep pages.
Ready to Ace Your QA Interview?
Practice explaining feature flags and other key concepts with our AI interviewer.
Join 1,200+ QA engineers already practicing with AssertHired.
Start Your Free QA InterviewFree to start · 7-day trial on paid plans