Saltar al contenido
Skillpedia
Pruebas48 mil · #5972

testdriver-e2e-testing

Qué hace

TestDriver te ayuda a crear pruebas automatizadas para comprobar que tu sitio web o aplicación funciona como debe. Simula a un usuario real que interactúa con la interfaz, encuentra errores y crea pruebas para que no vuelvan a aparecer.

Cuándo usarla

  • ✓Cuando necesitas escribir una prueba automatizada para un sitio web o una aplicación.
  • ✓Cuando un flujo de usuario es difícil de automatizar con los métodos tradicionales.
  • ✓Cuando quieres asegurarte de que una página o función concreta funciona correctamente.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/testdriver-e2e-testing/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Crea una prueba automatizada para comprobar que el formulario de inicio de sesión de mi web funciona.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Instalas TestDriver en tu proyecto y escribes las pruebas en lenguaje natural para describir lo que debe hacer la interfaz. TestDriver ejecuta estas pruebas en un entorno seguro y te informa de los problemas que encuentra.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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
Preguntas frecuentes

¿Necesito una clave especial para usarlo?

Sí, necesitas una clave API de TestDriver, que puedes obtener en su web y guardar de forma segura en tu proyecto.

¿Dónde se ejecutan las pruebas?

Las pruebas se ejecutan en un entorno seguro y aislado en la nube, no en tu ordenador, lo que garantiza la seguridad.

¿Puedo usarlo con cualquier tipo de aplicación?

Está pensado para aplicaciones web y de escritorio, y es especialmente útil cuando los elementos de la interfaz no tienen identificadores fáciles de encontrar.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#5972
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas