Suite is a group of tests. All tests in Playwright Test form the following hierarchy:
- Root suite has a child suite for each TestProject.
- Project suite #1. Has a child suite for each test file in the project.
- Project suite #2
- < more project suites ... >
Reporter is given a root suite in the reporter.onBegin(config, suite) method.
suite.allTests()Added in: v1.10
Returns the list of all test cases in this suite and its descendants, as opposite to suite.tests.
suite.project()Added in: v1.10
Configuration of the project this suite belongs to, or void for the root suite.
suite.titlePath()Added in: v1.10
Returns a list of titles from the root down to this suite.
suite.locationAdded in: v1.10
- type: <Location>
Location in the source where the suite is defined. Missing for root and project suites.
suite.parentAdded in: v1.10
- type: <Suite>
Parent suite, missing for the root suite.
suite.suitesAdded in: v1.10
Child suites. See Suite for the hierarchy of suites.
suite.testsAdded in: v1.10
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(title, callback) groups are listed in the child suite.suites.
suite.titleAdded in: v1.10
- type: <string>
- Empty for root suite.
- Project name for project suite.
- File path for file suite.
- Title passed to test.describe(title, callback) for a group suite.