Best approach to execute tests in parallel

Imagine you have 10 scripts, that simulate the most important happy flows of your web application and you have develop them in 10 separated js files.

Of course you can execute them isolated, but what happens if you want to analyze a real-world scenario and execute them in parallel, with specific and different user ditributions, ramp ups, etc… ?

I understand that one possible approach is to execute “k6 run XXX” in 10 consoles at the same time, but is this the best approach?

Thanks in advance,

Hi @andonima,

k6 allows to configure multiple scenarios that can run both in sequence using startTime parameter or in parallel. Right now your use case sounds as if there should be 1 test with 10 scenarios, all with startTime set to 0. And just one k6 run CLI command for the test. Would that work for your case?

Basic info on scenarios is here and advanced example are here.

2 Likes