lecture 5 of 180 completed

Testing the API directly

Playwright can send HTTP requests with no browser at all. That makes setup fast and lets you test the server on its own.

What you'll learn

  • How the request fixture skips the browser entirely
  • How to arrange test state in milliseconds
  • Why you should still assert through the screen

Your delete test needs a contact to exist. Creating it through the form takes eight seconds. Multiply by forty tests and your suite spends most of its life filling in forms it is not testing.

Playwright has a full HTTP client built in, so you do not need a second tool.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →