Installation
Prerequisites
Install Playwright
If you don't have Playwright currently installed, you can follow Playwright's installation guide.
For simplicity, we copied the install commands for Playwright here.
- npm
- yarn
- pnpm
npm init playwright@latest
yarn create playwright
pnpm create playwright
When prompted, choose / confirm:
- TypeScript or JavaScript (default: TypeScript)
- Tests folder name (default: tests, or e2e if tests already exists)
- Add a GitHub Actions workflow (recommended for CI)
- Install Playwright browsers (default: yes)
Install Docusaurus
This reporter generates markdown files for Docusaurus. If you don't have a Docusaurus app set up yet, there is an install guide here. If you have a monorepo, I recommend using these instructions.
Alternatively, you can install the Docusaurus app within your current repo with:
- npm
- yarn
- pnpm
npm init docusaurus@latest doc classic -- --typescript
yarn create docusaurus@latest doc classic --typescript
pnpm create docusaurus@latest doc classic --typescript
This will make a doc directory with your Docusaurus app.
Install the Reporter
After installing Playwright, you can add the @test2doc/playwright with your package manager of choice:
- npm
- yarn
- pnpm
npm install @test2doc/playwright -D
yarn add @test2doc/playwright --dev
pnpm install @test2doc/playwright -D