Comments (2)
If you are just testing the application's ability to react on feature manager evaluations then I would say that stubbing the feature manager is a proper way to accomplish this. You could create a test implementation of IFeatureManager
which contains the desired state of all features as a dictionary.
I wouldn't say that there is a one solution fits all approach. Some tests may require a more dynamic approach and in that case you could directly interact with a TestFilter
as shown in this code snippet:
from featuremanagement-dotnet.
Thanks, Jimmy.
Just to clarify, the reason behind my question was based on this excerpt from Pete Hodgson's article on Martin Fowler's blog:
We can create a new toggle router based on some default configuration - perhaps read in from a config file - but we can also dynamically toggle a feature on or off. This allows automated tests to verify both sides of a toggled feature:
Also,
You could create a test implementation of IFeatureManager which contains the desired state of all features as a dictionary.
Good point. I realize the stubbing approach in #19 (comment) would degrade in maintainability as the # of features grows. I hadn't fully thought that threw so I'll definitely take this into consideration.
from featuremanagement-dotnet.
Related Issues (20)
- Can't Upgrade to v3.0.0 - "The feature filter '' specified for feature '' was not found. HOT 8
- Support for Code-first Configuration (builder) HOT 6
- Cache Entry does not set size HOT 3
- FeatureManager in ASP.NET Core Web API HOT 8
- Record feature flag evaluation metrics HOT 4
- FeatureGate filter question HOT 3
- Should we have a feature flag schema specification? HOT 3
- Is the "xunit.assert" dependency a mistake? HOT 3
- Test suit should also target on .NET8.0
- Caching for a custom FeatureDefinitionProvider HOT 18
- Compatibility/overlap with the OpenFeature Spec/SDK HOT 6
- Feature filter from second configuration source is not respected when the base configuration does not specify a filter HOT 1
- Targeting filter - Feature does not display even if setting the value to 100 HOT 19
- Consider adding default for CancellationToken parameters in interfaces / classes in 4.0.0 HOT 10
- Improve non-DI usage of built-in feature filters HOT 8
- Package dependency: Microsoft.FeatureManagement.Telemetry.ApplicationInsights.AspNetCore HOT 1
- Namespace of TelemetryClientExtensions
- Namespace of ApplicationInsightsTelemetryPublisher HOT 4
- The StatusOverride doesn't work HOT 8
- ISessionManager is not mentioned in README
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from featuremanagement-dotnet.