Before the workshop
Playwright workshop preparation.
Install the tools and get booker-platform running, so we can start writing tests right away.
Preparation · 01
Install the tools.
Complete these steps before joining the workshop.
-
Install Node.js (LTS)
Pick the LTS version: booker-platform needs Node.js 22.22 or newer. Node.js includes npm, which you'll need to install the project. Check your installation with:
node -v && npm -v -
Install Git
You'll use Git to clone the workshop repository.
-
Install VS Code and the Playwright extension
The extension lets you run, debug and record tests from the editor. Prefer another editor? That's fine, but the workshop demos use VS Code.
Preparation · 02
Set up booker-platform.
booker-platform is a small hotel booking app (a web app plus a REST API with Swagger docs) with a Playwright setup we'll build on during the assignments. Everything runs on your own machine.
-
Clone the workshop repository
github.com/Ghislain89/booker-platformgit clone https://github.com/Ghislain89/booker-platform.git && cd booker-platform -
Install dependencies
npm installnpx playwright install chromiumThe first command installs the project, the second downloads Chromium, the browser we use in the workshop. This may take a few minutes. Check that
npx playwright --versionprints 1.64 or newer. -
Create the database and start the app
npm run setupnpm run devnpm run setupcreates and seeds a local database; run it again whenever you want a clean slate. Then openhttp://localhost:3000. You should see the Booker Hotel home page; the API docs are at/api-docs. You can log in withuser/password123.The app won't start on your laptop? It also runs in Docker:
docker build -t booker . && docker run --rm -p 3000:3000 booker. You still need Node.js for Playwright itself. See the README. -
Verify Playwright works
In a separate terminal, open Playwright's UI mode and run the tests:
npx playwright test --uiAll set?If the tests run green, you're ready for the workshop. Running into problems? Bring them along; we'll sort them out at the start.