I have two scenarios which I need to run in Parallel, each csv data file has 22 rows,
export const users = new SharedArray('another data name', function () {
// Load CSV file and parse it using Papa Parse
return papaparse.parse(open('file1.csv'), { header: true }).data;
})
export const users1 = new SharedArray('another data name', function () {
// Load CSV file and parse it using Papa Parse
return papaparse.parse(open('file2.csv'), { header: true }).data;
})
executor: 'ramping-vus',
startVUs: 0,
stages: [
{ target: 20, duration: '100s' },
{ target: 20, duration: '10m' },
export function testCase10_ProjectCrud() {
globalThis.chosenUser = users[vu.idInTest - 1];
console.log(`[VU: ${exec.vu.idInTest - 1}, iteration: ${exec.scenario.iterationInTest}] Starting iteration...ProjectCrud_EAV`);
loginHelper();
}
export function testCase11_ProjectCrud() {
globalThis.chosenUser = users1[vu.idInTest - 1];
console.log(`[VU: ${exec.vu.idInTest - 1}, iteration: ${exec.scenario.iterationInTest}] Starting iteration...ProjectCrud_EAV`);
loginHelper();
}
The problem is it run ok for 22 users, but starts looking for 23 and it fails…since there are 22 rows, but it should pick 20usersfrom first file and 20 from second file…
What is that i am doing wrong?