recently I start to do performance testing with k6.
I want to test my resource( in this case, apps, dashboards, and ect : are my resource) which will change depending on the number of users, for example, for each user I will have 5 apps and 6 dashboards, which means if I have 5 users the number of App will be 25, and the number of dashboards will be 30.
Is there any way in k6 that I can define this calculation before test runs and depend on the number of users my test simulates the different amount of resources?
Thanks for your fast reply
Can you please confirm that when I define the resources in this way and then run my test ( which can be for example; log in to a system) actually it will run my test in a system that has already 30 dashboards and 20 spaces).
and I can say I measure how fast the system can react with those number of resources.
Sorry, I’m not sure what you mean by “dashboards” and “spaces”. Can you provide a working example of your script?
The example I gave you would execute those functions a varying amount of times depending on the K6_VUS environment variable you set when running the script. It’s up to you to code whatever logic you need, including checking if the resource already exists or not.
unfortunately, I have no script for it, I just got the scenarios and I need to find out how to estimate the resource requirements based on the growing customer.
I know it is not an easy topic, I can give a real-world example :
imagine we want to test a bus and tell the company how many passengers can go with this bus and without having an effect on the speed of the bus.
what we do not do is, for this test we don’t ask real people to come and seat on the bus we might use some mannequins with different weight. and then start to test the bus with a different number of resources (which here are mannequins) to say the limit of this bus is how many passengers.
and in a scenario that I have, I need to define my own resources to have the amount of traffic that a certain number of users can bring to the portal. and since I don’t want to add them manually one by one in a portal I should find a way to simulate or inject the JSON file or etc… to first have a ready environment and then run my test ( can be anything like login process for a system with 200 apps and so on … )
I hope I was able to explain what I am looking for
However, thanks for your help and, as soon as I found a way I will add the solution here, to share with others.
p.s. : it might be that I need to provide the environment setup in other tools and somehow rum my normal k6 test just against the defined environment. (I’m testing a cloud-based application therefore i don’t want to deploy a lot of resource for the test directly in our cloud i try to add the resource on my machine only )