1

Install Node.js

Ensure you have Node.js (v16 or higher) installed.

Check your Node.js version:

node -v

If not installed, download it from Node.js Official Website.

2

Install NPM

npm: Comes with Node.js. Verify npm is installed:

npm -v
3

Install TestDriver

Install the TestDriver CLI globally using npm:

npm install -g testdriverai@beta

Verify the installation:

testdriverai --version
4

Set Up Your Test Runner

TestDriver requires a runner to execute tests. You can use either a hosted sandbox or your own computer.

  • TestDriver Sandbox - Run tests in a ephemeral linux virtual machine. Recommended for ease of use, added privacy, and parallelization. Requires a TestDriver API key.
  • Local Runner - Run tests on your own computer. Recommended for working with existing user sessions, files, and applications. Requires additional setup.

Run testdriverai init in your project directory and choose “yes” for the sandbox option. This will prompt you for your API key.

Beginning setup...
✔ Use TestDriver Sandbox Runners? (Recommended) … yes
? API KEY (from https://app.testdriver.ai/team) › ********

This will write the TD_VM and TD_API_KEY values to .env file in your project directory.

5

Run TestDriver in Interactive Mode

Start TestDriver in interactive mode.

testdriverai

You should see a prompt like this:

Howdy! I'm TestDriver v4.2.26