Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: rephrase suggestion for slow test files (#34012)

Yury Semikhatsky76bb01d77c0f
diff --git a/packages/playwright/src/reporters/base.ts b/packages/playwright/src/reporters/base.ts
index 7a081e9f85..38b69d9d65 100644
--- a/packages/playwright/src/reporters/base.ts
+++ b/packages/playwright/src/reporters/base.ts
@@ -258,7 +258,7 @@ export class BaseReporter implements ReporterV2 {
console.log(colors.yellow(' Slow test file: ') + file + colors.yellow(` (${milliseconds(duration)})`));
});
if (slowTests.length)
- console.log(colors.yellow(' Consider splitting slow test files to speed up parallel execution'));
+ console.log(colors.yellow(' Consider running tests from slow files in parallel, see https://playwright.dev/docs/test-parallel.'));
}
private _printSummary(summary: string) {
diff --git a/tests/playwright-test/reporter-base.spec.ts b/tests/playwright-test/reporter-base.spec.ts
index 3e398f9160..afd5aa0543 100644
--- a/tests/playwright-test/reporter-base.spec.ts
+++ b/tests/playwright-test/reporter-base.spec.ts
@@ -222,7 +222,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {
expect(result.output).toContain(`Slow test file: [bar] › dir${path.sep}a.test.js (`);
expect(result.output).toContain(`Slow test file: [baz] › dir${path.sep}a.test.js (`);
expect(result.output).toContain(`Slow test file: [qux] › dir${path.sep}a.test.js (`);
- expect(result.output).toContain(`Consider splitting slow test files to speed up parallel execution`);
+ expect(result.output).toContain(`Consider running tests from slow files in parallel`);
expect(result.output).not.toContain(`Slow test file: [foo] › dir${path.sep}b.test.js (`);
expect(result.output).not.toContain(`Slow test file: [bar] › dir${path.sep}b.test.js (`);
expect(result.output).not.toContain(`Slow test file: [baz] › dir${path.sep}b.test.js (`);