No results for ""
EXPAND ALL
  • Home
  • API docs

Testing flag targeting

Read time: 2 minutes
Last edited: Oct 31, 2024
Testing flag targeting is available through opt-in

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:

  1. From the Flags list, open the flag you want to preview.
  2. Make any needed changes to the flag rules.
  3. Click the fingerprint icon. The "Test targeting" section appears.
  4. 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 context selection menu in the "Test targeting" section with the "Test your own custom context" button highlighted.
    The context selection menu in the "Test targeting" section with the "Test your own custom context" button highlighted.

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.