An instrumentation spec is being developed for the Zebra design as part of T333222. Since this is an A/B test for logged in users, it will require some newly built scaffolding on the backend.
We'll need a new Feature requirement e.g. UserABTestRequirement();
TODO
- Make a generic feature requirement that can read the VectorWebABTestEnrollment configuration variable. The constructor should have a name.
- The requirement isMet method should return false, if the A/B test is disabled.
- The requirement isMet method should return true, if the A/B test is enabled and the user is in the sample.
- The sampling rate should be based on the ID of the current user.
- Review https://docs.google.com/spreadsheets/d/1-23KnYroBHELliUhZ9sMSlvqfqwtmRuVjmB7oPt269Y/edit#gid=0 and ensure every field is instrumented. If not, create follow-up ticket for instrumentation (or add as part of this ticket)
QA
Using https://patchdemo.wmflabs.org/wikis/f6677dd84f/wiki/Main_Page verify that for 50% of users the class vector-feature-zebra-design-enabled is on the HTML tag and for 50% of users the vector-feature-zebra-design-disabled class is on the HTML tag. You will need to inspect the HTML of the page to confirm this.
- On beta cluster (Where A/B test is disabled) there should be a vector-feature-zebra-design-disabled class on the HTML tag.
- On https://patchdemo.wmflabs.org/wikis/f6677dd84f/wiki/Main_Page when logged out there should be a vector-feature-zebra-design-disabled class on the HTML tag.
- On https://patchdemo.wmflabs.org/wikis/f6677dd84f/wiki/Main_Page when logged in there should be a vector-feature-zebra-design-disabled class on the HTML tag 50% of the time and 50% of the time there should be vector-feature-zebra-design-enabled class.
Sign off steps
Create a ticket with clear documentation on howthe A/B test can be enabled in future.