Skip to content
masterclass Buddy

Playwright · Function

test

test declares a Playwright test with a title and body. The body can use fixtures, assertions, and optional test details such as tags, annotations, or locks.

Last updated

Since
v1.10

Syntax

test(title, body)
test(title, details, body)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • expect
  • test.beforeEach
  • test.afterEach
  • test.beforeAll
  • test.afterAll
  • test.describe
  • test.describe.configure
  • TestInfo

Source: Playwright Test | Playwright. Checked 2026-11-03.