Handling A/B Tests and Setting Cookies

When running A/B tests, Preflight cannot replicate a user's experience because it receives a different experience every time it views your website. You can set a cookie to define a specific outome for the test.

For example, a website that changes color each time the page is refreshed.

If you create a test that has a checkpoint for the word/color pink, the test will pass or fail depending on which route of the A/B test was randomly assigned.

To Ensure That the Correct Path is Taken

  1. In the Navigation bar, select Tests.

  2. Click on the test to open it.

  3. Click Editor, scroll down to the playback bar and click on the first step, usually Navigate to https://yourapp.....

    The details are displayed on the right.

  4. Click Advanced.

  5. In the Set Cookies section click Add Another and enter the cookie's name and value.

  6. Run the test several times to ensure it selects the correct path every time. To speed up this process, select multiple browsers.

Related topics

Recording Tests

Editing Actions