Skip to main content

how to make default ab tests

Configuring default AB tests is quick and easy thanks to the existing system. Take care with test group naming and formatting within files, as incorrect formats will often lead to failure to display the default.

Example MR: https://gitlab.com/powr/powr/-/merge_requests/6955/diffs

Two files that always need to be edited:

  1. app/helpers/app_views_helper.rb
    1. Add the app_type to the list for default_overrides.keys.map(&:to_s)
  2. app/views/apps/defaults/[appType].rb 2. Appropriately name the control default, if it is not already 3. Use a json formatter to properly format the content json blob that you intend to use as the test default 4. Comma separate this as a second option under def self.defaults return {

On rare occasion, there is a 3rd file that will need to be edited:

  1. app/javascript/packs/apps/[appType].jsx 5. defaults: function() { needs to be updated to baseDefaults: function() { 6. Example MR: https://gitlab.com/powr/powr/-/merge_requests/6969/diffs

Testing default ABs cannot be done using cookies. Instead, use url parameters to define the test and test group.