README.md

February 11, 2026 Β· View on GitHub

Argus Core Logo

Argus Backend - E2E Testing Agent

AI-Powered Autonomous Testing Engine

License Python LangGraph Claude

CI codecov Backend Coverage Dashboard Coverage


πŸ“¦ Repository Structure

This is the backend/core testing engine repository.

RepositoryPurposeLink
argus-backend (this repo)Python testing engine, AI agents, orchestrationgithub.com/samuelvinay91/argus-backend
argus (frontend)Next.js dashboard, UI components, visualizationgithub.com/samuelvinay91/argus

An AI-powered testing system that autonomously tests your application - no test writing required.

# That's it. The AI does everything.
e2e-agent --codebase ./my-app --app-url http://localhost:3000

What it does:

  1. πŸ” Analyzes your code - understands your app structure
  2. πŸ“ Generates tests - creates comprehensive test plans
  3. ▢️ Runs tests - executes UI, API, and database tests
  4. πŸ”§ Self-heals - fixes broken selectors automatically
  5. πŸ“Š Reports - gives you actionable results

πŸ“š See docs/WORKFLOWS.md for detailed user workflows

✨ Features

Core Testing Capabilities

  • πŸ” Codebase Analysis: Automatically understands your application structure
  • πŸ“ Test Generation: Creates comprehensive E2E test plans from code analysis
  • πŸ–₯️ Visual UI Testing: Uses Claude's Computer Use API to interact with browsers
  • πŸ”Œ API Testing: Validates endpoints with schema verification
  • πŸ—„οΈ Database Testing: Checks data integrity and migrations
  • πŸ”§ Self-Healing: Automatically fixes broken selectors and timing issues
  • πŸ’° Cost Tracking: Monitors and limits API usage costs
  • πŸ”€ Multi-Framework Support: Playwright, Selenium, Computer Use, or Chrome Extension
  • 🧩 Chrome Extension: Real browser automation like Claude in Chrome / Antigravity

Competitive Features (Industry-Leading)

  • πŸ‘οΈ Visual AI Regression (like Applitools): Claude Vision-powered screenshot comparison for visual testing
  • πŸ’¬ Plain English Tests (like testRigor): Write tests in natural language - "Login as admin and create a new user"
  • πŸ•·οΈ Auto-Discovery (like Octomind): Automatically crawl your app and generate test scenarios
  • πŸ“Š Multi-Format Reports: JSON, HTML, Markdown, and JUnit XML for CI/CD
  • πŸ™ GitHub Integration: Automatic PR comments, check runs, and commit status updates
  • πŸ’¬ Slack Notifications: Real-time test results and failure alerts

πŸ”Œ MCP Server - AI IDE Integration

Connect Argus to your AI coding assistant! The Argus MCP Server allows Claude Code, Cursor, Windsurf, and other MCP-compatible IDEs to run E2E tests directly.

Available Tools

ToolDescription
argus_healthCheck Argus API status
argus_discoverDiscover interactive elements on a page
argus_actExecute browser actions (click, type, navigate)
argus_testRun multi-step E2E tests with screenshots
argus_extractExtract structured data from pages
argus_agentAutonomous task completion
argus_generate_testGenerate test steps from natural language

Setup for Claude Code / Claude Desktop

Add to your MCP settings:

{
  "mcpServers": {
    "argus": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://argus-mcp.samuelvinay-kumar.workers.dev/sse"]
    }
  }
}

Setup for Cursor

Add to Cursor's MCP settings:

{
  "mcpServers": {
    "argus": {
      "url": "https://argus-mcp.samuelvinay-kumar.workers.dev/sse"
    }
  }
}

Example Usage

# In your AI IDE, you can now say:
"Use argus_test to test login on https://example.com with steps:
1. Type 'user@example.com' in the email field
2. Type 'password123' in the password field
3. Click the Login button
4. Verify the dashboard loads"

πŸ“– See skopaq-mcp-server/README.md for full MCP documentation


πŸš€ Quick Start

Prerequisites

  • Python 3.11+
  • Anthropic API key
  • Docker (for Computer Use sandbox)

Installation

# Clone the repository
git clone https://github.com/samuelvinay91/argus-backend.git
cd argus-backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -e .

# Set up environment
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY

Basic Usage

# Run tests against your application
e2e-agent --codebase /path/to/your/app --app-url http://localhost:3000

# With PR integration
e2e-agent --codebase . --app-url http://preview.example.com --pr 123

# Target specific changed files
e2e-agent --codebase . --app-url http://localhost:3000 --changed-files src/login.tsx src/api/auth.ts

Python API

from e2e_testing_agent import TestingOrchestrator

orchestrator = TestingOrchestrator(
    codebase_path="/path/to/app",
    app_url="http://localhost:3000"
)

results = await orchestrator.run()
print(f"Passed: {results['passed_count']}, Failed: {results['failed_count']}")

πŸ”€ Browser Automation Options

By default, the agent uses Playwright (fast, reliable, works in CI). But you have options:

When to useFrameworkCommand
Most cases (default)PlaywrightJust run e2e-agent
Need your existing cookies/authChrome ExtensionSee extension/README.md
Sites detect botsComputer Use--browser computer_use
Flaky selectorsHybrid--browser hybrid

For advanced usage, see docs/WORKFLOWS.md

πŸ‘οΈ Visual AI Testing

Detect visual regressions using Claude's Vision capabilities:

from e2e_testing_agent.agents import VisualAI, VisualRegressionManager

# Compare two screenshots
visual_ai = VisualAI()
result = await visual_ai.compare(baseline_screenshot, current_screenshot)
print(f"Match: {result.matches}, Differences: {result.differences}")

# Manage baselines automatically
manager = VisualRegressionManager(baseline_dir="./baselines")
result = await manager.check_visual_regression("login-test", current_screenshot)
if not result.matches:
    print(f"Visual regression detected: {result.differences}")

πŸ’¬ Plain English Test Creation

Write tests in natural language - no code required:

from e2e_testing_agent.agents import NLPTestCreator

creator = NLPTestCreator()

# Create tests from plain English
test = await creator.create("Login as admin@example.com and verify dashboard shows 5 widgets")
print(test.to_spec())  # Returns executable test specification

# From user stories
tests = await creator.create_from_story("""
As a user, I want to reset my password
So that I can regain access to my account
""")

πŸ•·οΈ Auto-Discovery Mode

Automatically crawl your app and generate test scenarios:

from e2e_testing_agent.agents import AutoDiscovery, QuickDiscover

# Full discovery
discovery = AutoDiscovery(app_url="http://localhost:3000")
result = await discovery.discover(focus_areas=["authentication", "checkout"])
print(f"Discovered {len(result.test_suggestions)} test scenarios")

# Quick discovery for common flows
quick = QuickDiscover(app_url="http://localhost:3000")
login_tests = await quick.discover_login_flow()
critical_tests = await quick.discover_critical_flows()

πŸ“– Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         ORCHESTRATOR (LangGraph)                     β”‚
β”‚                    Manages state, routes to agents                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                           β–Ό                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ CODE ANALYZER β”‚           β”‚ TEST EXECUTOR β”‚           β”‚  SELF-HEALER  β”‚
β”‚    AGENT      β”‚           β”‚    AGENTS     β”‚           β”‚     AGENT     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€           β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€           β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ Parse code  β”‚           β”‚ β€’ UI Tester   β”‚           β”‚ β€’ Analyze failβ”‚
β”‚ β€’ Find tests  β”‚           β”‚ β€’ API Tester  β”‚           β”‚ β€’ Fix selectorβ”‚
β”‚ β€’ Gen specs   β”‚           β”‚ β€’ DB Tester   β”‚           β”‚ β€’ Update testsβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’° Pricing Estimates

ModelInput ($/M tokens)Output ($/M tokens)Use Case
Claude Sonnet 4.5$3.00$15.00Primary testing
Claude Haiku 4.5$0.25$1.25Quick verifications
Claude Opus 4.5$5.00$25.00Complex debugging

Typical costs:

  • Single UI test (10 steps): ~$0.13-0.15
  • 100 tests/day: ~$13-15/day
  • Full test suite: Depends on complexity

πŸ”§ Configuration

# .env file
ANTHROPIC_API_KEY=sk-ant-...

# Model selection
DEFAULT_MODEL=claude-sonnet-4-5
VERIFICATION_MODEL=claude-haiku-4-5
DEBUGGING_MODEL=claude-opus-4-5

# Cost controls
COST_LIMIT_PER_RUN=10.00
COST_LIMIT_PER_TEST=1.00

# Computer Use settings
SCREENSHOT_WIDTH=1920
SCREENSHOT_HEIGHT=1080
MAX_ITERATIONS=50

# Self-healing
SELF_HEAL_ENABLED=true
SELF_HEAL_CONFIDENCE_THRESHOLD=0.8

πŸ”Œ Integrations

GitHub Actions

name: AI E2E Tests
on:
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Start app
        run: docker-compose up -d

      - name: Run AI E2E Tests
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          pip install e2e-testing-agent
          e2e-agent --codebase . --app-url http://localhost:3000 --pr ${{ github.event.number }}

GitHub PR Integration

Test results are automatically posted as PR comments with:

  • Pass/fail summary table
  • Failure details with root cause analysis
  • Links to full reports
from e2e_testing_agent.integrations import GitHubIntegration

github = GitHubIntegration(token="ghp_...")

# Post PR comment
await github.post_pr_comment(
    owner="myorg",
    repo="myapp",
    pr_number=123,
    summary=test_summary
)

# Create check run
await github.create_check_run(owner="myorg", repo="myapp", sha="abc123", summary=test_summary)

Slack Notifications

Get real-time notifications in Slack:

from e2e_testing_agent.integrations import SlackIntegration

slack = SlackIntegration(webhook_url="https://hooks.slack.com/...")

# Send test results
await slack.send_test_results(summary, channel="#qa-alerts")

# Send failure alert (for critical tests)
await slack.send_failure_alert(
    test_id="checkout-flow",
    error="Payment form not loading",
    root_cause="API timeout on /api/stripe/config"
)

Set environment variables for automatic notifications:

SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
# or
SLACK_BOT_TOKEN=xoxb-...

n8n Webhook

from fastapi import FastAPI
from e2e_testing_agent import TestingOrchestrator

app = FastAPI()

@app.post("/webhook/test")
async def run_tests(payload: dict):
    orchestrator = TestingOrchestrator(
        codebase_path=payload["repo_path"],
        app_url=payload["preview_url"],
        pr_number=payload["pr_number"]
    )
    return await orchestrator.run()

Report Export

Reports are automatically saved in multiple formats:

./test-results/run_20250127_143022/
β”œβ”€β”€ results.json      # Machine-readable results
β”œβ”€β”€ report.html       # Interactive HTML report
β”œβ”€β”€ report.md         # Markdown for GitHub/docs
β”œβ”€β”€ junit.xml         # JUnit XML for CI/CD integration
└── screenshots/      # Failure screenshots
    β”œβ”€β”€ login-test_step0.png
    └── checkout_step3.png

πŸ“ Project Structure

e2e-testing-agent/
β”œβ”€β”€ CLAUDE.md                    # Claude Code instructions
β”œβ”€β”€ README.md                    # This file
β”œβ”€β”€ pyproject.toml               # Dependencies
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.py                  # Entry point
β”‚   β”œβ”€β”€ config.py                # Configuration
β”‚   β”œβ”€β”€ orchestrator/
β”‚   β”‚   β”œβ”€β”€ graph.py             # LangGraph state machine
β”‚   β”‚   β”œβ”€β”€ state.py             # State definitions
β”‚   β”‚   └── nodes.py             # Node implementations
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ base.py              # BaseAgent with Claude API
β”‚   β”‚   β”œβ”€β”€ code_analyzer.py     # Codebase analysis
β”‚   β”‚   β”œβ”€β”€ test_planner.py      # Test plan generation
β”‚   β”‚   β”œβ”€β”€ ui_tester.py         # UI test execution
β”‚   β”‚   β”œβ”€β”€ api_tester.py        # API test execution
β”‚   β”‚   β”œβ”€β”€ db_tester.py         # Database validation
β”‚   β”‚   β”œβ”€β”€ self_healer.py       # Auto-fix broken tests
β”‚   β”‚   β”œβ”€β”€ reporter.py          # Report generation
β”‚   β”‚   β”œβ”€β”€ visual_ai.py         # Visual AI regression (like Applitools)
β”‚   β”‚   β”œβ”€β”€ nlp_test_creator.py  # Plain English tests (like testRigor)
β”‚   β”‚   └── auto_discovery.py    # Auto-discovery (like Octomind)
β”‚   β”œβ”€β”€ integrations/
β”‚   β”‚   β”œβ”€β”€ github_integration.py  # GitHub PR comments & checks
β”‚   β”‚   β”œβ”€β”€ slack_integration.py   # Slack notifications
β”‚   β”‚   └── reporter.py            # Multi-format report export
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ browser_abstraction.py  # Multi-framework support
β”‚   β”‚   β”œβ”€β”€ extension_bridge.py     # Chrome extension bridge
β”‚   β”‚   β”œβ”€β”€ playwright_tools.py     # Playwright utilities
β”‚   β”‚   └── api_tools.py            # API testing tools
β”‚   β”œβ”€β”€ computer_use/
β”‚   β”‚   └── client.py            # Computer Use API wrapper
β”‚   β”œβ”€β”€ mcp/
β”‚   β”‚   β”œβ”€β”€ langgraph_mcp.py     # MCP integration
β”‚   β”‚   └── playwright_mcp.py    # Playwright MCP server
β”‚   └── utils/
β”‚       β”œβ”€β”€ logging.py           # Structured logging
β”‚       β”œβ”€β”€ tokens.py            # Token counting & costs
β”‚       └── prompts.py           # Prompt templates
β”œβ”€β”€ extension/                   # Chrome Extension
β”‚   β”œβ”€β”€ manifest.json            # Extension manifest
β”‚   β”œβ”€β”€ background.js            # WebSocket & tab management
β”‚   β”œβ”€β”€ content.js               # DOM access & actions
β”‚   β”œβ”€β”€ popup.html               # Extension UI
β”‚   β”œβ”€β”€ popup.js                 # UI logic
β”‚   └── README.md                # Installation guide
β”œβ”€β”€ skills/
β”‚   └── e2e-testing/
β”‚       └── SKILL.md             # Claude Code skill
└── docs/
    └── ...

πŸ›‘οΈ Security

Enterprise-grade security built in:

FeatureDescription
Secret DetectionAPI keys, passwords, tokens automatically redacted before AI analysis
Data Classification4-level classification (public/internal/confidential/restricted)
User ConsentExplicit approval required before sending data to external services
Audit LoggingSOC2/ISO27001 compliant logging of all AI interactions
PII DetectionAutomatic detection of emails, phone numbers, SSN, credit cards
# Your secrets are NEVER sent to AI
# Original: API_KEY = "sk-ant-1234567890"
# Sent to Claude: API_KEY = "[REDACTED]:api_key"

Additional safeguards:

  • Restricted files (.env, credentials, keys) are never read
  • All file access is logged for compliance
  • Cost limits prevent runaway API usage
  • Browser interactions happen in Docker sandboxes

πŸ“– See docs/SECURITY.md for complete enterprise security documentation

πŸ“š Documentation

🀝 Contributing

Contributions are welcome! Please read the contributing guidelines first.

πŸ“„ License

MIT License - see LICENSE for details.

πŸ™ Acknowledgments

Built with: