Facing issues like variable name not defined while calling the unique value from csv file as variable in Http request
How variable been defined:
const users = new SharedArray(“users”, function () {
return papaparse.parse(open(‘./data.csv’), { header: true }).data;
});
export default function () {
let user = users[exec.scenario.iterationInTest % users.length];
console.log(‘user:’, user.username);
}
HTTP Request:
// LoginPage
response = http.post(
‘https://xxxx-yyyy.com/login’,
{
Email: user.username,
Password: ‘XXXX’,
NewAuth: ‘true’,
}
Error encountered ERRO[0011] ReferenceError: user is not defined
Thanks