The below code works for 1 VU but not mutiple VUs
export const options = { vus:2, iterations: 2, };
let jwtToken group("1. GET JWT", function () { = http.post(url, formData, { headers: headers }); }); group("2. GET PROFILE", function () { response = http.get('PROFILE-URL, { headers: { 'Authorization': `Bearer ${jwtToken}` } }); });
When run for 10 VUs,
9 of the VU will result in JWT token group returning undefined, and this undefined is pass to GROUP 2 which cause endpoint failure.
The other VU will success.
Please advice how can i make this works for mutiple VUs.