Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: default reportSlowTests to 5 minutes (#34950)
Dmitry Gozman08ea36caa2b7
diff --git a/docs/src/test-api/class-fullconfig.md b/docs/src/test-api/class-fullconfig.mdindex 923c9fa858..edbc991bfd 100644--- a/docs/src/test-api/class-fullconfig.md+++ b/docs/src/test-api/class-fullconfig.md@@ -93,8 +93,8 @@ See [`property: TestConfig.reporter`].## property: FullConfig.reportSlowTests* since: v1.10- type: <[null]|[Object]>- - `max` <[int]> The maximum number of slow test files to report. Defaults to `5`.- - `threshold` <[float]> Test duration in milliseconds that is considered slow. Defaults to 15 seconds.+ - `max` <[int]> The maximum number of slow test files to report.+ - `threshold` <[float]> Test file duration in milliseconds that is considered slow.See [`property: TestConfig.reportSlowTests`].diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.mdindex 213928e2e7..f837ddbfe8 100644--- a/docs/src/test-api/class-testconfig.md+++ b/docs/src/test-api/class-testconfig.md@@ -429,7 +429,7 @@ export default defineConfig({* since: v1.10- type: ?<[null]|[Object]>- `max` <[int]> The maximum number of slow test files to report. Defaults to `5`.- - `threshold` <[float]> Test duration in milliseconds that is considered slow. Defaults to 15 seconds.+ - `threshold` <[float]> Test file duration in milliseconds that is considered slow. Defaults to 5 minutes.Whether to report slow test files. Pass `null` to disable this feature.diff --git a/packages/playwright/src/common/config.ts b/packages/playwright/src/common/config.tsindex 4ebc900872..8d213226ff 100644--- a/packages/playwright/src/common/config.ts+++ b/packages/playwright/src/common/config.ts@@ -99,7 +99,7 @@ export class FullConfigInternal {metadata: userConfig.metadata,preserveOutput: takeFirst(userConfig.preserveOutput, 'always'),reporter: takeFirst(configCLIOverrides.reporter, resolveReporters(userConfig.reporter, configDir), [[defaultReporter]]),- reportSlowTests: takeFirst(userConfig.reportSlowTests, { max: 5, threshold: 15000 }),+ reportSlowTests: takeFirst(userConfig.reportSlowTests, { max: 5, threshold: 300_000 /* 5 minutes */ }),quiet: takeFirst(configCLIOverrides.quiet, userConfig.quiet, false),projects: [],shard: takeFirst(configCLIOverrides.shard, userConfig.shard, null),diff --git a/packages/playwright/src/isomorphic/teleReceiver.ts b/packages/playwright/src/isomorphic/teleReceiver.tsindex b9aa5edba9..29b1beb74d 100644--- a/packages/playwright/src/isomorphic/teleReceiver.ts+++ b/packages/playwright/src/isomorphic/teleReceiver.ts@@ -605,7 +605,7 @@ export const baseFullConfig: reporterTypes.FullConfig = {preserveOutput: 'always',projects: [],reporter: [[process.env.CI ? 'dot' : 'list']],- reportSlowTests: { max: 5, threshold: 15000 },+ reportSlowTests: { max: 5, threshold: 300_000 /* 5 minutes */ },configFile: '',rootDir: '',quiet: false,diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.tsindex 1e9fef6b6c..4cc816993a 100644--- a/packages/playwright/types/test.d.ts+++ b/packages/playwright/types/test.d.ts@@ -1443,7 +1443,7 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {max: number;/**- * Test duration in milliseconds that is considered slow. Defaults to 15 seconds.+ * Test file duration in milliseconds that is considered slow. Defaults to 5 minutes.*/threshold: number;};@@ -1895,12 +1895,12 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {*/reportSlowTests: null|{/**- * The maximum number of slow test files to report. Defaults to `5`.+ * The maximum number of slow test files to report.*/max: number;/**- * Test duration in milliseconds that is considered slow. Defaults to 15 seconds.+ * Test file duration in milliseconds that is considered slow.*/threshold: number;};