Continuous testing in a CICD setup with feature flags!
Traditionally, the only way to "release" new features to customers is by "deploying" the source code of new feature to production. The release and deployment happens at the same time and are thus tightly coupled. A feature toggling tool such as LaunchDarkly, allows teams to decouple the release and deployment of new features. This means, the team can deploy the code of new feature to production, but not release it to customers. This decoupling brings in a lot of flexibility and benefits to the team, Such as, Having separate goals for deployment (done via CICD pipelines) and releases (done via LaunchDarkly).
Deployment Goals!
- Don't introduce new issues or vulnerabilites in our systems while bringing in new features.
- Formating checks should pass.
- Linting checks should pass.
- Security scans should not have any high or critical vulnerabilities <=7 rating.
- License checks should be compliant with open source standards.
- Integration tests should pass.
- Don't break or degrade existing functionality.
- All unit tests should pass.
- All integration tests should pass.
- All existing system/service tests should pass.
- Test coverage should not drop below a team threshold (of say 80%).
Release Goals!
- New functionality meets expectations and is ready to be released.
- Functional testing is successful.
- Exploratory testing is successful.
- Performance testing is successful.
- Business Acceptance testing is successful.
Potential benefits of decoupled release and deployments!
- Simple and risk free Trunk Based Development.
- Possibility to deploy to production multiple times a day without accidentally releasing half-baked features to customers.
- Release on demand, when ready.
- Possibility to do soft rollbacks (by hiding the faulty functionality from customers) on click of a button.
- No need to do hotfixes. Faults can be fixed carefully on latest main, without under pressure, and same as any other feature or bugfix.
- Simplified release process.
- Simplified and standardized deployment process for any and all kind of changes.
- Possibility to do A/B testing and canary releases in production.
- No need for multiple test environments (dev, test, staging).
- One Test environment with targeting rules set in LaunchDarkly should be sufficient to cover all scenarios.