I would like to run two/several files in parallel/serially using a single file
fileA.js
export let options = {
scenarios: {
funcA: {
exec: "funcA",
executor: "per-vu-iterations",
env: { id: 'funcA' },
},
},
thresholds: {
failedTestCases: [{ threshold: "count===0", abortOnFail: false }],
},
};
export function funcA() {
runA();
}
fileB.js
export let options = {
scenarios: {
funcB: {
exec: "funcB",
startTime: '30s',
executor: "per-vu-iterations",
env: { id: 'funcB' },
},
},
thresholds: {
failedTestCases: [{ threshold: "count===0", abortOnFail: false }],
},
};
export function funcB() {
runB();
}
I would like to run both the files fileA.js and fileB.js from a single file (start.js). Is there way do that without using the export default function ?
Note - I don’t want to combine two files using scenarios and run them. I am looking for a way to use a single file that automatically run both the files without using the default function in each file. I have like 300 such files and so combining will not work.
For example
k6 run start.js
→ it should run fileA.js
and fileB.js
in parallel or serially