TestingDocs.com logoTestingDocs.com
Automation learning lab
TestingDocs • Self-paced course

Playwright Automation
Self Study Guide

Start from zero. Learn JavaScript and TypeScript, automate browsers, and build reliable end-to-end tests.

60 chaptersBeginner friendlyHands-on practice
Playwright / Chapter 35 of 60~18 min • Beginner
Chapter 35Playwright

Running tests and headed mode

The test runner discovers spec files and can filter by file, test title or browser project. Headless mode usually does not show a browser window, while headed mode displays it. Use UI mode for interactive debugging.

How it works

Step-by-step walkthrough

  1. Run the full suite
  2. Run a single file
  3. Compare headed and UI mode

Example

Terminal
npx playwright test
npx playwright test tests/first.spec.ts --headed
npx playwright test --ui
Expected result: Terminal results and optionally a browser or UI window
💡 Point to remember
Avoid interpreting a headed pass as proof a test is reliable.

Screenshot walkthrough

Terminal test results
Terminal test results • Official Playwright documentation. Source and walkthrough

✎ Your practice task

Run only the configured chromium project.

Knowledge check

Which flag displays browser windows?

🌐 Continue learning