Mais conteúdo relacionado Semelhante a Is your code Toggled?!? By Devi Sridharan & Siddhartha Deshpande (20) Mais de Agile Testing Alliance (20) Is your code Toggled?!? By Devi Sridharan & Siddhartha Deshpande1. Is your code Toggled?!?
Confidential | Copyright © Agile Testing Alliance Global Gathering
Devi Sridharan
Siddhartha Deshpande
2. What is Agile?
Confidential | Copyright © Agile Testing Alliance Global Gathering
3. According to Agile Manifesto...
The Agile Manifesto is based on 12 principles
1.Customer satisfaction by rapid delivery of useful software
2.Welcome changing requirements, even late in development
3.Working software is delivered frequently (weeks rather than months)
4.Close, daily cooperation between business people and developers
5.Projects are built around motivated individuals, who should be trusted
6.Face-to-face conversation is the best form of communication (co-location)
7.Working software is the principal measure of progress
8.Sustainable development, able to maintain a constant pace
9.Continuous attention to technical excellence and good design
10.Simplicity—the art of maximizing the amount of work not done—is essential
11.Self-organizing teams
12.Regular adaptation to changing circumstances
Confidential | Copyright © Agile Testing Alliance Global Gathering
4. Branches
-Release branch
Master & single work-in-branch
-Feature branch
o Master & Multiple branches
Confidential | Copyright © Agile Testing Alliance Global Gathering
5. Release Branch
-Delayed integration
-Hotfixes has to wait till
next release.
-Can’t add any code if its
not part of current release
Confidential | Copyright © Agile Testing Alliance Global Gathering
Trunk
Release Branches
6. Feature Branches
-Merging becomes very difficult
-Increases the testing effort
-Lot of time spent on Regression &
Integration Testing
-Reduces the re-usability of shared automate
test-suite
Confidential | Copyright © Agile Testing Alliance Global Gathering
Feature 1
Trunk
Feature 2
7. Feature Toggle!?!
-What is toggle?
-Feature Toggle is a conditional statement that
hides certain functionality.
Confidential | Copyright © Agile Testing Alliance Global Gathering
8. Guard the code
Confidential | Copyright © Agile Testing Alliance Global Gathering
9. Types of Feature Toggles
-Release Toggles: (Development Environment)
- Hide incomplete features and are removed as soon as
feature is ready
-Business Toggles: (Business Sponsors)
- Enable feature for group of people and can be changed
on fly
Confidential | Copyright © Agile Testing Alliance Global Gathering
10. Feature Toggles is opt for….
-Hiding or disabling new features in UI
-Hiding/Disabling new components
-To support multiple versions of feature/component
-Adding new feature to an application
-Enhancing an existing feature
Confidential | Copyright © Agile Testing Alliance Global Gathering
11. How to implement ?
- Config files
- Toggle manager controlled by Admin
- Session cookie
Confidential | Copyright © Agile Testing Alliance Global Gathering
12. Lets Toggle!!
Few ways to control the application using toggles
-via server-side
-via client-side
-URL parameterization
-Javascript
Confidential | Copyright © Agile Testing Alliance Global Gathering
13. via server
pros
-Feature is available,till next build is deployed
-No further setup is needed
cons
-Need to wait for deployment to complete
-Switching between toggles is difficult
Confidential | Copyright © Agile Testing Alliance Global Gathering
14. via client
- Need to know feature flag to enable it
- Feature is available,only on local machine
- Testing becomes easier,as we have more control of
application
Confidential | Copyright © Agile Testing Alliance Global Gathering
15. Business toggles
-Used in production environment
-To enable A/B testing
-Release features to group of users for early feedback
Confidential | Copyright © Agile Testing Alliance Global Gathering
16. While implementing toggles...
-Try to keep less number of toggles
-Mutually Exclusive toggles
-Remove the toggles as soon as corresponding feature is
implemented completely
Confidential | Copyright © Agile Testing Alliance Global Gathering
17. What will you achieve…?!
-Continuous integration
-More visibility into all work streams
-No merge conflicts and hence easy to refactor the
code
-Reduced time spent on testing
Confidential | Copyright © Agile Testing Alliance Global Gathering
18. Having said….
Feature toggle is second best solution.
The best solution is to find a way to
gradually integrate, without feature toggles
or feature switches
Confidential | Copyright © Agile Testing Alliance Global Gathering
Notas do Editor Feature Toggles are also known as feature flags, feature switches, feature flippers, conditional features.