Hi all,
I need to create a test where k6 accesses a total of about 30 URLs on my application within an iteration. This is to mimic an interaction caused by user activity. Each of the URLs contains the ID of the user. In reality, the accesses to these URLs will come from a number of different client endpoints. Each endpoint will iterate through its subset of URLs in sequence, but all the endpoints will start their series of requests in parallel.
So the 30 URLs will be split, for example, into 6 groups, each containing 5 URLs. Within each group, the URLs need to be requested sequentially, waiting on the response to the previous request before sending the next, but I need all 6 groups to start their first request at the same time.
I’m finding it difficult to model this behaviour in K6 - is there any way I can define sequences up front then use http.batch to start each sequence simultaneously?
The closest way I can currently think of achieving this is to have a series of batches, each with 6 URLs (request 1 of each of the 6 clients in batch 1, request 2 of each of the 6 clients in batch 2, etc) but ideally I want to avoid this as it has the implicit restriction that no client can start request 2 until ALL clients have received a response to request 1, which isn’t ideal.
Any ideas would be appreciated.
Many thanks