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:
- app/helpers/app_views_helper.rb
- Add the app_type to the list for
default_overrides.keys.map(&:to_s)
- Add the app_type to the list for
- 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:
- app/javascript/packs/apps/[appType].jsx
5.
defaults: function() {needs to be updated tobaseDefaults: 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.
- Formatting will look similar to: https://www.powr-staging.io/plugins/chat/standalone?chat_defaults=design_GaSP_9222_copy_changes** **