GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Playwright
  • Docs
  • MCP
  • CLI
  • API
  • Node.js
  • Python
  • Java
  • .NET
  • API reference
  • Classes
  • APIRequestContext
  • APIResponse
  • Browser

This view

  • Original page
  • New address

GeezerVison is showing playwright.dev — Suite | Playwright

Suite is a group of tests. All tests in Playwright Test form the following hierarchy:

  • Root suite has a child suite for each FullProject.
    • Project suite #1. Has a child suite for each test file in the project.
      • File suite #1
        • TestCase #1
        • TestCase #2
        • Suite corresponding to a test.describe() group
          • TestCase #1 in a group
          • TestCase #2 in a group
        • < more test cases ... >
      • File suite #2
      • < more file suites ... >
    • Project suite #2
    • < more project suites ... >

Reporter is given a root suite in the reporter.onBegin() method.


Methods​

allTests​

Added in: v1.10 suite.allTests

Returns the list of all test cases in this suite and its descendants, as opposite to suite.tests.

Usage

suite.allTests();

Returns

  • Array<TestCase>#

entries​

Added in: v1.44 suite.entries

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

  • Array<TestCase | Suite>#

project​

Added in: v1.10 suite.project

Configuration of the project this suite belongs to, or void for the root suite.

Usage

suite.project();

Returns

  • FullProject | [undefined]#

titlePath​

Added in: v1.10 suite.titlePath

Returns a list of titles from the root down to this suite.

Usage

suite.titlePath();

Returns

  • Array<string>#

Properties​

location​

Added in: v1.10 suite.location

Location in the source where the suite is defined. Missing for root and project suites.

Usage

suite.location

Type

  • Location

parent​

Added in: v1.10 suite.parent

Parent suite, missing for the root suite.

Usage

suite.parent

Type

  • Suite

suites​

Added in: v1.10 suite.suites

Child suites. See Suite for the hierarchy of suites.

Usage

suite.suites

Type

  • Array<Suite>

tests​

Added in: v1.10 suite.tests

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

  • Array<TestCase>

title​

Added in: v1.10 suite.title

Suite title.

  • Empty for root suite.
  • Project name for project suite.
  • File path for file suite.
  • Title passed to test.describe() for a group suite.

Usage

suite.title

Type

  • string

type​

Added in: v1.44 suite.type

Returns the type of the suite. The Suites form the following hierarchy: root -> project -> file -> describe -> ...describe -> test.

Usage

suite.type

Type

  • "root" | "project" | "file" | "describe"
  • Methods
    • allTests
    • entries
    • project
    • titlePath
  • Properties
    • location
    • parent
    • suites
    • tests
    • title
    • type
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.