PW Playwright · TSFree course: Playwright with TypeScript
Full course

Chapter 3 · Lesson 2

The config file

Difficulty: Easy
Slides
Use the arrow keys, N for notes, F for full screenOpen in a separate window ↗
Video lesson

Key points

The playwright.config.ts file decides how the tests run. You can read most of its lines without knowing code:

  • testDir: where to look for tests.
  • fullyParallel and workers: how many tests run in parallel.
  • retries: how many times to retry a failed test.
  • reporter: which report to create. 'html' is the report we see in chapter 5.
  • use.trace: when to save a trace. We use it in chapter 6.
  • projects: which browsers to run in.

Without editing the file

You can change behaviour from the command line with flags: --headed (show the browser), --project=chromium (one browser), --workers=1 (one test at a time).

Practice

Try it yourself