PW Playwright · TSFree course: Playwright with TypeScript
Full course

Chapter 5 · Lesson 1

Run and open the report

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

Key points

In the generated settings, reporter is 'html'. So every run creates a report in the playwright-report/ folder.

npx playwright test
npx playwright show-report

When a test fails, Playwright opens the report by itself and serves it on a local address. The terminal stays busy until you press Ctrl+C. This is normal.

The main report screen

  • At the top: filters All, Passed, Failed, Flaky, Skipped and a search box.
  • Tests are grouped by file. Each test shows status, name, browser, duration and a View Trace link.
  • At the top of the report: the run date and total time.

Hands-on exercise

Run the tests/login.spec.ts you recorded. Deliberately change the password to secret1 and run again, to get one failing test.

Practice

Try it yourself