File tree Expand file tree Collapse file tree 10 files changed +342
-70
lines changed Expand file tree Collapse file tree 10 files changed +342
-70
lines changed Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " fallbacks to the alias when region is not given" ,
4+ "autoCreateClient" : false ,
5+ "steps" : [
6+ {
7+ "type" : " createClient" ,
8+ "parameters" : {
9+ "appId" : " my-app-id" ,
10+ "apiKey" : " my-api-key"
11+ }
12+ },
13+ {
14+ "type" : " method" ,
15+ "method" : " getABTest" ,
16+ "parameters" : {
17+ "id" : 123
18+ },
19+ "expected" : {
20+ "type" : " host" ,
21+ "match" : " analytics.algolia.com"
22+ }
23+ }
24+ ]
25+ },
26+ {
27+ "testName" : " uses the correct region" ,
28+ "autoCreateClient" : false ,
29+ "steps" : [
30+ {
31+ "type" : " createClient" ,
32+ "parameters" : {
33+ "appId" : " my-app-id" ,
34+ "apiKey" : " my-api-key" ,
35+ "region" : " us"
36+ }
37+ },
38+ {
39+ "type" : " method" ,
40+ "method" : " getABTest" ,
41+ "parameters" : {
42+ "id" : 123
43+ },
44+ "expected" : {
45+ "type" : " host" ,
46+ "match" : " analytics.us.algolia.com"
47+ }
48+ }
49+ ]
50+ },
51+ {
52+ "testName" : " throws when incorrect region is given" ,
53+ "autoCreateClient" : false ,
54+ "steps" : [
55+ {
56+ "type" : " createClient" ,
57+ "parameters" : {
58+ "appId" : " my-app-id" ,
59+ "apiKey" : " my-api-key" ,
60+ "region" : " not_a_region"
61+ },
62+ "expected" : {
63+ "error" : " `region` must be one of the following: de, us"
64+ }
65+ }
66+ ]
67+ }
68+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " addABTests with minimal parameters" ,
4+ "parameters" : {
5+ "endAt" : " 2022-12-31T00:00:00.000Z" ,
6+ "name" : " myABTest" ,
7+ "variants" : [
8+ {
9+ "index" : " AB_TEST_1" ,
10+ "trafficPercentage" : 30
11+ },
12+ {
13+ "index" : " AB_TEST_2" ,
14+ "trafficPercentage" : 50
15+ }
16+ ]
17+ },
18+ "request" : {
19+ "path" : " /3/abtests" ,
20+ "method" : " POST" ,
21+ "body" : {
22+ "endAt" : " 2022-12-31T00:00:00.000Z" ,
23+ "name" : " myABTest" ,
24+ "variants" : [
25+ {
26+ "index" : " AB_TEST_1" ,
27+ "trafficPercentage" : 30
28+ },
29+ {
30+ "index" : " AB_TEST_2" ,
31+ "trafficPercentage" : 50
32+ }
33+ ]
34+ }
35+ }
36+ }
37+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " deleteABTest" ,
4+ "parameters" : {
5+ "id" : 42
6+ },
7+ "request" : {
8+ "path" : " /3/abtests/42" ,
9+ "method" : " DELETE"
10+ }
11+ }
12+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " estimate AB Test sample size" ,
4+ "parameters" : {
5+ "configuration" : {
6+ "minimumDetectableEffect" : {
7+ "size" : 0.03 ,
8+ "metric" : " conversionRate"
9+ }
10+ },
11+ "variants" : [
12+ {
13+ "index" : " AB_TEST_1" ,
14+ "trafficPercentage" : 50
15+ },
16+ {
17+ "index" : " AB_TEST_2" ,
18+ "trafficPercentage" : 50
19+ }
20+ ]
21+ },
22+ "request" : {
23+ "path" : " /3/abtests/estimate" ,
24+ "method" : " POST" ,
25+ "body" : {
26+ "configuration" : {
27+ "minimumDetectableEffect" : {
28+ "size" : 0.03 ,
29+ "metric" : " conversionRate"
30+ }
31+ },
32+ "variants" : [
33+ {
34+ "index" : " AB_TEST_1" ,
35+ "trafficPercentage" : 50
36+ },
37+ {
38+ "index" : " AB_TEST_2" ,
39+ "trafficPercentage" : 50
40+ }
41+ ]
42+ }
43+ }
44+ }
45+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " getABTest" ,
4+ "parameters" : {
5+ "id" : 42
6+ },
7+ "request" : {
8+ "path" : " /3/abtests/42" ,
9+ "method" : " GET"
10+ }
11+ }
12+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "parameters" : {
4+ "id" : 42
5+ },
6+ "request" : {
7+ "path" : " /3/abtests/42" ,
8+ "method" : " GET"
9+ }
10+ }
11+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " listABTests with minimal parameters" ,
4+ "parameters" : {},
5+ "request" : {
6+ "path" : " /3/abtests" ,
7+ "method" : " GET"
8+ }
9+ },
10+ {
11+ "testName" : " listABTests with parameters" ,
12+ "parameters" : {
13+ "offset" : 0 ,
14+ "limit" : 21 ,
15+ "indexPrefix" : " cts_e2e ab" ,
16+ "indexSuffix" : " t"
17+ },
18+ "request" : {
19+ "path" : " /3/abtests" ,
20+ "method" : " GET" ,
21+ "queryParameters" : {
22+ "offset" : " 0" ,
23+ "limit" : " 21" ,
24+ "indexPrefix" : " cts_e2e%20ab" ,
25+ "indexSuffix" : " t"
26+ }
27+ }
28+ }
29+ ]
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" : " /3/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+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "testName" : " stopABTest" ,
4+ "parameters" : {
5+ "id" : 42
6+ },
7+ "request" : {
8+ "path" : " /3/abtests/42/stop" ,
9+ "method" : " POST"
10+ }
11+ }
12+ ]
You can’t perform that action at this time.
0 commit comments