[load] run puppeteer script before gatling scenarios (#104836)
* [load] puppeteer script before load testing * install dependencies after metricbeat configuration Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
b8dfcafe38
commit
216bb5e1b8
|
@ -53,6 +53,9 @@ echo "cloud.auth: ${USER_FROM_VAULT}:${PASS_FROM_VAULT}" >> cfg/metricbeat/metri
|
|||
cp cfg/metricbeat/metricbeat.yml $KIBANA_DIR/metricbeat-install/metricbeat.yml
|
||||
# Disable system monitoring: enabled for now to have more data
|
||||
#mv $KIBANA_DIR/metricbeat-install/modules.d/system.yml $KIBANA_DIR/metricbeat-install/modules.d/system.yml.disabled
|
||||
echo " -> Building puppeteer project"
|
||||
cd puppeteer
|
||||
yarn install && yarn build
|
||||
popd
|
||||
|
||||
# doesn't persist, also set in kibanaPipeline.groovy
|
||||
|
|
|
@ -18,6 +18,7 @@ const simulationPackage = 'org.kibanaLoadTest.simulation';
|
|||
const simulationFIleExtension = '.scala';
|
||||
const gatlingProjectRootPath: string =
|
||||
process.env.GATLING_PROJECT_PATH || resolve(REPO_ROOT, '../kibana-load-testing');
|
||||
const puppeteerProjectRootPath: string = resolve(gatlingProjectRootPath, 'puppeteer');
|
||||
const simulationEntry: string = process.env.GATLING_SIMULATIONS || 'branch.DemoJourney';
|
||||
|
||||
if (!Fs.existsSync(gatlingProjectRootPath)) {
|
||||
|
@ -52,6 +53,15 @@ 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('gatling: test', {
|
||||
cmd: 'mvn',
|
||||
|
|
Loading…
Reference in a new issue