[load testing] run pupeteeer scenario based on simulation class (#119778) (#119830)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
This commit is contained in:
Kibana Machine 2021-11-29 08:38:08 -05:00 committed by GitHub
parent 72359d39ea
commit f5a7989396
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,16 +57,20 @@ export async function GatlingTestRunner({ getService }: FtrProviderContext) {
const log = getService('log');
await withProcRunner(log, async (procs) => {
await procs.run('node build/index.js', {
cmd: 'node',
args: ['build/index.js'],
cwd: puppeteerProjectRootPath,
env: {
...process.env,
},
wait: true,
});
for (let i = 0; i < simulationClasses.length; i++) {
await procs.run('node build/index.js', {
cmd: 'node',
args: [
'build/index.js',
`--simulation='${simulationClasses[i]}'`,
`--config='./config.json'`,
],
cwd: puppeteerProjectRootPath,
env: {
...process.env,
},
wait: true,
});
await procs.run('gatling: test', {
cmd: 'mvn',
args: [