TestDriver isn’t just a computer-use agent, it’s an entire AI-native workflow for creating end-to-end tests. Follow these steps to set up your environment and get started with TestDriver.
1

Create a TestDriver Account

Because TestDriver is powered by agentic users, a free account is required to access:
  • Dedicated Virtual Machines (VMs) for running agents
  • TestDriver AI + Vision models
  • Community support

Sign Up Now

No Credit-Card Required
2

Set up your environment

Copy your API key from the TestDriver dashboard, and set it as an environment variable.
Export an environment variable on macOS or Linux systems
export TD_API_KEY="your_api_key_here"
3

Try an example test

Download the TestDriver GitHub repository and run the web example test.
git clone https://github.com/testdriverai/cli testdriverai
cd testdriverai/testdriver/examples/web
TestDriver tests are written in YAML, a human-readable data format. The example.yaml file contains a series of steps that the agent will execute.
testdriver/test.yaml
steps:
  - prompt: log in
  - prompt: add an item to the cart
  - prompt: click on the cart icon
  - prompt: complete checkout
Each step has a prompt that describes what the agent should do. The agent will use the prompt to generate commands that make the tests faster and more reliable the next time you run the test.
4

Generate test steps from prompts

Run the following command to run the test file. TestDriver will spawn a virtual machine, launch the sandbox test page, and execute the steps defined in the example.yaml file.
npx testdriverai@beta run example.yaml --write --heal
The --write flag tells TestDriver to save any generated commands to the test file, and the --heal flag allows TestDriver to recover from unexpected issues during the test run.
5

Run a regression test

  version: 5.7.7
  session: 682f6071811bd5a322c0e6dd
  steps:
    - prompt: focus chrome
      commands:
        - command: focus-application
          name: Google Chrome
    - prompt: enter a username
      commands:
        - command: hover-text
          text: Username
          description: username input field
          action: click
        - command: type
          text: standard_user
    - prompt: enter a password
      commands:
        - command: hover-text
          text: Password
          description: password input field
          action: click
        - command: type
          text: secret_password
The --write command tells the agent to save the generated commands to the test file, and the --heal command gives the agent permission to recover if something goes wrong.