Skip to content

Commit 9389888

Browse files
committed
test: run a Playwright TypeScript test on Fargate
1 parent a9f086a commit 9389888

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/artillery/test/cloud-e2e/fargate/misc.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const {
88
checkAggregateCounterSums
99
} = require('../../helpers/expectations');
1010

11+
const path = require('path');
12+
1113
const A9_PATH = process.env.A9_PATH || 'artillery';
1214

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

28+
test('Playwright test in TypeScript (example)', async (t) => {
29+
const scenarioPath = path.resolve(
30+
__dirname,
31+
'../../../../../examples/browser-load-testing-playwright/browser-load-test.ts'
32+
);
33+
const output =
34+
await $`${A9_PATH} run-fargate ${scenarioPath} --record --tags ${baseTags}`;
35+
t.ok(output.stdout.includes('Summary report'));
36+
t.ok(output.stdout.includes('p99'));
37+
t.ok(output.stdout.includes('vusers.completed'));
38+
t.ok(output.stdout.includes('browser.page.FCP.https://www.artillery.io/'));
39+
t.equal(output.exitCode, 0, 'CLI Exit Code should be 0');
40+
});
41+
2642
test('Kitchen Sink Test - multiple features together', async (t) => {
2743
const scenarioPath = `${__dirname}/fixtures/cli-kitchen-sink/kitchen-sink.yml`;
2844
const dotEnvPath = `${__dirname}/fixtures/cli-kitchen-sink/kitchen-sink-env`;

0 commit comments

Comments
 (0)