ATR - Agentic Test Runner

ATR is an AI-powered test runner that automatically analyzes failures and runs browser-based behavior tests using natural language.
Features
- AI Failure Analysis: Run any command and get intelligent analysis when it fails
- Browser Behavior Testing: Write tests in natural language, let AI execute them
- Multiple LLM Backends: Supports Google Gemini API, Vertex AI, Claude on Vertex AI (with prompt caching), and CLI tools (Claude, Gemini)
- CLI Backend Support: Use Claude CLI or Gemini CLI as backends - no API keys needed
- Cross-platform Desktop Control: Mouse, keyboard, screen capture, window/app management on Linux (X11), macOS, and Windows via
atr computer, with multi-monitor support and an in-process LLM agent (atr computer ask)
- MCP Server: Expose browser AND desktop tools to any MCP-compatible client
- Browser Live View: Watch the browser in a web page and take over when a step needs a person, such as a login with MFA, via
atr remote. No X server or VNC required
- Cross-Platform: Works on Linux, macOS, and Windows
- Extensible: Tool-based architecture for custom extensions
Quick Start
Install
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/imyousuf/agentic-test-runner/main/install.sh | sh
Windows (PowerShell):
irm https://raw.githubusercontent.com/imyousuf/agentic-test-runner/main/install.ps1 | iex
With Go (needs Go 1.25+):
go install github.com/imyousuf/agentic-test-runner/cmd/atr@latest
From source (needs Go 1.25+):
git clone https://github.com/imyousuf/agentic-test-runner.git
cd agentic-test-runner
make install
The atr remote live view is a web application embedded in the binary. Its build
output, web/dist, is committed, so neither path needs Node. Node 22+ is needed
only to change the live view: run make web and commit the rebuilt assets.
Or download from Releases.
Configure
# Option 1: Using Claude or Gemini CLI (no API key needed)
# If you have claude or gemini CLI installed, ATR auto-detects them
atr config init # Creates config with detected CLI as default backend
# Option 2: Using Gemini API
export GEMINI_API_KEY="your-api-key"
# Option 3: Using Vertex AI
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT="your-project"
Run
Analyze a failing command:
atr run --cmd "go test ./..."
When the command fails, ATR's AI agent will:
- Analyze the failure output
- Run diagnostic commands
- Read relevant source files
- Provide actionable recommendations
Run a behavior test:
# Create a test file
cat > login.test.txt << 'EOF'
Test: User can log in
Steps:
1. Navigate to http://localhost:3000/login
2. Enter "[email protected]" in email field
3. Enter "password" in password field
4. Click "Sign In" button
5. Verify URL contains /dashboard
EOF
# Run the test
atr run --behavior login.test.txt
Example Output
Executing: go test ./...
Directory: /path/to/project
--- FAIL: TestUserAuth (0.05s)
auth_test.go:42: expected 200, got 401
✗ Command failed (exit code: 1, duration: 2.3s)
Analyzing failure with AI agent...
Using model: gemini-3.7-flash (gemini-api)
======================================================================
ANALYSIS RESULTS
======================================================================
Status: FAILURE
Summary:
TestUserAuth fails because the auth middleware expects a JWT token,
but the test doesn't provide one in the request headers.
Root Cause:
Line 38 in auth_test.go creates a request without Authorization header.
The auth middleware (middleware/auth.go:15) rejects it with 401.
Recommendations:
1. Add mock JWT token to test request
2. Or bypass auth middleware in test setup
3. Check if middleware was recently added to the route
Files Examined:
- auth_test.go
- middleware/auth.go
- routes/api.go
Documentation