Is there a feature or a workaround to support dynamic stages in ramping arrival rate executor which means mid way during the test the k6 script can modify the stage or target rps and duration ?
I need it to find a breaking point for my service using a binary search way for which i need to have dynamic stages
Can you provide more details to your use case, a better still a script you are working on with a potential workaround that you are having to use to make k6 do what you want it to do.
It sounds like you want a system whereby it would:
Start a load test with n VUs
When the thresholds or some heuristic has been crossed, it should stop the test and start again where n is half what it was before.
If the test passes and no thresholds or heuristics are crossed, it should start the test again by doubling the VUs.
Repeat this process until it finds a sweet spot where the load test just causes your system to under perform.
yes the idea is same but for i can put in a high number of VUs , I am more interested in changing the stages field . I plan to use ramping arrival rate executor but want to change stages dynamically in between running of executions . Looking at documentation of k6 its not possible to do that
That is correct, there is no way to dynamically change the VU count of an executor during runtime. Can you show me with pseudo code how you would envision this to work? I would expect there to be a need of some sort of heuristic that needs to be met so that the VU count is changed, how would that be scripted into the test?
I thought that the PATCH operation in k6’s REST API would generally be the way to do this, but thought I read somewhere that not all executor types are supported.
I did do something like this through the use of environment variables. I had users input the start calls per minute, end calls per minute and if they wanted a ramping or constant test and then has the test parse all that info to create scenarios based on them with the following code