Skip to content

Commit

Permalink
test: run a Playwright TypeScript test on Fargate
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy committed Dec 17, 2024
1 parent a9f086a commit 9389888
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/artillery/test/cloud-e2e/fargate/misc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const {
checkAggregateCounterSums
} = require('../../helpers/expectations');

const path = require('path');

const A9_PATH = process.env.A9_PATH || 'artillery';

before(async () => {
Expand All @@ -23,6 +25,20 @@ beforeEach(async (t) => {
reportFilePath = generateTmpReportPath(t.name, 'json');
});

test('Playwright test in TypeScript (example)', async (t) => {
const scenarioPath = path.resolve(
__dirname,
'../../../../../examples/browser-load-testing-playwright/browser-load-test.ts'
);
const output =
await $`${A9_PATH} run-fargate ${scenarioPath} --record --tags ${baseTags}`;
t.ok(output.stdout.includes('Summary report'));
t.ok(output.stdout.includes('p99'));
t.ok(output.stdout.includes('vusers.completed'));
t.ok(output.stdout.includes('browser.page.FCP.https://www.artillery.io/'));
t.equal(output.exitCode, 0, 'CLI Exit Code should be 0');
});

test('Kitchen Sink Test - multiple features together', async (t) => {
const scenarioPath = `${__dirname}/fixtures/cli-kitchen-sink/kitchen-sink.yml`;
const dotEnvPath = `${__dirname}/fixtures/cli-kitchen-sink/kitchen-sink-env`;
Expand Down

0 comments on commit 9389888

Please sign in to comment.