Hi k6 community,
I am using k6 to setup a load test to know the mean request duration of uploading a file to microservice backend. And I really fall in love with k6! What a great tool.
For this use case I need to create a resource before I can upload files there. Usually I would do this in a setup phase. But I need this for each virtual user, before a VU can start sending files. But the setup function is once per test, not per VU. Unfortunately in init context it is also not possible. GoError: Making http requests in the init context is not supported
I will not implement the creation of resources in first iteration. Because this would affect my measurement. The metric should only include requests with file uploads.
I could solve this with a workaround: to setup all resources beforehand in another external script. But I would like to do everything in the k6 script. And I would not know the count of resources to create. (Count of VUs that will run later)
Is there a possibility to know the initial VU parameter count in setup phase? Then I could create the resources for all the initial users in setup phase. The only thing that would not work then, is the k6 scale approach.
Or are there any plans to include a lifecycle phase of a setup per vu?
best regards
Sebastian