@@ -9,20 +9,20 @@ config:
9
9
name : Ramp up load
10
10
11
11
variables :
12
- campaignCode : " SIMPLIFIE"
12
+ campaignCode : SIMPLIFIE
13
13
14
14
scenarios :
15
15
- name : ' Inscription, participation à une campagne et partage des résultats'
16
16
flow :
17
- - function : " setupSignupFormData"
17
+ - function : setupSignupFormData
18
18
19
- # ## ---------------------- ###
20
- # ## From page /inscription ###
21
- # ## ---------------------- ###
19
+ # ## ---------------------- ###
20
+ # ## From page /inscription ###
21
+ # ## ---------------------- ###
22
22
23
23
# Submit user form
24
24
- post :
25
- url : " /api/users"
25
+ url : /api/users
26
26
json :
27
27
data :
28
28
attributes :
@@ -34,19 +34,19 @@ scenarios:
34
34
35
35
# Authenticate user
36
36
- post :
37
- url : " /api/token"
37
+ url : /api/token
38
38
headers :
39
- content-type : " application/x-www-form-urlencoded"
39
+ content-type : application/x-www-form-urlencoded
40
40
body : " grant_type=password&username={{ email }}&password={{ password }}"
41
41
capture :
42
- - json : " $.access_token"
43
- as : " accessToken"
44
- - json : " $.user_id"
45
- as : " userId"
42
+ - json : $.access_token
43
+ as : accessToken
44
+ - json : $.user_id
45
+ as : userId
46
46
47
47
# Get user profile
48
48
- get :
49
- url : " /api/users/me"
49
+ url : /api/users/me
50
50
headers :
51
51
Authorization : " Bearer {{ accessToken }}"
52
52
@@ -56,37 +56,37 @@ scenarios:
56
56
headers :
57
57
Authorization : " Bearer {{ accessToken }}"
58
58
59
- # ## ----------------- ###
60
- # ## From page /compte ###
61
- # ## ----------------- ###
59
+ # ## ----------------- ###
60
+ # ## From page /compte ###
61
+ # ## ----------------- ###
62
62
63
63
# Get campaign target
64
64
- get :
65
65
url : " /api/campaigns?filter[code]={{ campaignCode }}"
66
66
headers :
67
67
Authorization : " Bearer {{ accessToken }}"
68
68
capture :
69
- json : " $.data.id"
70
- as : " campaignId"
69
+ json : $.data.id
70
+ as : campaignId
71
71
72
72
# Create campaign-participation
73
73
- post :
74
- url : " /api/campaign-participations"
74
+ url : /api/campaign-participations
75
75
headers :
76
76
Authorization : " Bearer {{ accessToken }}"
77
77
json :
78
78
data :
79
- type : " campaign-participations"
79
+ type : campaign-participations
80
80
attributes :
81
81
participant-external-id : null
82
82
relationships :
83
83
campaign :
84
84
data :
85
85
id : " {{ campaignId }}"
86
- type : " campaigns"
86
+ type : campaigns
87
87
capture :
88
- json : " $.data.id"
89
- as : " campaignParticipationId"
88
+ json : $.data.id
89
+ as : campaignParticipationId
90
90
91
91
# Get campaign assessment filtered
92
92
- get :
@@ -95,7 +95,7 @@ scenarios:
95
95
Authorization : " Bearer {{ accessToken }}"
96
96
capture :
97
97
json : " $.data[0].id"
98
- as : " assessmentId"
98
+ as : assessmentId
99
99
100
100
# Fetch assessment
101
101
- get :
@@ -109,8 +109,8 @@ scenarios:
109
109
headers :
110
110
Authorization : " Bearer {{ accessToken }}"
111
111
capture :
112
- json : " $.data.id"
113
- as : " challengeId"
112
+ json : $.data.id
113
+ as : challengeId
114
114
115
115
- loop :
116
116
# Fetch answer (if exists)
@@ -119,13 +119,13 @@ scenarios:
119
119
headers :
120
120
Authorization : " Bearer {{ accessToken }}"
121
121
122
- # ## -------------------------------------------------------------- ###
123
- # ## From page /assessments/:assessment_id/challenges/:challenge_id ###
124
- # ## -------------------------------------------------------------- ###
122
+ # ## -------------------------------------------------------------- ###
123
+ # ## From page /assessments/:assessment_id/challenges/:challenge_id ###
124
+ # ## -------------------------------------------------------------- ###
125
125
126
126
# Submit "skip" answer
127
127
- post :
128
- url : " /api/answers"
128
+ url : /api/answers
129
129
headers :
130
130
Authorization : " Bearer {{ accessToken }}"
131
131
json :
@@ -136,21 +136,21 @@ scenarios:
136
136
assessment :
137
137
data :
138
138
id : " {{ assessmentId }}"
139
- type : " assessments"
139
+ type : assessments
140
140
challenge :
141
141
data :
142
142
id : " {{ challengeId }}"
143
- type : " challenges"
144
- type : " answers"
143
+ type : challenges
144
+ type : answers
145
145
146
146
# Fetch assessment next challenge
147
147
- get :
148
148
url : " /api/assessments/{{ assessmentId }}/next"
149
149
headers :
150
150
Authorization : " Bearer {{ accessToken }}"
151
- afterResponse : " handleResponseForChallengeId"
151
+ afterResponse : handleResponseForChallengeId
152
152
153
- whileTrue : " foundNextChallenge"
153
+ whileTrue : foundNextChallenge
154
154
155
155
# Complete assessment
156
156
- patch :
@@ -170,13 +170,13 @@ scenarios:
170
170
headers :
171
171
Authorization : " Bearer {{ accessToken }}"
172
172
173
- # ## ----------------------------------------------------- ###
174
- # ## From page /assessment-result, go back to profile page ###
175
- # ## ----------------------------------------------------- ###
173
+ # ## ----------------------------------------------------- ###
174
+ # ## From page /assessment-result, go back to profile page ###
175
+ # ## ----------------------------------------------------- ###
176
176
177
177
# Get user profile
178
178
- get :
179
- url : " /api/users/me"
179
+ url : /api/users/me
180
180
headers :
181
181
Authorization : " Bearer {{ accessToken }}"
182
182
0 commit comments