Skip to content

Commit

Permalink
test: Create ingestion verification test cases with parallel processi…
Browse files Browse the repository at this point in the history
…ng (#138)
  • Loading branch information
adebayor123 authored May 6, 2022
1 parent 5bb69d7 commit 9ff95b7
Show file tree
Hide file tree
Showing 6 changed files with 8,961 additions and 6,832 deletions.
15,428 changes: 8,607 additions & 6,821 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
"preinteg:local:nightwatch:firefox": "http-server ./build/dev -s &",
"integ:local:nightwatch:firefox": "nightwatch -e firefox",
"postinteg:local:nightwatch:firefox": "kill $(lsof -t -i:8080)",
"smoke:local": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT npx playwright test --config=playwright.local.config.ts --headed",
"smoke": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT npx playwright test --headed",
"smoke:headless": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT npx playwright test"
"smoke:local:headless": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT NAME=$NAME npx playwright test --config=playwright.local.config.ts",
"smoke:local": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT NAME=$NAME npx playwright test --config=playwright.local.config.ts --headed",
"smoke": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT NAME=$NAME npx playwright test --headed",
"smoke:headless": "cross-env URL=$URL MONITOR_ID=$MONITOR ENDPOINT=$ENDPOINT NAME=$NAME npx playwright test"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.16.0",
Expand Down Expand Up @@ -98,6 +99,7 @@
},
"dependencies": {
"@aws-crypto/sha256-js": "^1.1.0",
"@aws-sdk/client-rum": "^3.76.0",
"@aws-sdk/fetch-http-handler": "^3.36.0",
"@aws-sdk/protocol-http": "^3.36.0",
"@aws-sdk/signature-v4": "^3.36.0",
Expand Down
3 changes: 2 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const { devices } = require('@playwright/test');
const config = {
forbidOnly: !!process.env.CI,
testDir: 'src/__smoke-test__',
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 2 : 2,
timeout: 300000,
use: {
trace: 'on-first-retry'
},
Expand Down
7 changes: 4 additions & 3 deletions playwright.local.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ const { devices } = require('@playwright/test');
const config = {
forbidOnly: !!process.env.CI,
testDir: 'src/__smoke-test__',
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 2 : 2,
timeout: 300000,
webServer: {
command: 'npm run server',
url: 'http://localhost:8080/',
timeout: 120 * 1000,
url: 'http://localhost:9000/',
timeout: 300000,
reuseExistingServer: !process.env.CI
},
use: {
Expand Down
5 changes: 1 addition & 4 deletions src/__smoke-test__/dataplane-integ.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
// Environment variables set through CLI command
const ENDPOINT = process.env.ENDPOINT;
const MONITOR_ID = process.env.MONITOR;
const TEST_URL = process.env.URL || 'http://localhost:8080/smoke.html';
const TEST_URL = process.env.URL || 'http://localhost:9000/smoke.html';

const TARGET_URL = ENDPOINT + MONITOR_ID + '/';

Expand All @@ -29,9 +29,6 @@ function isDataPlaneRequest(response): boolean {
);
}

// Run the tests in parallel
test.describe.configure({ mode: 'parallel' });

test('when web client calls PutRumEvents then the response code is 200', async ({
page
}) => {
Expand Down
Loading

0 comments on commit 9ff95b7

Please sign in to comment.