Skip to content
masterclass Buddy

Playwright · Function

test.fail

test.fail marks a Playwright test as expected to fail. Playwright runs it and checks that it really fails, which helps track known broken behavior.

Last updated

Since
v1.10

Syntax

test.fail(title, body)
test.fail(title, details, body)
test.fail(condition, description)
test.fail(callback, description)
test.fail()

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

Subscribe
  • test
  • test.fixme
  • test.skip
  • test.only
  • test.slow
  • TestInfo

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