Local Agent Setup
TestDriver's local agent runs tests on your computer.
You can use your own computer as a TestDriver runner. TestDriver will 'alt-tab' between the terminal and your computer.
Just tell TestDriver what to test on your local machine and TestDriver will look at the screen, generate some commands to control the computer, and execute them.
Extra Setup
Running tests on your own machine requires a bit of extra setup. You'll need to install some dependencies and give the terminal permission to see your screen and file system access.
Report issues to the testdriverai/testdriverai
repo
NodeJS
You'll need NodeJS version 20 to get started. Windows users will need a couple extra tools.
Install tools with Chocolatey
Install Python & Visual Studio Build Tools
Install NodeJS
You will also need NodeJS if you don't have it yet.
Set Execution Policy
Open a new terminal with admin privileges and execute the following command :
This gives TestDriver the right to execute it's scripts and is only valid for the current user.
Install TestDriver via NPM
Install testdriverai
via NPM. This will make testdriverai
available as a global command.
Set up the project
Run testdriverai init in a new folder.
This will walk you through setting up a local project.
Set up your test environment
Before we get started, let's set up your machine to collaborate with TestDriver.
Display
TestDriver isn't like any framework you've used before. TestDriver makes decisions based on what it can see on your display!
TestDriver only knows about what it can see on your primary display!
For now, set up your environment with a browser window and your terminal side by side like so:
When you enter commands into TestDriver, the current terminal window will minimize and the focus-window
command will bring Chrome or other applications to the foreground.
Application State
The application you want to test should be visible before you run the testdriverai
command.
For our example, make a new incognito window in Chrome and load our test webpage:
Make sure to reset the test state!
Last updated
Was this helpful?