Suite is a group of tests. All tests in Playwright Test form the following hierarchy:
Reporter is given a root suite in the reporter.onBegin() method.
Returns the list of all test cases in this suite and its descendants, as opposite to suite.tests.
Usage
suite.allTests();
Returns
Test cases and suites defined directly in this suite. The elements are returned in their declaration order. You can differentiate between various entry types by using testCase.type and suite.type.
Usage
suite.entries();
Returns
Configuration of the project this suite belongs to, or void for the root suite.
Usage
suite.project();
Returns
Returns a list of titles from the root down to this suite.
Usage
suite.titlePath();
Returns
Location in the source where the suite is defined. Missing for root and project suites.
Usage
suite.location
Type
Parent suite, missing for the root suite.
Usage
suite.parent
Type
Child suites. See Suite for the hierarchy of suites.
Usage
suite.suites
Type
Test cases in the suite. Note that only test cases defined directly in this suite are in the list. Any test cases defined in nested test.describe() groups are listed in the child suite.suites.
Usage
suite.tests
Type
Suite title.
Usage
suite.title
Type
Returns the type of the suite. The Suites form the following hierarchy: root -> project -> file -> describe -> ...describe -> test.
Usage
suite.type
Type
© 2025 Microsoft
Licensed under the Apache License, Version 2.0.
https://playwright.dev/docs/api/class-suite