AI Personal Learning
and practical guidance
Beanbag Marscode1

TestDriver: a smart tool for automated software testing using AI

General Introduction

TestDriver is a website that uses artificial intelligence technology to help developers test software. It automates the task of testing software by simulating human actions, such as clicking a mouse or typing text. The core of the site is a "computer using AI agents" that operate the computer like a real person, suitable for testing web pages, desktop applications, etc. TestDriver's goal is to make testing faster and easier, and to reduce the amount of manual work. It emphasizes that there is no need for complex setups, and that AI can be commanded to complete tests directly in natural language.

TestDriver: a smart tool for automated software testing using AI-1


 

Function List

  • Automatic test script generation: Enter simple commands and AI generates test code.
  • Simulates real user actions: AI can click, type, scroll, and mimic human behavior.
  • Supports multi-platform testing: can run tests on web, Windows, Mac, etc.
  • No need for selector maintenance: describes the target in natural language and does not rely on code changes.
  • Integrated CI/CD process: Seamless access to the development pipeline and automated test running.
  • Dashcam Video Recording: Test process video recording, convenient for debugging and checking problems.
  • Natural Language Interaction: Use everyday language to tell the AI what to do, e.g. "click to log in".

 

Using Help

Installation and use process

TestDriver provides two ways to use: one is to use the official cloud testing service (TestDriver Runners), and the other is to locally install the agent to run tests. Here are the detailed steps:

Testing in the Cloud (TestDriver Runners)

  1. Getting the API key: After logging in, find the API key on the Team Settings page and copy it.
  2. Configuration items::
    • Open a terminal on your computer and type the command <code>npm i testdriverai -g</code> Install the TestDriver tool globally.
    • (of a computer) run <code>testdriver init</code> Initialize the project and you will be prompted to enter the API key.
    • After entering the key, select "Yes" to use TestDriver Runners and complete the configuration.
  3. operational test: Input <code>testdriver run</code>, the AI will then start performing test tasks.

Local Agent Installation

  1. Installing the software::
    • To download the TestDriver agent, go to https://docs.testdriver.ai for the latest download link.
    • Depending on your system (Linux/Windows/Mac), install the dependencies as documented, for example <code>brew install go</code>(Mac users).
  2. Enabling Agents::
    • Run the installed agent program and make sure it is running in the background.
    • expense or outlay <code>npm i testdriverai -g</code> Install the command line tool.
  3. Connecting to a local proxy: Select "No" to use local proxy when initializing the project, and enter the local proxy address.

Main Functions

Automatic generation of test scripts

  • Open your application (e.g. a web page in a browser).
  • Enter commands in the terminal, such as <code>click sign up</code>The AI will analyze the screen, find the "Sign Up" button and click on it.
  • importation <code>/save</code> Save the generated script to the <code>testdriver/testdriver.yaml</code> Documentation.

Simulate user operation

  • Example: Testing the login function.
    • importation <code>focus-application name: Google Chrome</code> Switch to the browser.
    • importation <code>type text: username</code> cap (a poem) <code>type text: password</code> Fill in the account password.
    • importation <code>click Login</code> Click the Login button.
  • The AI performs these steps automatically and records the results.

Dashcam Video Recording

  • After each test, the system generates a link to a Dashcam video.
  • Find the link in GitHub Actions or Terminal Output and click to see a full video of the testing process.
  • The video will show the mouse movement and click position for easy troubleshooting.

Example of operation process

Suppose you want to test the registration feature of a web page:

  1. Open your browser and go to the target page.
  2. Enter it in the terminal:
focus-application name: Google Chrome
click sign up
type text: test@example.com
type text: mypassword123
click submit
  1. After the AI is executed, enter <code>/save</code> Save the script.
  2. expense or outlay <code>testdriver run</code> Run it again and check the results.
  3. If something goes wrong, enter <code>/undo</code> Undo the previous step, adjust the command and try again.

caveat

  • Ensure that the target application is visible on the screen during the test and that the AI can only see the main display.
  • Instructions should be as simple and clear as possible, avoiding complex descriptions such as "click login" instead of "click the button 100px below the logo".
  • Test results are automatically uploaded to GitHub (configuration required) or saved locally as a YAML file.

 

application scenario

  1. Developer quick validation feature
    After the developer writes the code, TestDriver is used to test that the new functionality works, such as checking that the login page works.
  2. Teamwork Publishing Software
    Add TestDriver to the CI/CD process to automatically run tests every time you commit your code to make sure you're not introducing new issues.
  3. Involvement of non-technical staff in QA
    Product managers can write test instructions in natural language and let the AI help check the interface without needing to know the code.

 

QA

  1. What software can TestDriver test?
    It can test any software with an interface, including web pages, desktop applications, and even operating system settings, as long as the AI can see the screen.
  2. Need to write code?
    No need. You can command the AI with natural language, such as "click a button" and "enter text", and it will generate its own script.
  3. How can I view the test results?
    The test is followed by a Dashcam video showing the entire operation. Also see the terminal logs or GitHub reports.
May not be reproduced without permission:Chief AI Sharing Circle " TestDriver: a smart tool for automated software testing using AI
en_USEnglish