AI-powered test automation platform that automatically discovers, designs, generates, and executes end-to-end tests for web applications.
+-------------------+
| Web Dashboard |
+--------+----------+
|
+--------v----------+
| API Server |
| (Go + Chi) |
+--------+----------+
|
+------------------------------+------------------------------+
| | |
+---------v---------+ +----------v----------+ +--------v--------+
| PostgreSQL | | Temporal | | Redis |
| (Data Store) | | (Orchestration) | | (Cache) |
+-------------------+ +----------+----------+ +-----------------+
|
+------------------------------+------------------------------+
| | |
+---------v---------+ +----------v----------+ +--------v--------+
| Discovery | | Test Design | | Script Gen |
| (Playwright) | | (Claude AI) | | (Playwright) |
+-------------------+ +---------------------+ +-----------------+
| | |
+------------------------------+------------------------------+
|
+------------------------------+------------------------------+
| | |
+---------v---------+ +----------v----------+ +--------v--------+
| Execution | | Self-Healing | | Reporting |
| (Playwright) | | (Claude AI) | | (Claude AI) |
+-------------------+ +---------------------+ +-----------------+
# Clone the repository
git clone https://github.com/testforge/testforge.git
cd testforge
# Install Go dependencies
go mod download
# Install Playwright browsers
npx playwright install chromium
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
The quickest way to see TestForge in action:
# Set your Anthropic API key
export ANTHROPIC_API_KEY=your-api-key
# Run the demo
go run cmd/demo/main.go --url="https://example.com" --max-pages=5
# Start dependencies (PostgreSQL, Redis, Temporal)
docker-compose up -d
# Run database migrations
go run cmd/migrate/main.go up
# Start the API server
go run cmd/api/main.go
testforge/
├── cmd/ # Application entry points
│ ├── api/ # REST API server
│ ├── demo/ # Standalone demo
│ ├── worker/ # Temporal worker
│ ├── testdesign/ # Test design CLI
│ └── scriptgen/ # Script generation CLI
├── internal/
│ ├── api/ # HTTP handlers and routes
│ ├── config/ # Configuration management
│ ├── domain/ # Domain models and interfaces
│ ├── llm/ # LLM client (Claude)
│ ├── repository/ # Data access layer
│ └── services/ # Business logic
│ ├── discovery/ # Web crawler
│ ├── testdesign/ # AI test design
│ ├── scriptgen/ # Script generation
│ ├── execution/ # Test execution
│ ├── healing/ # Self-healing
│ └── reporting/ # Report generation
├── pkg/ # Shared utilities
├── services/ # Microservices
│ └── visual-ai/ # Visual testing service (Python)
├── docs/ # Documentation
│ ├── api/ # API documentation
│ └── architecture/ # Architecture docs
└── migrations/ # Database migrations
Full API documentation is available:
docs/api/openapi.yaml# Create a tenant
curl -X POST http://localhost:8080/api/v1/tenants \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "My Company", "slug": "my-company"}'
# Create a project
curl -X POST http://localhost:8080/api/v1/tenants/$TENANT_ID/projects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-ID: $TENANT_ID" \
-d '{"name": "E-Commerce Site", "base_url": "https://example.com"}'
# Start a test run
curl -X POST http://localhost:8080/api/v1/runs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-ID: $TENANT_ID" \
-d '{"project_id": "$PROJECT_ID"}'
# Get test run status
curl http://localhost:8080/api/v1/runs/$RUN_ID \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-ID: $TENANT_ID"
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY | Anthropic API key for Claude | Required |
DATABASE_URL | PostgreSQL connection string | postgres://localhost/testforge |
REDIS_URL | Redis connection string | redis://localhost:6379 |
TEMPORAL_HOST | Temporal server address | localhost:7233 |
PORT | API server port | 8080 |
LOG_LEVEL | Logging level | info |
Create config.yaml for detailed configuration:
server:
port: 8080
read_timeout: 30s
write_timeout: 30s
database:
host: localhost
port: 5432
name: testforge
user: postgres
password: secret
max_open_conns: 25
max_idle_conns: 5
redis:
host: localhost
port: 6379
db: 0
temporal:
host: localhost
port: 7233
namespace: testforge
llm:
model: claude-sonnet-4-20250514
max_tokens: 16384
temperature: 0.7
rate_limit_rpm: 50
# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific package tests
go test ./internal/services/discovery/...
# Build all binaries
go build -o bin/ ./cmd/...
# Build specific binary
go build -o bin/api ./cmd/api
# Run golangci-lint
golangci-lint run
# Fix auto-fixable issues
golangci-lint run --fix
When you start a test run, TestForge executes the following stages:
Discovery - Crawls the target URL using Playwright
Test Design - AI generates test cases
Script Generation - Creates Playwright scripts
Execution - Runs the generated tests
Self-Healing - Repairs broken tests
Reporting - Generates comprehensive reports
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT License - see LICENSE for details.
33 commits
Go
88.4%
Python
7.1%
PLpgSQL
3.9%
AI-powered test automation platform that automatically discovers, designs, generates, and executes end-to-end tests for web applications.
+-------------------+
| Web Dashboard |
+--------+----------+
|
+--------v----------+
| API Server |
| (Go + Chi) |
+--------+----------+
|
+------------------------------+------------------------------+
| | |
+---------v---------+ +----------v----------+ +--------v--------+
| PostgreSQL | | Temporal | | Redis |
| (Data Store) | | (Orchestration) | | (Cache) |
+-------------------+ +----------+----------+ +-----------------+
|
+------------------------------+------------------------------+
| | |
+---------v---------+ +----------v----------+ +--------v--------+
| Discovery | | Test Design | | Script Gen |
| (Playwright) | | (Claude AI) | | (Playwright) |
+-------------------+ +---------------------+ +-----------------+
| | |
+------------------------------+------------------------------+
|
+------------------------------+------------------------------+
| | |
+---------v---------+ +----------v----------+ +--------v--------+
| Execution | | Self-Healing | | Reporting |
| (Playwright) | | (Claude AI) | | (Claude AI) |
+-------------------+ +---------------------+ +-----------------+
# Clone the repository
git clone https://github.com/testforge/testforge.git
cd testforge
# Install Go dependencies
go mod download
# Install Playwright browsers
npx playwright install chromium
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
The quickest way to see TestForge in action:
# Set your Anthropic API key
export ANTHROPIC_API_KEY=your-api-key
# Run the demo
go run cmd/demo/main.go --url="https://example.com" --max-pages=5
# Start dependencies (PostgreSQL, Redis, Temporal)
docker-compose up -d
# Run database migrations
go run cmd/migrate/main.go up
# Start the API server
go run cmd/api/main.go
testforge/
├── cmd/ # Application entry points
│ ├── api/ # REST API server
│ ├── demo/ # Standalone demo
│ ├── worker/ # Temporal worker
│ ├── testdesign/ # Test design CLI
│ └── scriptgen/ # Script generation CLI
├── internal/
│ ├── api/ # HTTP handlers and routes
│ ├── config/ # Configuration management
│ ├── domain/ # Domain models and interfaces
│ ├── llm/ # LLM client (Claude)
│ ├── repository/ # Data access layer
│ └── services/ # Business logic
│ ├── discovery/ # Web crawler
│ ├── testdesign/ # AI test design
│ ├── scriptgen/ # Script generation
│ ├── execution/ # Test execution
│ ├── healing/ # Self-healing
│ └── reporting/ # Report generation
├── pkg/ # Shared utilities
├── services/ # Microservices
│ └── visual-ai/ # Visual testing service (Python)
├── docs/ # Documentation
│ ├── api/ # API documentation
│ └── architecture/ # Architecture docs
└── migrations/ # Database migrations
Full API documentation is available:
docs/api/openapi.yaml# Create a tenant
curl -X POST http://localhost:8080/api/v1/tenants \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "My Company", "slug": "my-company"}'
# Create a project
curl -X POST http://localhost:8080/api/v1/tenants/$TENANT_ID/projects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-ID: $TENANT_ID" \
-d '{"name": "E-Commerce Site", "base_url": "https://example.com"}'
# Start a test run
curl -X POST http://localhost:8080/api/v1/runs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-ID: $TENANT_ID" \
-d '{"project_id": "$PROJECT_ID"}'
# Get test run status
curl http://localhost:8080/api/v1/runs/$RUN_ID \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-ID: $TENANT_ID"
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY | Anthropic API key for Claude | Required |
DATABASE_URL | PostgreSQL connection string | postgres://localhost/testforge |
REDIS_URL | Redis connection string | redis://localhost:6379 |
TEMPORAL_HOST | Temporal server address | localhost:7233 |
PORT | API server port | 8080 |
LOG_LEVEL | Logging level | info |
Create config.yaml for detailed configuration:
server:
port: 8080
read_timeout: 30s
write_timeout: 30s
database:
host: localhost
port: 5432
name: testforge
user: postgres
password: secret
max_open_conns: 25
max_idle_conns: 5
redis:
host: localhost
port: 6379
db: 0
temporal:
host: localhost
port: 7233
namespace: testforge
llm:
model: claude-sonnet-4-20250514
max_tokens: 16384
temperature: 0.7
rate_limit_rpm: 50
# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific package tests
go test ./internal/services/discovery/...
# Build all binaries
go build -o bin/ ./cmd/...
# Build specific binary
go build -o bin/api ./cmd/api
# Run golangci-lint
golangci-lint run
# Fix auto-fixable issues
golangci-lint run --fix
When you start a test run, TestForge executes the following stages:
Discovery - Crawls the target URL using Playwright
Test Design - AI generates test cases
Script Generation - Creates Playwright scripts
Execution - Runs the generated tests
Self-Healing - Repairs broken tests
Reporting - Generates comprehensive reports
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT License - see LICENSE for details.
33 commits
Go
88.4%
Python
7.1%
PLpgSQL
3.9%