File tree 5 files changed +117
-0
lines changed
tests/CTS/requests/abtesting
5 files changed +117
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ abTestID:
18
18
description : Unique A/B test identifier.
19
19
example : 224
20
20
21
+ abTestScheduleID :
22
+ type : integer
23
+ description : Unique scheduled A/B test identifier.
24
+ example : 224
25
+
21
26
endAt :
22
27
type : string
23
28
description : End date and time of the A/B test, in RFC 3339 format.
@@ -33,6 +38,11 @@ updatedAt:
33
38
description : Date and time when the A/B test was last updated, in RFC 3339 format.
34
39
example : 2023-06-15T15:06:44.400601Z
35
40
41
+ scheduledAt :
42
+ type : string
43
+ description : Date and time when the A/B test is scheduled to start, in RFC 3339 format.
44
+ example : 2023-06-15T15:06:44.400601Z
45
+
36
46
name :
37
47
type : string
38
48
description : A/B test name.
Original file line number Diff line number Diff line change
1
+ ScheduleABTestResponse :
2
+ type : object
3
+ additionalProperties : false
4
+ properties :
5
+ abTestScheduleID :
6
+ $ref : ' ../parameters.yml#/abTestScheduleID'
7
+ required :
8
+ - abTestScheduleID
Original file line number Diff line number Diff line change
1
+ post :
2
+ tags :
3
+ - abtest
4
+ operationId : scheduleABTest
5
+ x-acl :
6
+ - editSettings
7
+ summary : Schedule an A/B test
8
+ description : |
9
+ Schedule an A/B test to be started at a later time.
10
+ requestBody :
11
+ required : true
12
+ content :
13
+ application/json :
14
+ schema :
15
+ title : scheduleABTestsRequest
16
+ type : object
17
+ additionalProperties : false
18
+ properties :
19
+ name :
20
+ $ref : ' ../common/parameters.yml#/name'
21
+ variants :
22
+ type : array
23
+ description : A/B test variants.
24
+ minItems : 2
25
+ maxItems : 2
26
+ items :
27
+ $ref : ' ../common/schemas/AddABTestsVariant.yml#/AddABTestsVariant'
28
+ scheduledAt :
29
+ $ref : ' ../common/parameters.yml#/scheduledAt'
30
+ endAt :
31
+ $ref : ' ../common/parameters.yml#/endAt'
32
+ required :
33
+ - name
34
+ - variants
35
+ - scheduledAt
36
+ - endAt
37
+ responses :
38
+ ' 200 ' :
39
+ description : OK
40
+ headers :
41
+ x-ratelimit-limit :
42
+ $ref : ' ../../common/responses/rateLimit.yml#/x-ratelimit-limit'
43
+ x-ratelimit-remaining :
44
+ $ref : ' ../../common/responses/rateLimit.yml#/x-ratelimit-remaining'
45
+ x-ratelimit-reset :
46
+ $ref : ' ../../common/responses/rateLimit.yml#/x-ratelimit-reset'
47
+ content :
48
+ application/json :
49
+ schema :
50
+ $ref : ' ../common/schemas/ScheduleABTestResponse.yml#/ScheduleABTestResponse'
51
+ ' 400 ' :
52
+ $ref : ' ../../common/responses/BadRequest.yml'
53
+ ' 402 ' :
54
+ $ref : ' ../../common/responses/FeatureNotEnabled.yml'
55
+ ' 403 ' :
56
+ $ref : ' ../../common/responses/MethodNotAllowed.yml'
57
+ ' 404 ' :
58
+ $ref : ' ../../common/responses/IndexNotFound.yml'
Original file line number Diff line number Diff line change 96
96
$ref : ' paths/abtest.yml'
97
97
/2/abtests/{id}/stop :
98
98
$ref : ' paths/stopABTest.yml'
99
+ /2/abtests/schedule :
100
+ $ref : ' paths/scheduleABTest.yml'
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "testName" : " scheduleABTest with minimal parameters" ,
4
+ "parameters" : {
5
+ "endAt" : " 2022-12-31T00:00:00.000Z" ,
6
+ "scheduledAt" : " 2022-11-31T00:00:00.000Z" ,
7
+ "name" : " myABTest" ,
8
+ "variants" : [
9
+ {
10
+ "index" : " AB_TEST_1" ,
11
+ "trafficPercentage" : 30
12
+ },
13
+ {
14
+ "index" : " AB_TEST_2" ,
15
+ "trafficPercentage" : 50
16
+ }
17
+ ]
18
+ },
19
+ "request" : {
20
+ "path" : " /2/abtests/schedule" ,
21
+ "method" : " POST" ,
22
+ "body" : {
23
+ "endAt" : " 2022-12-31T00:00:00.000Z" ,
24
+ "scheduledAt" : " 2022-11-31T00:00:00.000Z" ,
25
+ "name" : " myABTest" ,
26
+ "variants" : [
27
+ {
28
+ "index" : " AB_TEST_1" ,
29
+ "trafficPercentage" : 30
30
+ },
31
+ {
32
+ "index" : " AB_TEST_2" ,
33
+ "trafficPercentage" : 50
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ]
You can’t perform that action at this time.
0 commit comments