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
fix(test runner): improve error message for non-stable test titles (#23792)
Dmitry Gozman2c8dd67b0ee6
diff --git a/packages/playwright-test/src/runner/dispatcher.ts b/packages/playwright-test/src/runner/dispatcher.tsindex a77dec81a3..f32e9ab376 100644--- a/packages/playwright-test/src/runner/dispatcher.ts+++ b/packages/playwright-test/src/runner/dispatcher.ts@@ -379,7 +379,7 @@ export class Dispatcher {return test.titlePath().slice(1).join(' > ');});massSkipTestsFromRemaining(new Set(params.fatalUnknownTestIds), [{- message: `Internal error: unknown test(s) in worker:\n${titles.join('\n')}`+ message: `Test(s) not found in the worker process. Make sure test titles do not change:\n${titles.join('\n')}`}]);}if (params.fatalErrors.length) {diff --git a/tests/playwright-test/runner.spec.ts b/tests/playwright-test/runner.spec.tsindex 8d48385a0c..3ee7cbab40 100644--- a/tests/playwright-test/runner.spec.ts+++ b/tests/playwright-test/runner.spec.ts@@ -331,7 +331,7 @@ test('should not hang if test suites in worker are inconsistent with runner', asexpect(result.passed).toBe(1);expect(result.failed).toBe(1);expect(result.skipped).toBe(1);- expect(result.report.suites[0].specs[1].tests[0].results[0].error!.message).toBe('Internal error: unknown test(s) in worker:\nproject-name > a.spec.js > Test 1 - bar\nproject-name > a.spec.js > Test 2 - baz');+ expect(result.report.suites[0].specs[1].tests[0].results[0].error!.message).toBe('Test(s) not found in the worker process. Make sure test titles do not change:\nproject-name > a.spec.js > Test 1 - bar\nproject-name > a.spec.js > Test 2 - baz');});test('sigint should stop global setup', async ({ runInlineTest }) => {