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.mdCó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
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
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
testTimeoutandhookTimeoutto 900000 invitest.config.mjs - ✅ Add
assert()calls for verifiable pass/fail conditions - ✅ Always
awaitevery TestDriver call - ❌ Do not use
npx vitest; runvitest rundirectly - ❌ 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 initwrites project files to the current directory; run it only in a project you intend to modify.- The
TD_API_KEYcredential 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: 900000invitest.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
Popularidad
- Estrellas en GitHub
- 48 mil
- Posición en el ranking
- #5972
- Licencia
- MIT
- Actualizada
- 15/10/2026
Comentarios
- …
Más skills de este repositorio
00-andruia-consultant
48 milAyuda a tu agente a iniciar o mejorar proyectos de IA. Analiza código, sugiere herramientas y crea planes de acción en español.
007
48 milPermite que tu agente realice auditorías de seguridad y modelado de amenazas. Es útil para proteger proyectos contra ataques y vulnerabilidades.
10-andruia-skill-smith
48 milAyuda a tu agente a crear o mejorar herramientas de IA. Define cómo funcionan, escribe la documentación y valida la estructura.
20-andruia-niche-intelligence
48 milPermite que tu agente cree un resumen de un sector específico. Es útil para entender su contexto, normas, patrones de uso y riesgos, usando fuentes fiables.
Skills parecidas
test-driven-development
311 milEnseña a tu agente a escribir primero una prueba que falle, verla fallar y después escribir el código más pequeño que la hace pasar, antes de construir cualquier función o corrección.
verification-before-completion
311 milEnseña a tu agente a ejecutar comprobaciones reales y leer su resultado antes de afirmar que una tarea, una corrección o una compilación está completa o en buen estado.
migrate-to-shoehorn
310 milSustituye los casts de tipo arriesgados de tus archivos de prueba por la librería shoehorn, para que las pruebas usen datos parciales y sigan pasando las comprobaciones de tipos.