Local Flag Testing
This feature is not available in all SDKs This feature is only available in the following SDKs:
|
Using the Flags Override view
The Flags Override View is used for testing purposes. It allows developers to expose a view that shows the current status for each flag, and it allows the user to override these flags. This view is usually exposed to only developers, the QA team, and the product team.
If you override the value of a flag on a device, that override will persist until the app is removed from the device or until the override is reset using the view, see Reset flag overrides for more information.
The Flag Override View is available in all platforms.
Value of the flag is changed locally If you override the value of the flag, the value of the flag is only changed locally. |
The following shows how flags are configured in the ROXFlags file:
Swift | Objective-C | Android | JavaScript | JavaScript SSR |
---|---|---|---|---|
|
|
|
|
|
The different states of a flag
In the Flags Override view, a flag can appear in the following states:
-
The flag is on state means the value from the server of a flag is on and isn’t overridden on the device.
-
The flag is off state means the value from the server of a flag is off and isn’t overridden on the device.
-
The flag is overridden state means the value from the server is overridden on this specific device.
Reset flag overrides
There are two options to reset a flag override:
-
Reset all—by pressing the "Reset All" button, you’ll set all flags to the state defined in the CloudBees Feature Management dashboard. In other words, the flag state on the device will be as defined by the currently running feature flag configuration.
-
Reset one—depends on the platform, by choosing reset or by swiping the table cell to the left, you’ll expose the reset button. Clicking it will reset only the current flag.
Enabling the flag override view
Use the following code to present the flag override view:
Swift | Objective-C | Android | Javascript | JavaScript SSR |
---|---|---|---|---|
|
|
|
|
|