Understanding the following Verdict concepts can help you implement experiments and discuss them with peers.
Experiment
s are defined in app/experiments
and encapsulate the details of the test including metadata such as the name, description or owners, as well as any qualifiers or the groups available in the test.
Qualifiers are methods that take two parameters, subject
and context
. They return true
if the subject
can take this experiment, or false
if the subject
is not eligible. Experiments can have multiple qualifiers which are evaluated in succession. If a qualifier returns false
, no further qualifiers are checked.
Examples of qualifiers might be subjects that:
- Originate from certain browsers or devices
- Have a specific
Accept-Language
header - Have added items to their cart.
A subject is the thing that will be qualified, and if successfull, assigned to a particular group. For example, a subject might represent a user.
Each experiment will have two or more groups, usually a control group and a test group. Qualified subjects are assigned to one of the groups in the experiment.
An assignment occurs when a qualified subject is placed into a group. Assignments are persisted so repeat visits by the subject skip qualification and re-assignment and simply returns the existing assignment.