Advanced Agile Testing study guide

Feature Toggles (Feature Flags)

Feature Toggles (or Feature Flags) are configuration mechanisms embedded in code that allow Agile teams to enable or disable specific software features in production without deploying new code. They are essential for CI/CD, A/B testing, and canary releases.

Practical example

Instead of keeping a new feature on a separate, long-lived Git branch (which causes merge conflicts), developers merge the unfinished code into the main branch immediately, but wrap it in a toggle: if (FeatureFlag.NewCheckout == true) { showNewUI() }. The QA team can turn the toggle on in production just for themselves, test safely, and turn it on for customers later.

Exam scenario and common trap

Question: What is the primary risk of using Feature Toggles extensively over a long period? The Trap: "They slow down the deployment pipeline." The Correct Answer: Technical Debt. If old toggles are not routinely deleted from the codebase after a feature is fully launched, the code becomes an unmaintainable labyrinth of if/else statements, leading to severe regression risks.

Related syllabus material covers the broader concept; this page includes additional context. Reference sections: 6.1. See the official ISTQB syllabus for exam scope. Examples are independent; QA-ace is not affiliated with ISTQB.