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.

  1. 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
  2. Install Git

    You'll use Git to clone the workshop repository.

  3. 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.

  1. Clone the workshop repository

    github.com/Ghislain89/booker-platform
    git clone https://github.com/Ghislain89/booker-platform.git && cd booker-platform
  2. Install dependencies

    npm install
    npx playwright install chromium

    The 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 --version prints 1.64 or newer.

  3. Create the database and start the app

    npm run setup
    npm run dev

    npm run setup creates and seeds a local database; run it again whenever you want a clean slate. Then open http://localhost:3000. You should see the Booker Hotel home page; the API docs are at /api-docs. You can log in with user / 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.

  4. Verify Playwright works

    In a separate terminal, open Playwright's UI mode and run the tests:

    npx playwright test --ui
    All 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.