Once you’ve created your Feature or Request Rule, you’ll want to test it before publishing it to your production site.
Zephr makes it simple to do this, with rule tagging and Preview Mode.
Tagging your Rule
Zephr rules are versioned: one can roll forwards or backwards with a click. It is also possible to tag rule versions (similar to Docker image tags), which allows you to test user journeys in preview mode before you publish your rule.
To tag a rule, navigate to your Feature or Request Rules list.
To the right of the rule you want to test, you’ll see an All Versions button. Click this to navigate to your list of rule versions.
On this page, find the version of the rule you wish to test. To the right of this test, click the kebab menu, and choose Add Tag.
Enter a tag name of your choosing, and click ok. If there are multiple rules you wish to test in unison, return to your rules list and repeat these steps, using the same tag name for each.
Using Preview Mode to Test your Rules
Preview Mode allows you to see your site as it would look with particular rules live, without you having to publish them to your production site without testing.
You can access Preview Mode, by clicking on the arrow icon in the top right hand corner of the Zephr Admin Console, then choosing Preview. You will need to have a valid, logged in admin session to be able to see this.
Within Preview Mode, a debugging tool (“the Orange Dot”) allows you to switch rule version tags to see these rules as they would be on your Production site. Click the Orange Dot to expand the modal, then use the dropdown box next to ‘Rule Version Tag’ to select the tag you wish to test. This will reload the page with the rules tagged to that version in place, as though they were live on your production site.
You can also see debugging information such as the entitlement challenges being made, the Features on the page you are viewing and information on the User you are logged in as. When using preview mode, you can also retrieve a complete log stream for a given request from your browser’s developer console.