SoftwareTestPilot
Module 01 · Lab 2
Beginner
8 min read

Install Node, Playwright & VS Code — Step-by-Step Setup

Get a working Playwright test runner on Windows, macOS, or Linux in about 15 minutes.

1. What you'll install

  • Node.js 18+ — the JavaScript runtime that runs Playwright.
  • VS Code — the editor where you'll write tests.
  • Playwright — Microsoft's end-to-end testing framework.

2. Step 1 — Install Node.js

  • Download the LTS build from nodejs.org.
  • Verify in terminal:
node -v
npm -v

Why LTS? It's the version with long-term security patches.

3. Step 2 — Install VS Code

  • Download from code.visualstudio.com.
  • Install recommended extensions: Playwright Test for VSCode, ESLint, Prettier.

4. Step 3 — Scaffold a Playwright project

Run:

npm init playwright@latest my-first-test

Answer the prompts:

  • TypeScript — yes
  • Install browsers — yes
  • GitHub Actions — no for now

This generates:

my-first-test/
├── package.json
├── playwright.config.ts
├── tests/
└── .gitignore

5. Step 4 — Open the project in VS Code

code my-first-test

Confirm the Playwright extension shows the test explorer icon in the sidebar.

6. Step 5 — Sanity check

npx playwright test --headed

The default example test should open a browser, navigate to playwright.dev, and pass.

7. Hands-on task (terminal)

  • Run every command in this lesson in your own terminal.
  • Paste the final 1 passed output into the lab submission box.

8. What's next

Continue to Module 01 / Lab 3: Run your first test.

Up next in the learning path

Run your first test