Installing Your Tools
Set up everything you need — Node.js, a code editor, and your first 'Hello World' from the terminal.
What you'll learn
- Install Node.js and verify it works
- Install VS Code and understand what it does
- Run your first JavaScript from the terminal
- Understand what Node.js is and why we need it
Playwright AutomationlessonsJump to another lesson
Installing Your Tools
Time to set up our workbench. Two tools to install: Node.js (runs our code) and VS Code (where we write it).
The Stack You’re Building
Before we install anything, here’s the shape of what you’ll end up with. Each layer sits on top of the one before it:
Your Computer
Node.js
runs JS everywhere
npm
installs packages
Your Project
your test code
What is Node.js?
What is npm?
Installing Node.js
- 1
Download from nodejs.org
Open nodejs.org and click the LTS button. LTS = Long Term Support = stable, well-tested, recommended.
- 2
Run the installer
Mac: open the .pkg file. Windows: open the .msi file. Click Next / Continue through everything. Leave defaults as-is.
- 3
Verify it works
Open a terminal and check. You should see a version number.
node --version
$ node --versionv20.11.0$ npm --version10.2.4# Two version numbers = you are good to go!Try it in your terminal!
Quick check
Which version of Node.js should you download?
What is a Code Editor?
We’ll use VS Code — free, from Microsoft, loved by millions.
Notepad
Please don't.
const name = "world";
function greet(who) {
console.log("Hello, " + who);
}
greet(name);VS Code
This one.
const name = "world";
function greet(who) {
console.log("Hello, " + who);
}
greet(name);Installing VS Code
- 1
Download
Go to code.visualstudio.com and click the big download button.
- 2
Install
Mac: drag VS Code into Applications. Windows: run the installer, check 'Add to PATH' if you see it.
- 3
Open a folder
File → Open Folder. Always open your project's root folder — not individual files.
- 4
Open the built-in terminal
View → Terminal. Or press Ctrl + ` (backtick, above Tab).
Your First JavaScript
Method 1: Interactive mode (REPL)
$ nodeWelcome to Node.js v20.11.0.Type ".help" for more information.$ console.log("Hello, QA World!")Hello, QA World!$ 2 + 24$ "Hello" + " " + "World"'Hello World'# Exit with .exit or press Ctrl + C twiceTry it in your terminal!
Method 2: Run a file
- 1
Navigate somewhere
cd ~/Desktop - 2
Create a file
Windows: New-Item hello.js
touch hello.js - 3
Open it in VS Code
code hello.js - 4
Write some code
Put a few console.log lines in the file. Save with Cmd+S / Ctrl+S.
- 5
Run it
node hello.js
$ node hello.jsHello from a file!My name is Alex and I'm learning QA.Today I installed Node.js and VS Code!Try it in your terminal!
That’s the real-world workflow: write code in a file, run it with Node.
Quick check
You saved a file called app.js. How do you run it?
What We Just Installed
| Tool | What it is | Why we need it |
|---|---|---|
| Node.js | Runs JavaScript on your computer | Our testing tools are built on it |
| npm | Package manager (comes with Node) | Lets us install testing tools |
| VS Code | Code editor | Where we write our tests |
Practice Exercises
To check if Node.js is installed, type in the terminal