Test Copilot
Create tests with the help of TestDriver’s interactive computer-use agent.
The TestDriver interactive CLI allows you to create, refine, and execute tests dynamically using natural language commands. Here’s how to get started.
Prepare your environment
Before we get started, let’s set up your machine to collaborate with TestDriver.
Displays
TestDriver isn’t like any framework you’ve used before. TestDriver makes decisions based on what it can see on your display!
When you enter commands into TestDriver, the current window will minimize and the focus-window
command will bring Chrome or other applications to the foreground.
For now, set up your environment with a browser window and your terminal side by side like so:
Left or right, it doesn't matter!
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:
Launch interactive mode
Run the following command to launch the TestDriver interactive mode:
You’ll see a prompt (>
) where you can enter commands.
Write tests using natural language
Simply describe what you want to test in plain English. For example:
TestDriver will analyze your screen, interpret your instruction, and generate a test script to achieve the goal. It can see your UI, control the mouse and keyboard, and automate complex workflows—all through simple commands.
4. Refine your test
If something doesn’t work as intended:
- Use
/undo
to remove the last step:
Modify your prompt or add new steps to refine the test.
5. Save your test
Once you’re satisfied with the test, save it to a YAML file:
This generates a reusable YAML file (for example, testdriver.yaml
) with all the steps.
.yaml
file extension for all test files. This is a breaking change from v4 which uses the .yml
extension!