Autospec is an open-source AI agent that takes a web app URL and autonomously QAs it, and saves its passing specs as E2E test code
# autospec
### Open source end-to-end (e2e) test generation for web apps
Autospec is an AI agent that autonomously explores your web application,
generates commonsense test specifications, and executes them — producing
reusable Playwright test files. It uses vision and language models to mimic
real user judgement on the entire UI after each interaction, deciding whether
behavior is correct rather than checking for regressions against rigidly
defined previous behavior.
- Tests new features immediately after implementation, not just regressions.
- Requires no configuration — point it at a URL and go.
- Generates standard Playwright `.spec.js` files you can re-run anytime.
### Quick start
Generate and run 10 specs on TodoMVC:
<!-- prettier-ignore -->
```bash
npx autospecai --url https://todomvc.com/examples/react/dist/ --apikey YOUR_ANTHROPIC_API_KEY
```
You'll need to say "yes" to install the autospecai package, and the first run
may take a few minutes to download dependencies like browser binaries.
When the run completes, you'll see a summary of passed and failed tests.
Passing specs are saved as Playwright test files in the `trajectories/` folder
alongside video recordings and screenshots. Re-run them anytime:
<!-- prettier-ignore -->
```bash
npx playwright test
```
Depending on your existing Playwright setup, you may need to add `"trajectories"`
to the `testDir` in your `playwright.config.js` file.
### Using environment variables instead of passing keys as a flag
Copy the sample .env file and fill in the API key for your chosen model:
<!-- prettier-ignore -->
```bash
cp .env.example .env
nano .env
```
### Configuration
<!-- prettier-ignore -->
```bash
> npx autospecai --help
Usage: npx autospecai --url <url> [--model <model>] [--spec_limit <limit>] [--help | -h]
Required:
--url <url> The target URL to run the autospec tests against.
Optional:
--help, -h Show this help message.
--version, -v Show verGoogle's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.