Skip to main content

Testing

Test a feature gate#

There are three ways to test your feature gate and to validate that it's working as expected with the rules you have created:

  1. Using the built-in Test Gate tool in the Statsig console
  2. Using the prototype Javascript Test App available in the Statsig console
  3. Using the Diagnostics tab in the Statsig console

1. Using Test Gate#

To validate that your feature gate using the built-in Test Gate tool,

  • Log into the Statsig console at https://console.statsig.com
  • On the left-hand navigation panel, select Feature Gates
  • Select the feature gate that you want to validate
  • At the bottom of the page, the Test Gate window that lists all properties available in the rules you have created as shown below.

image

  • Click in the window and edit the value of the Email property to include the users that you want to target. For example, type jdoe@example.com as shown below. When email domain matches โ€œ@example.comโ€, the feature gate check succeeds and the window shows a PASS. Otherwise, it fails and the window shows a FAIL.

image

2. Using Test App#

To validate that your feature gate using the Test App,

  • Log into the Statsig console at https://console.statsig.com
  • On the left-hand navigation panel, select Feature Gates
  • Select the feature gate that you want to validate
  • At the bottom of the page, click on Check Gate in Test App at the top right of the Test Gate window as shown below by the red arrow; this will open a new browser window with a prototype Javascript client that initializes and calls the Statsig checkGate API.

image

3. Using Diagnostics Tab#

To validate that your feature gate using the Diagnostics tab,

  • Log into the Statsig console at https://console.statsig.com
  • On the left-hand navigation panel, select Feature Gates
  • Select the feature gate that you want to validate
  • Click on the Diagnostics tab (next to the Setup tab)
  • Scroll down to the Exposure Stream panel, where you will see a live stream of gate check events as they happen as shown below

image