diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43edc616f74b..4b9d5ec1f8be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -749,7 +749,7 @@ jobs: yarn test:integration:ci job_e2e_tests: - name: E2E Tests + name: E2E Tests (Shard ${{ matrix.shard }}) # We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks # Dependabot PRs sadly also don't have access to secrets, so we skip them as well if: @@ -758,6 +758,10 @@ jobs: needs: [job_get_metadata, job_build] runs-on: ubuntu-20.04 timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v3 @@ -782,6 +786,8 @@ jobs: E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }} E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks' E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests' + E2E_TEST_SHARD: ${{ matrix.shard }} + E2E_TEST_SHARD_AMOUNT: 3 run: | cd packages/e2e-tests yarn test:e2e diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index a0bff1d37b61..d3968a0dfb75 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -20,7 +20,7 @@ jobs: job_canary_test: name: Canary Tests runs-on: ubuntu-20.04 - timeout-minutes: 30 + timeout-minutes: 60 steps: - name: 'Check out current commit' uses: actions/checkout@v3 diff --git a/packages/e2e-tests/.env.example b/packages/e2e-tests/.env.example index 559550968130..2262e0fa6ccc 100644 --- a/packages/e2e-tests/.env.example +++ b/packages/e2e-tests/.env.example @@ -2,3 +2,6 @@ E2E_TEST_AUTH_TOKEN= E2E_TEST_DSN= E2E_TEST_SENTRY_ORG_SLUG= E2E_TEST_SENTRY_TEST_PROJECT= +E2E_TEST_SHARD= # optional +E2E_TEST_SHARD_AMOUNT= # optional +CANARY_E2E_TEST= # optional diff --git a/packages/e2e-tests/README.md b/packages/e2e-tests/README.md index d8227481a25a..2d8db0f5b41f 100644 --- a/packages/e2e-tests/README.md +++ b/packages/e2e-tests/README.md @@ -54,7 +54,7 @@ To get you started with the recipe, you can copy the following into `test-recipe { "$schema": "../../test-recipe-schema.json", "testApplicationName": "My New Test Application", - "buildCommand": "yarn install --network-concurrency 1", + "buildCommand": "yarn install", "tests": [ { "testName": "My new test", diff --git a/packages/e2e-tests/lib/buildApp.ts b/packages/e2e-tests/lib/buildApp.ts index e802d691e96a..15b9e0497cdc 100644 --- a/packages/e2e-tests/lib/buildApp.ts +++ b/packages/e2e-tests/lib/buildApp.ts @@ -1,13 +1,14 @@ /* eslint-disable no-console */ import * as fs from 'fs-extra'; +import * as os from 'os'; import * as path from 'path'; import { DEFAULT_BUILD_TIMEOUT_SECONDS } from './constants'; import type { Env, RecipeInstance } from './types'; -import { spawnAsync } from './utils'; +import { prefixObjectKeys, spawnAsync } from './utils'; -export async function buildApp(appDir: string, recipeInstance: RecipeInstance, env: Env): Promise { +export async function buildApp(appDir: string, recipeInstance: RecipeInstance, envVars: Env): Promise { const { recipe, label, dependencyOverrides } = recipeInstance; const packageJsonPath = path.resolve(appDir, 'package.json'); @@ -28,13 +29,23 @@ export async function buildApp(appDir: string, recipeInstance: RecipeInstance, e if (recipe.buildCommand) { console.log(`Running build command for test application "${label}"`); + fs.mkdirSync(path.join(os.tmpdir(), 'e2e-test-yarn-caches'), { recursive: true }); + const tempYarnCache = fs.mkdtempSync(path.join(os.tmpdir(), 'e2e-test-yarn-caches', 'cache-')); + + const env = { + ...process.env, + ...envVars, + YARN_CACHE_FOLDER: tempYarnCache, // Use a separate yarn cache for each build commmand because multiple yarn commands running at the same time may corrupt the cache + }; + const buildResult = await spawnAsync(recipe.buildCommand, { cwd: appDir, timeout: (recipe.buildTimeoutSeconds ?? DEFAULT_BUILD_TIMEOUT_SECONDS) * 1000, env: { - ...process.env, ...env, - } as unknown as NodeJS.ProcessEnv, + ...prefixObjectKeys(env, 'NEXT_PUBLIC_'), + ...prefixObjectKeys(env, 'REACT_APP_'), + }, }); if (buildResult.error) { @@ -57,9 +68,10 @@ export async function buildApp(appDir: string, recipeInstance: RecipeInstance, e cwd: appDir, timeout: (recipe.buildTimeoutSeconds ?? DEFAULT_BUILD_TIMEOUT_SECONDS) * 1000, env: { - ...process.env, ...env, - } as unknown as NodeJS.ProcessEnv, + ...prefixObjectKeys(env, 'NEXT_PUBLIC_'), + ...prefixObjectKeys(env, 'REACT_APP_'), + }, }, buildResult.stdout, ); diff --git a/packages/e2e-tests/lib/buildRecipeInstances.ts b/packages/e2e-tests/lib/constructRecipeInstances.ts similarity index 66% rename from packages/e2e-tests/lib/buildRecipeInstances.ts rename to packages/e2e-tests/lib/constructRecipeInstances.ts index 2820c2e055ce..86dfd1ef89f2 100644 --- a/packages/e2e-tests/lib/buildRecipeInstances.ts +++ b/packages/e2e-tests/lib/constructRecipeInstances.ts @@ -2,13 +2,11 @@ import * as fs from 'fs'; import type { Recipe, RecipeInput, RecipeInstance } from './types'; -export function buildRecipeInstances(recipePaths: string[]): RecipeInstance[] { +export function constructRecipeInstances(recipePaths: string[]): RecipeInstance[] { const recipes = buildRecipes(recipePaths); - const recipeInstances: RecipeInstance[] = []; + const recipeInstances: Omit[] = []; - const basePort = 3001; - - recipes.forEach((recipe, i) => { + recipes.forEach(recipe => { recipe.versions.forEach(version => { const dependencyOverrides = Object.keys(version.dependencyOverrides).length > 0 ? version.dependencyOverrides : undefined; @@ -20,12 +18,19 @@ export function buildRecipeInstances(recipePaths: string[]): RecipeInstance[] { label: `${recipe.testApplicationName}${dependencyOverridesInformationString}`, recipe, dependencyOverrides, - port: basePort + i, }); }); }); - return recipeInstances; + return recipeInstances + .map((instance, i) => ({ ...instance, portModulo: i, portGap: recipeInstances.length })) + .filter((_, i) => { + if (process.env.E2E_TEST_SHARD && process.env.E2E_TEST_SHARD_AMOUNT) { + return (i + Number(process.env.E2E_TEST_SHARD)) % Number(process.env.E2E_TEST_SHARD_AMOUNT) === 0; + } else { + return true; + } + }); } function buildRecipes(recipePaths: string[]): Recipe[] { diff --git a/packages/e2e-tests/lib/runAllTestApps.ts b/packages/e2e-tests/lib/runAllTestApps.ts index b12a0ccb2bdb..4f2e405d58aa 100644 --- a/packages/e2e-tests/lib/runAllTestApps.ts +++ b/packages/e2e-tests/lib/runAllTestApps.ts @@ -1,5 +1,9 @@ /* eslint-disable no-console */ -import { buildRecipeInstances } from './buildRecipeInstances'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as path from 'path'; + +import { constructRecipeInstances } from './constructRecipeInstances'; import { buildAndTestApp } from './runTestApp'; import type { RecipeInstance, RecipeTestResult } from './types'; @@ -7,9 +11,9 @@ export async function runAllTestApps( recipePaths: string[], envVarsToInject: Record, ): Promise { - const maxParallel = process.env.CI ? 2 : 5; + const maxParallel = process.env.CI ? 1 : 1; // For now we are disabling parallel execution because it was causing problems (runners were too slow and timeouts happened) - const recipeInstances = buildRecipeInstances(recipePaths); + const recipeInstances = constructRecipeInstances(recipePaths); const results = await shardPromises( recipeInstances, @@ -33,6 +37,8 @@ export async function runAllTestApps( const failed = results.filter(result => result.buildFailed || result.testFailed); + fs.rmSync(path.join(os.tmpdir(), 'e2e-test-yarn-caches'), { force: true, recursive: true }); + if (failed.length) { console.log(`${failed.length} test(s) failed.`); process.exit(1); diff --git a/packages/e2e-tests/lib/runTestApp.ts b/packages/e2e-tests/lib/runTestApp.ts index f38740fe5dd0..22dbdb9c5693 100644 --- a/packages/e2e-tests/lib/runTestApp.ts +++ b/packages/e2e-tests/lib/runTestApp.ts @@ -15,7 +15,7 @@ export async function buildAndTestApp( recipeInstance: RecipeInstance, envVarsToInject: Record, ): Promise { - const { recipe, port } = recipeInstance; + const { recipe, portModulo, portGap } = recipeInstance; const recipeDirname = path.dirname(recipe.path); const targetDir = path.join(TMP_DIR, `${recipe.testApplicationName}-${tmpDirCount++}`); @@ -24,7 +24,8 @@ export async function buildAndTestApp( const env: Env = { ...envVarsToInject, - PORT: port.toString(), + PORT_MODULO: portModulo.toString(), + PORT_GAP: portGap.toString(), }; try { diff --git a/packages/e2e-tests/lib/testApp.ts b/packages/e2e-tests/lib/testApp.ts index e25418662c38..02743c26f633 100644 --- a/packages/e2e-tests/lib/testApp.ts +++ b/packages/e2e-tests/lib/testApp.ts @@ -2,7 +2,7 @@ import { DEFAULT_TEST_TIMEOUT_SECONDS } from './constants'; import type { Env, RecipeInstance, TestDef, TestResult } from './types'; -import { spawnAsync } from './utils'; +import { prefixObjectKeys, spawnAsync } from './utils'; export async function testApp(appDir: string, recipeInstance: RecipeInstance, env: Env): Promise { const { recipe } = recipeInstance; @@ -15,17 +15,28 @@ export async function testApp(appDir: string, recipeInstance: RecipeInstance, en return results; } -async function runTest(appDir: string, recipeInstance: RecipeInstance, test: TestDef, env: Env): Promise { +async function runTest( + appDir: string, + recipeInstance: RecipeInstance, + test: TestDef, + envVars: Env, +): Promise { const { recipe, label } = recipeInstance; console.log(`Running test command for test application "${label}", test "${test.testName}"`); + const env = { + ...process.env, + ...envVars, + }; + const testResult = await spawnAsync(test.testCommand, { cwd: appDir, timeout: (recipe.testTimeoutSeconds ?? DEFAULT_TEST_TIMEOUT_SECONDS) * 1000, env: { - ...process.env, ...env, - } as unknown as NodeJS.ProcessEnv, + ...prefixObjectKeys(env, 'NEXT_PUBLIC_'), + ...prefixObjectKeys(env, 'REACT_APP_'), + }, }); if (testResult.error) { diff --git a/packages/e2e-tests/lib/types.ts b/packages/e2e-tests/lib/types.ts index c78bc45b6bf5..a86c748ef6d0 100644 --- a/packages/e2e-tests/lib/types.ts +++ b/packages/e2e-tests/lib/types.ts @@ -37,7 +37,8 @@ export interface RecipeInstance { label: string; recipe: Recipe; dependencyOverrides?: DependencyOverrides; - port: number; + portModulo: number; + portGap: number; } export interface RecipeTestResult extends RecipeInstance { diff --git a/packages/e2e-tests/lib/utils.ts b/packages/e2e-tests/lib/utils.ts index caf2cf424171..0c786a34f520 100644 --- a/packages/e2e-tests/lib/utils.ts +++ b/packages/e2e-tests/lib/utils.ts @@ -67,3 +67,13 @@ export function spawnAsync( } }); } + +export function prefixObjectKeys( + obj: Record, + prefix: string, +): Record { + return Object.keys(obj).reduce>((result, key) => { + result[prefix + key] = obj[key]; + return result; + }, {}); +} diff --git a/packages/e2e-tests/run.ts b/packages/e2e-tests/run.ts index a4fec2c480dc..29ab6797edcc 100644 --- a/packages/e2e-tests/run.ts +++ b/packages/e2e-tests/run.ts @@ -18,6 +18,7 @@ async function run(): Promise { const envVarsToInject = { REACT_APP_E2E_TEST_DSN: process.env.E2E_TEST_DSN, NEXT_PUBLIC_E2E_TEST_DSN: process.env.E2E_TEST_DSN, + BASE_PORT: '27496', // just some random port }; try { diff --git a/packages/e2e-tests/test-applications/create-next-app/package.json b/packages/e2e-tests/test-applications/create-next-app/package.json index dee9275c2bdc..af2a7830f3d8 100644 --- a/packages/e2e-tests/test-applications/create-next-app/package.json +++ b/packages/e2e-tests/test-applications/create-next-app/package.json @@ -3,13 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", "build": "next build", - "start": "next start", - "lint": "next lint", - "test": "test:prod && test:dev", - "test:prod": "TEST_MODE=prod playwright test", - "test:dev": "TEST_MODE=dev playwright test" + "test:prod": "TEST_ENV=prod playwright test", + "test:dev": "TEST_ENV=dev playwright test" }, "dependencies": { "@next/font": "13.0.7", diff --git a/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts b/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts index b2c8ace9d92d..3d47581acf13 100644 --- a/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts +++ b/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts @@ -1,6 +1,14 @@ import type { PlaywrightTestConfig } from '@playwright/test'; import { devices } from '@playwright/test'; +const testEnv = process.env.TEST_ENV; + +if (!testEnv) { + throw new Error('No test env defined'); +} + +const port = Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO); + /** * See https://playwright.dev/docs/test-configuration. */ @@ -59,8 +67,8 @@ const config: PlaywrightTestConfig = { /* Run your local dev server before starting the tests */ webServer: { - command: process.env.TEST_MODE === 'prod' ? 'yarn start' : 'yarn dev', - port: process.env.PORT ? parseInt(process.env.PORT) : 3000, + command: testEnv === 'development' ? `yarn next dev -p ${port}` : `yarn next start -p ${port}`, + port, }, }; diff --git a/packages/e2e-tests/test-applications/create-next-app/test-recipe.json b/packages/e2e-tests/test-applications/create-next-app/test-recipe.json index 141f9e1489c1..38b4bbc06af0 100644 --- a/packages/e2e-tests/test-applications/create-next-app/test-recipe.json +++ b/packages/e2e-tests/test-applications/create-next-app/test-recipe.json @@ -1,7 +1,7 @@ { "$schema": "../../test-recipe-schema.json", "testApplicationName": "create-next-app", - "buildCommand": "yarn install --network-concurrency 1 && npx playwright install && yarn build", + "buildCommand": "yarn install && npx playwright install && yarn build", "tests": [ { "testName": "Playwright tests - Prod Mode", diff --git a/packages/e2e-tests/test-applications/create-react-app/test-recipe.json b/packages/e2e-tests/test-applications/create-react-app/test-recipe.json index 3f3c496c4857..ee9c8e1dc40c 100644 --- a/packages/e2e-tests/test-applications/create-react-app/test-recipe.json +++ b/packages/e2e-tests/test-applications/create-react-app/test-recipe.json @@ -1,6 +1,6 @@ { "$schema": "../../test-recipe-schema.json", "testApplicationName": "create-react-app", - "buildCommand": "yarn install --network-concurrency 1 && yarn build", + "buildCommand": "yarn install && yarn build", "tests": [] } diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/package.json b/packages/e2e-tests/test-applications/nextjs-app-dir/package.json index 064e5d396d1f..4e0c1831440f 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/package.json +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/package.json @@ -3,10 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", "build": "next build", - "start": "next start", - "lint": "next lint", "test:prod": "TEST_ENV=production playwright test", "test:dev": "TEST_ENV=development playwright test" }, diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts index 2bacdad88e2e..a6886d2d8308 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts @@ -7,7 +7,7 @@ if (!testEnv) { throw new Error('No test env defined'); } -const port = process.env.PORT ? parseInt(process.env.PORT) : 3000; +const port = Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO); /** * See https://playwright.dev/docs/test-configuration. @@ -55,12 +55,12 @@ const config: PlaywrightTestConfig = { /* Run your local dev server before starting the tests */ webServer: [ { - command: testEnv === 'development' ? 'yarn dev' : 'yarn start', + command: testEnv === 'development' ? `yarn next dev -p ${port}` : `yarn next start -p ${port}`, port, }, { command: 'yarn ts-node-script start-event-proxy.ts', - port: 27496, + port: Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO) + Number(process.env.PORT_GAP), }, ], }; diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts index af39dd76f384..b216b06f752c 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts @@ -2,6 +2,10 @@ import * as Sentry from '@sentry/nextjs'; Sentry.init({ dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: 'http://localhost:27496/', // proxy server + tunnel: `http://localhost:${ + Number(process.env.NEXT_PUBLIC_BASE_PORT) + + Number(process.env.NEXT_PUBLIC_PORT_MODULO) + + Number(process.env.NEXT_PUBLIC_PORT_GAP) + }/`, // proxy server tracesSampleRate: 1.0, }); diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts index af39dd76f384..b216b06f752c 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts @@ -2,6 +2,10 @@ import * as Sentry from '@sentry/nextjs'; Sentry.init({ dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: 'http://localhost:27496/', // proxy server + tunnel: `http://localhost:${ + Number(process.env.NEXT_PUBLIC_BASE_PORT) + + Number(process.env.NEXT_PUBLIC_PORT_MODULO) + + Number(process.env.NEXT_PUBLIC_PORT_GAP) + }/`, // proxy server tracesSampleRate: 1.0, }); diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts index af39dd76f384..b216b06f752c 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts @@ -2,6 +2,10 @@ import * as Sentry from '@sentry/nextjs'; Sentry.init({ dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN, - tunnel: 'http://localhost:27496/', // proxy server + tunnel: `http://localhost:${ + Number(process.env.NEXT_PUBLIC_BASE_PORT) + + Number(process.env.NEXT_PUBLIC_PORT_MODULO) + + Number(process.env.NEXT_PUBLIC_PORT_GAP) + }/`, // proxy server tracesSampleRate: 1.0, }); diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts b/packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts index c4b99606e9bb..705af6e98a7a 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts @@ -1,6 +1,6 @@ import { startEventProxyServer } from '../../test-utils/event-proxy-server'; startEventProxyServer({ - port: 27496, + port: Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO) + Number(process.env.PORT_GAP), proxyServerName: 'nextjs-13-app-dir', }); diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json b/packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json index 4f6290d444d0..b711dd6e922c 100644 --- a/packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json +++ b/packages/e2e-tests/test-applications/nextjs-app-dir/test-recipe.json @@ -1,7 +1,7 @@ { "$schema": "../../test-recipe-schema.json", "testApplicationName": "nextjs-13-app-dir", - "buildCommand": "yarn install --network-concurrency 1 && npx playwright install && yarn build", + "buildCommand": "yarn install && npx playwright install && yarn build", "buildAssertionCommand": "yarn ts-node --script-mode assert-build.ts", "tests": [ { diff --git a/packages/e2e-tests/test-applications/node-express-app/playwright.config.ts b/packages/e2e-tests/test-applications/node-express-app/playwright.config.ts index ef7bf3704715..d3690ad2c8fd 100644 --- a/packages/e2e-tests/test-applications/node-express-app/playwright.config.ts +++ b/packages/e2e-tests/test-applications/node-express-app/playwright.config.ts @@ -58,7 +58,7 @@ const config: PlaywrightTestConfig = { /* Run your local dev server before starting the tests */ webServer: { command: 'yarn start', - port: process.env.PORT ? parseInt(process.env.PORT) : 3000, + port: Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO), }, }; diff --git a/packages/e2e-tests/test-applications/node-express-app/src/app.ts b/packages/e2e-tests/test-applications/node-express-app/src/app.ts index ec4a5c73fcb6..005c83390ec8 100644 --- a/packages/e2e-tests/test-applications/node-express-app/src/app.ts +++ b/packages/e2e-tests/test-applications/node-express-app/src/app.ts @@ -17,7 +17,7 @@ Sentry.init({ }); const app = express(); -const port = process.env.PORT ? parseInt(process.env.PORT) : 3000; +const port = Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO); app.use(Sentry.Handlers.requestHandler()); app.use(Sentry.Handlers.tracingHandler()); diff --git a/packages/e2e-tests/test-applications/node-express-app/test-recipe.json b/packages/e2e-tests/test-applications/node-express-app/test-recipe.json index 4859973cd360..039049258171 100644 --- a/packages/e2e-tests/test-applications/node-express-app/test-recipe.json +++ b/packages/e2e-tests/test-applications/node-express-app/test-recipe.json @@ -1,7 +1,7 @@ { "$schema": "../../test-recipe-schema.json", "testApplicationName": "node-express-app", - "buildCommand": "yarn install --network-concurrency 1 && yarn build", + "buildCommand": "yarn install && yarn build", "tests": [ { "testName": "Test express server", diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts b/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts index 1a6a49424672..0554e04f5daa 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts +++ b/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts @@ -60,7 +60,10 @@ const config: PlaywrightTestConfig = { /* Run your local dev server before starting the tests */ webServer: { command: 'yarn start', - port: process.env.PORT ? parseInt(process.env.PORT) : 3000, + port: Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO), + env: { + PORT: String(Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO)), + }, }, }; diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/test-recipe.json b/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/test-recipe.json index fce2379a280f..864736daaad8 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/test-recipe.json +++ b/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/test-recipe.json @@ -1,7 +1,7 @@ { "$schema": "../../test-recipe-schema.json", "testApplicationName": "standard-frontend-react-tracing-import", - "buildCommand": "yarn install --network-concurrency 1 && npx playwright install && yarn build", + "buildCommand": "yarn install && npx playwright install && yarn build", "tests": [ { "testName": "Playwright tests", diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts b/packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts index 1a6a49424672..0554e04f5daa 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts +++ b/packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts @@ -60,7 +60,10 @@ const config: PlaywrightTestConfig = { /* Run your local dev server before starting the tests */ webServer: { command: 'yarn start', - port: process.env.PORT ? parseInt(process.env.PORT) : 3000, + port: Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO), + env: { + PORT: String(Number(process.env.BASE_PORT) + Number(process.env.PORT_MODULO)), + }, }, }; diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/test-recipe.json b/packages/e2e-tests/test-applications/standard-frontend-react/test-recipe.json index 207dd5409b50..76916d74d280 100644 --- a/packages/e2e-tests/test-applications/standard-frontend-react/test-recipe.json +++ b/packages/e2e-tests/test-applications/standard-frontend-react/test-recipe.json @@ -1,7 +1,7 @@ { "$schema": "../../test-recipe-schema.json", "testApplicationName": "standard-frontend-react", - "buildCommand": "yarn install --network-concurrency 1 && npx playwright install && yarn build", + "buildCommand": "yarn install && npx playwright install && yarn build", "tests": [ { "testName": "Playwright tests",