Status of possibility to sequentially read json-data

Hi,
I’ve roamed around both the forum (for example http://grafana.staged-by-discourse.com/t/how-to-pick-get-users-in-sequence-0-1-2-from-json-files/95533/) and google to find an easy solution to the very common use case where you want to be able to chose a unique user from a json input file to login. At the company I work for it is not possible to login simultaneously with the same user. The random choosing of login credentials is therefore not an option for me. I’ve only seen complicated suggestions of achieving sequential reading in k6 but all of them are far from as simple as ticking a checkbox like in other tools like JMeter. Surely there must be plans for an option to set in k6 to read randomly or sequentially? Seems like a must have option in a load testing tool.

Thank you very much for an updated status of this issue.

Best regards
Fredrik

Hi @Lightlore,
it sounds like you are searching for the Retrieving unique data in the data-parameterization guide.

Let me know.

Hi @codebien ,
Aha, ok…

  • does it only support the shared-iterations executor or does it support all executors? I’m especially interested in support for the constant-arrival-rate executor.
  • I presume that when reaching the end of a test data file this functionality starts over from the top of the file again (i.e. row 1 again)? Thus supporting tests of all kinds of durations.

Ok then I’ll split up my 500k lines input file in…11 separate ones, one for each scenario I execute, to ensure unique input data for each iteration.

Thank you very much for that information.

Best regards
Fredrik