添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
近视的充电器  ·  Pandas: source of ...·  4 天前    · 
爱喝酒的四季豆  ·  So lost·  4 天前    · 
纯真的木瓜  ·  基于 Generator 与 ...·  5 天前    · 
俊逸的圣诞树  ·  Test Page for the ...·  6 天前    · 
好帅的铁链  ·  青春不忘来时路 ...·  2 月前    · 
飞奔的杯子  ·  实验动物与比较医学·  2 月前    · 
聪明伶俐的围巾  ·  重要人物·  3 月前    · 
Skip to main content

Command line

Introduction

Here are the most common options available in the command line.

Run all the tests

npx playwright test

Run a single test file

npx playwright test tests/todo-page.spec.ts

Run a set of test files

npx playwright test tests/todo-page/ tests/landing-page/

Run files that have my-spec or my-spec-2 in the file name

npx playwright test my-spec my-spec-2

Run tests that are in line 42 in my-spec.ts

npx playwright test my-spec.ts:42

Run the test with the title

npx playwright test -g "add a todo item"

Run tests in headed browsers

npx playwright test --headed

Run all the tests against a specific project

npx playwright test --project=chromium

Disable parallelization

npx playwright test --workers=1

Choose a reporter

npx playwright test --reporter=dot

Run in debug mode with Playwright Inspector

npx playwright test --debug

Run tests in interactive UI mode, with a built-in watch mode (Preview)

npx playwright test --ui

Ask for help

npx playwright test --help