CSV File:
-201 rows with different values/data each row.
Actual Load Test File:
*201 VUs
*Peak Load Stages:
1m=201VUs,
3m=201VUs,
1m=0 VUs.
*No fixed Iteration.
*Duration is 5 minutes
My goal:
I want each VUs to have its own data row from the CSV file, that they will use for all the processes/enpoints in my default function. Then those VUs with their assigned data row will loop concurrently in any number of iteration. So in this way, any VUs will not have any same data to each other fellow VUs while looping. Because as of now, Im getting an error in some of the endpoints since some VUs are sharing same data.
1 data row from CSV = 1 VU
Example :
-Row A is to be used only for Virtual User A --then iterate/loop using the same data (row A)
-Row B is to be used only for Virtual User B --then iterate/loop using the same data (row B)
-Row C is to be used only for Virtual User C --then iterate/loop using the same data (row C)
…and so forth
…each VUs iterating/looping in parallel (as how k6 VUs normally work as far as I know, correct me if I’m wrong.)
Hi @mstoykov , thanks for reaching out! Upon checking, the sample code given on the link you gave is using JSON file as its external data resource. I am using CSV. Do I need to change something on the sample code for it to be used for CSV? I am using papaparse and shared array btw. Or should I just convert my CSV into JSON for ease of access? Lol. Thanks!
The data source type doesn’t matter here - what’s important is calculating the unique number as that will be the position in the data source we pull the data from.
Thanks @mark@mstoykov. I’m basically new here in k6 so your help means a lot to me. Will check and will try it out. Forgive me if I might update here or ask for some additional inquiries/clarification I might need to confirm. Thank you so much!