fix: reduce concurrency to avoid server connection issues

This commit is contained in:
张翔
2026-03-06 18:38:15 +08:00
parent e266ced309
commit 767fa32c26
+10 -4
View File
@@ -1,22 +1,28 @@
import { defineConfig, devices } from '@playwright/test';
import { getEnvironmentConfig } from './shared/config/environments';
import { CustomReporter } from './shared/utils/reporting/CustomReporter';
const config = defineConfig({
testDir: './dev-audit',
fullyParallel: true,
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
workers: 1,
timeout: 30000,
reporter: [
['html', { outputFolder: 'test-framework/reports/html' }],
['html', { outputFolder: 'test-framework/reports/html', open: 'never' }],
['json', { outputFile: 'test-framework/reports/results.json' }],
['junit', { outputFile: 'test-framework/reports/results.xml' }],
['list']
],
use: {
baseURL: getEnvironmentConfig(process.env.TEST_ENV || 'development').baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure'
video: 'retain-on-failure',
launchOptions: {
args: ['--disable-dev-shm-usage', '--no-sandbox']
}
},
projects: [
{