Testing flag targeting
Read time: 2 minutes
Last edited: Oct 31, 2024
Previewing targeting rules is available only if you opt in through a feature preview. To enable rule preview, click your member icon in the left sidenav and choose Feature preview from the menu. In the Feature preview dialog, toggle the "Flag evaluation simulator" on or off.
Overview
This topic explains how to use the flag evaluation simulator to find out which variation a particular context will receive for a given feature flag. Testing flag targeting helps ensure that contexts receive the flag variations you expect after you make targeting changes.
Test flag targeting
To test a flag's targeting:
- From the Flags list, open the flag you want to preview.
- Make any needed changes to the flag rules.
- Click the fingerprint icon. The "Test targeting" section appears.
- From the menu that appears, search for and select the context you want to preview.
-
If you want to preview a custom context, click the brackets icon to test your own custom context. The "Test a custom context" dialog appears.
-
Edit the custom context attributes as needed, and click Submit.
The "Test targeting" section populates with the variation that the context is receiving based on current targeting, and the variation it will receive after you save your targeting changes.