Today, it’s a beautiful day for me, raining, cold and I’m off work, so, I decided to make a 'chimarrão' and study a little bit, and I choose a great theme, k6 scenarios executors!
When we define scenarios in the k6 options, we can define the executor, and, with a brief reading about them, I wasn’t able to understand much, so I decided to do my best, and create a mind map with the basics about them.
With the mind map, I achieve a better understanding of each one, and i decided to share two of them with you guys:
constant-vus
This executor is simple and really useful, it makes constant iterations based on the number of VUs and duration that we configured. This is great to simulate a number of users making the same action at the same time. In real life, we could use this to test a stock trading system, and check how the system handles the amount of users buying or selling stocks at the same time.ramping-arrival-rate
This executor starts on a rate ( rate of interactions / time ) and for each stage it updates the rate based on what we configure. This is really useful, like, we could use this to make tests of system capacity, but instead of simulate a number of users using the system, we configure the number of iterations on each time, for example, we could define a start in 10 iterations per second and ramp up to 100 iterations per second, and see how the system handle it. In real life, we could use this to test an e-commerce system, simulating a slow start of sales, then, a ramp up simulates a lot of users buying at the same time, and after, ramp down.
I'm really excited about studying performance testing and k6 (I already have some experience with JMeter). It's great to learn how we can use these tests to ensure a system meets user needs and stakeholder expectations, while also confirming that the system can handle potential high usage or load.
Top comments (0)