You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit addf6f7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/src/test-reporter-api/class-testrun.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
* since: v1.62
3
3
* langs: js
4
4
5
-
Controls which tests will run and their expected status. A [TestRun] is available during [`method: Reporter.preprocess`]. Setup and teardown projects cannot be changed.
5
+
Controls which tests will run and their expected status, and provides information about suite execution modes. A [TestRun] is available during [`method: Reporter.preprocess`]. Setup and teardown projects cannot be changed.
6
6
7
7
## method: TestRun.exclude
8
8
* since: v1.62
@@ -49,6 +49,23 @@ Test or suite to mark as fixme.
49
49
50
50
Optional explanation surfaced as the annotation description.
Returns the execution mode configured for a suite with [`method: Test.describe.configure`], [`method: Test.describe.serial`] or [`method: Test.describe.parallel`].
57
+
If the suite does not configure a mode, it inherits its parent's mode. Project suites use `"parallel"` when [`property: TestProject.fullyParallel`] is enabled, and `"default"` otherwise. The root suite uses `"default"`.
58
+
59
+
An explicit `"default"` suite does not inherit `"parallel"` from its parent: its tests run in order in the same worker. The mode alone does not describe complete test groups, which also depend on worker fixtures and hooks.
60
+
61
+
This method can only be called during [`method: Reporter.preprocess`], and can also inspect setup and teardown projects.
@@ -491,6 +494,8 @@ test('plan.suite exposes setup/teardown dependency projects but they are read-on
491
494
'dep-fixme: TestRun.fixme() cannot be called on a setup or teardown project test; these always run in full.',
492
495
'dep-fail: TestRun.fail() cannot be called on a setup or teardown project test; these always run in full.',
493
496
'dep-exclude: TestRun.exclude() cannot be called on a setup or teardown project test; these always run in full.',
497
+
'setup mode: default',
498
+
'teardown mode: default',
494
499
'dep-suite-exclude: TestRun.exclude() cannot be called on a setup or teardown project; these always run in full.',
495
500
'same test objects: true',
496
501
'dep-after-preprocess: TestRun.skip() can only be called from Reporter.preprocess().',
@@ -547,18 +552,29 @@ test('plan.suite temporarily exposes dependencies without changing final project
547
552
]);
548
553
});
549
554
550
-
test('serial suites expose a serial annotation for custom sharding',async({ runInlineTest })=>{
555
+
test('suite modes and serial annotations are available for custom sharding',{annotation: {type: 'issue',description: 'https://github.com/microsoft/playwright/issues/43602'}},async({ runInlineTest })=>{
0 commit comments