OLD | NEW |
(Empty) | |
| 1 # Field Trial Testing Configuration |
| 2 |
| 3 This directory contains the field trial configuration used to ensure testing |
| 4 coverage of the experiments defined in `fieldtrial_testing_config.json`. |
| 5 |
| 6 Note that these apply specifically for Chromium builds. Chrome branded / |
| 7 official builds do not use these definitions. |
| 8 |
| 9 The first available experiment after platform filtering and concatenation is the |
| 10 default experiment for Chromium builds. This experiment is also used for perf |
| 11 bots and browser tests in the waterfall. |
| 12 |
| 13 ## Config File Format |
| 14 |
| 15 ```json |
| 16 { |
| 17 "StudyName": [ |
| 18 { |
| 19 "platforms": [Array of Strings of Valid Platforms for These Experime
nts], |
| 20 "experiments": [ |
| 21 { |
| 22 "//0": "Comment Line 0. Lines 0-9 are supported.", |
| 23 "name": "ExperimentName", |
| 24 "params": {Dictionary of Params}, |
| 25 "enable_features": [Array of Strings of Features], |
| 26 "disable_features": [Array of Strings of Features] |
| 27 }, |
| 28 ... |
| 29 ] |
| 30 }, |
| 31 ... |
| 32 ], |
| 33 ... |
| 34 } |
| 35 ``` |
| 36 |
| 37 The config file is a dictionary at the top level mapping a study name to an |
| 38 array of *study configurations*. The study name should match the Field Trial |
| 39 study name. |
| 40 |
| 41 ### Study Configurations |
| 42 |
| 43 Each *study configuration* is a dictionary containing both `platform` and |
| 44 `experiments`. |
| 45 |
| 46 `platform` is an array of strings of valid platforms and the |
| 47 strings may be `android`, `chromeos`, `ios`, `linux`, `mac`, or `windows`. |
| 48 |
| 49 `experiments` is an array containing the *experiments*. |
| 50 |
| 51 The converter uses the platforms array to determine what experiments to include |
| 52 for the study. All matching platforms will have their experiments concatenated |
| 53 together for the study. |
| 54 |
| 55 ### Experiments (Groups) |
| 56 Each *experiment* is a dictionary that must contain the `name` key, identifying |
| 57 the experiment group name which should match the Field Trial experiment group |
| 58 name. |
| 59 |
| 60 The remaining keys, `params`, `enable_features`, and `disable_features` are |
| 61 optional. |
| 62 |
| 63 `params` is a dictionary mapping parameter name to parameter. |
| 64 |
| 65 `enable_features` and `disable_features` indicate which features should be |
| 66 enabled and disabled respectively through the |
| 67 [Feature List API](https://cs.chromium.org/chromium/src/base/feature_list.h). As |
| 68 a reminder, as the variations framework does not actually fetch the Field Trial |
| 69 definitions from the server for Chromium builds, so any feature enabling or |
| 70 disabling must be done here. |
| 71 |
| 72 #### Comments |
| 73 |
| 74 Each experiment may have up to 10 lines of comments. The comment key must be of |
| 75 the form `//N` where `N` is between 0 and 9. |
| 76 |
| 77 ```json |
| 78 { |
| 79 "AStudyWithExperimentComment": [ |
| 80 { |
| 81 "platforms": ["chromeos", "linux", "mac", "win"], |
| 82 "experiments": [ |
| 83 { |
| 84 "//0": "This is the first comment line.", |
| 85 "//1": "This is the second comment line.", |
| 86 "name": "DesktopExperiment" |
| 87 } |
| 88 ] |
| 89 } |
| 90 ] |
| 91 } |
| 92 ``` |
| 93 |
| 94 ### Specifying Different Experiments for Different Platforms |
| 95 Simply specify two different study configurations in the study: |
| 96 |
| 97 ```json |
| 98 { |
| 99 "DifferentExperimentsPerPlatform": [ |
| 100 { |
| 101 "platforms": ["chromeos", "linux", "mac", "win"], |
| 102 "experiments": [{ "name": "DesktopExperiment" }] |
| 103 }, |
| 104 { |
| 105 "platforms": ["android", "ios"], |
| 106 "experiments": [{ "name": "MobileExperiment" }] |
| 107 } |
| 108 ] |
| 109 } |
| 110 ``` |
| 111 |
| 112 ## Presubmit |
| 113 The presubmit tool will ensure that your changes follow the correct ordering and |
| 114 format. |
OLD | NEW |