I have a series of tests that I need to launch in a nightly regression.
What could be the best mechanism to do that in a server ?
As my objective is be able to launch the test line in a package.json to run the series of tests by npm run myloadtests
I am not certain I understand your question completely: Do you have some amount of k6 scripts and want to run some subset of them? Or all of them one after the other?
Both are more or less not supported in k6 currently, but you can use a shell script(for example) to make both of those cases work.
As an additional note: k6 is not nodejs based and as such doesn’t understand package.json or npm. But you can instead of shell script write a nodejs script to run k6. And I am pretty sure npm also had similar capabilities.
You can technically create one script using scenarios and import the others by combining the ideas from How would I go about executing multiple script files in a single run? - #2 by simme and How to run multi-scenario functional test in parallel with x second interval window? , but I would argue a small shell script will be much easier .
yes man, one after the other is what I need to implement.