Skip to content
Skillpedia
Testing48k · #4358

testdriver-e2e-testing

Helps your agent create full tests to check if software works correctly. It finds bugs and builds tests to prevent them from reappearing.

What it does

TestDriver helps create automated tests to check if your website or application works as expected. It simulates a real user interacting with the interface, finds bugs, and builds tests to prevent them from reappearing.

When to use it

  • ✓When you need to write an automated test for a website or application.
  • ✓When a user flow is difficult to automate with traditional methods.
  • ✓When you want to ensure a specific page or feature is working correctly.

Example of what to ask your AI

“Create an automated test to check if my website's login form works.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/testdriver-e2e-testing/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/testdriver-e2e-testing/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You install TestDriver in your project and write tests using natural language to describe what the interface should do. TestDriver runs these tests in a secure environment and reports any issues found.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill testdriver-e2e-testing

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/testdriver-e2e-testing/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

TestDriver End-to-End Testing

Overview

TestDriver is an AI code reviewer that actually runs your app. It automatically runs every pull request in a real desktop sandbox, finds bugs, and builds regression tests. Tests control browsers and native applications using natural language element descriptions and AI vision, and run as Vitest suites. This skill teaches an agent how to author, run, and debug TestDriver tests.

When to Use This Skill

  • Use when you need to write an end-to-end test for a web or desktop application
  • Use when automating a UI workflow that has no stable selectors (canvas, Electron, native apps)
  • Use when the user asks to verify that a page or flow works ("check if the login page works")
  • Use when debugging a failing TestDriver test

How It Works

Step 1: Set up the project

npx testdriverai init

This scaffolds package.json, example tests, vitest.config.mjs, and a GitHub Actions workflow. The user must set TD_API_KEY in .env (get a key at https://console.testdriver.ai/team).

Step 2: Write a test

Tests are Vitest suites using the TestDriver hooks:

import { describe, expect, it } from "vitest";
import { TestDriver } from "testdriverai/vitest/hooks";

describe("Login", () => {
  it("signs in successfully", async (context) => {
    const testdriver = TestDriver(context);
    await testdriver.provision.chrome({ url: "https://example.com/login" });

    const email = await testdriver.find("email input field");
    await email.click();
    await testdriver.type("user@example.com");

    const submit = await testdriver.find("Sign In button");
    await submit.click();

    const result = await testdriver.assert("the dashboard is visible");
    expect(result).toBeTruthy();
  });
});

Step 3: Run and iterate

vitest run tests/login.test.mjs

Screenshots are captured automatically before and after every command and saved to .testdriver/screenshots/, named with the source line number for easy debugging.

Examples

Example 1: Testing a desktop (Electron) app

await testdriver.provision.electron({ appPath: "./dist/my-app" });
const menu = await testdriver.find("File menu in the menu bar");
await menu.click();

Example 2: Waiting for slow elements

const done = await testdriver.find("Loading complete indicator", { timeout: 30000 });
await done.click();

Best Practices

  • ✅ Use specific element descriptions ("blue Sign In button in the header", not "button")
  • ✅ Set both testTimeout and hookTimeout to 900000 in vitest.config.mjs
  • ✅ Add assert() calls for verifiable pass/fail conditions
  • ✅ Always await every TestDriver call
  • ❌ Do not use npx vitest; run vitest run directly
  • ❌ Do not rely on CSS selectors; TestDriver locates elements visually

Limitations

  • Requires a TestDriver API key (TD_API_KEY) and network access to provision sandboxes.
  • Only works with Vitest as the test runner.
  • This skill does not replace environment-specific validation, testing, or expert review.

Security & Safety Notes

  • npx testdriverai init writes project files to the current directory; run it only in a project you intend to modify.
  • The TD_API_KEY credential belongs in .env (gitignored by the scaffold). Never commit it.
  • Tests execute inside an isolated remote sandbox, not on the local machine.

Common Pitfalls

  • Problem: Cleanup hooks fail with a 10s timeout. Solution: Set hookTimeout: 900000 in vitest.config.mjs; sandbox teardown and recording uploads take longer than Vitest's default.
  • Problem: Scrolling does nothing. Solution: An input field has focus. Press Escape or click the page background first, then scroll.

Related Skills

  • @webapp-testing - Playwright-based alternative for local web apps with stable DOM selectors
FAQ

Do I need a special key to use it?

Yes, you need a TestDriver API key, which you can get from their website and set up securely in your project.

Where are the tests run?

Tests run in a secure, isolated environment in the cloud, not on your local machine, ensuring safety.

Can I use it with any type of application?

It's designed for web and desktop applications, especially useful when interface elements don't have easy-to-find identifiers.

Details

Original description by the author

Build E2E tests with TestDriver.ai, the AI code reviewer that runs every pull request in a real desktop sandbox, finds bugs, and builds regression tests

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#4358
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills