Skip to content

[BUG] Correct CI documentation with respect to npm run scripts #17011

@svdHero

Description

@svdHero

I am new to Playwright and started to write and run my tests by executing

npm init playwright@latest
npx playwright test

as described in the Getting Started.

However, when I wanted to integrate my tests in CI, I got confused about how to run tests in CI, because the CI documentation uses npm run test or npm test in some code snippets, e.g. in the Github Actions section or in the Jenkins section.
This produces the obvious error

npm ERR! Missing script: "test"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

because the package.json does not define any scripts.

It would probably help beginners like myself if the CI documentation would consistently use npx playwright test in its code snippets, if this indeed is the proper way to launch tests in CI.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions