Self-Healing Automated Testing Platform for QA Engineers and Product Managers
TestForge is an intelligent test automation platform that combines browser (E2E) and API testing with a revolutionary Self-Healing system. When UI elements change, TestForge automatically adapts using multi-layer selector strategies, reducing test maintenance to near zero.
- Service โ Feature โ Scenario โ Step
- Organize tests by business logic, not technical implementation
- Perfect for large applications with multiple features
- Multi-layer selectors: testId โ role โ text โ label โ css โ xpath
- Automatic fallback when UI changes
- Confidence scoring for healing suggestions
- Approval workflow for production safety
- Extract common flows (login, navigation, setup)
- Parameterize and reuse across scenarios
- Track component usage across all scenarios
- Browser automation with Playwright
- API testing with request/response validation
- Mixed scenarios: Combine browser and API steps seamlessly
- Live step-by-step progress via Server-Sent Events (SSE)
- Instant feedback on test execution
- Visual healing indicators
- Visual scenario editor
- Point-and-click step creation
- QA engineers and product managers can create tests
Before you begin, ensure you have the following installed:
# macOS, Linux, WSL
curl -fsSL https://bun.sh/install | bash
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"- Clone the repository
git clone https://github.com/yourusername/testforge.git
cd testforge- Install dependencies
bun install- Install Playwright browsers
bunx playwright install chromium- Initialize the database
bun run db:migrate- Seed sample data (optional)
bun run db:seedStart both server and web app (recommended):
bun run devThis will start:
- ๐ฅ๏ธ API Server: http://localhost:3001
- ๐ Web UI: http://localhost:3000
Or start them individually:
# Terminal 1 - API Server
bun run dev:server
# Terminal 2 - Web UI
bun run dev:web- Open the web UI: http://localhost:3000
- Create a Service: Click "New Service", enter name and base URL
- Create a Feature: Select your service, add a feature
- Create a Scenario: Add steps using the visual editor
- Run the test: Click the "
โถ๏ธ Run" button - Watch it execute: See real-time step-by-step progress
- Bun - Fast all-in-one JavaScript runtime
- TypeScript - Type safety across the stack
- Bun Workspace - Monorepo management
- React 18 - UI framework
- Rsbuild - Fast Rspack-based build tool
- React Router - Client-side routing
- Zustand - Lightweight state management
- TanStack Query - Server state management
- Tailwind CSS - Utility-first CSS
- shadcn/ui - High-quality React components
- Axios - HTTP client
- Hono - Ultrafast web framework
- Hono RPC - Type-safe client-server communication
- DuckDB - Embedded analytical database
- Drizzle ORM - TypeScript ORM
- Zod - Schema validation
- Playwright - Browser automation
- Built-in Fetch API - HTTP/API testing
testforge/
โโโ packages/
โ โโโ core/ # Core test execution logic
โ โ โโโ src/
โ โ โ โโโ executor/ # Test execution engine
โ โ โ โ โโโ engine.ts # Main TestExecutor class
โ โ โ โโโ locator/ # Multi-layer selector resolution
โ โ โ โ โโโ resolver.ts # LocatorResolver with Self-Healing
โ โ โ โโโ healing/ # Self-Healing tracking
โ โ โ โ โโโ tracker.ts # HealingTracker
โ โ โ โโโ api/ # API testing client
โ โ โ โ โโโ client.ts # HTTP request executor
โ โ โ โโโ types/ # TypeScript type definitions
โ โ โ โโโ index.ts # All core types (PRD Section 3)
โ โ โโโ package.json
โ โ
โ โโโ server/ # API Server (Hono)
โ โ โโโ src/
โ โ โ โโโ routes/ # API endpoints
โ โ โ โ โโโ services.ts # Service CRUD
โ โ โ โ โโโ features.ts # Feature CRUD
โ โ โ โ โโโ scenarios.ts # Scenario CRUD + execution
โ โ โ โ โโโ components.ts # Component CRUD
โ โ โ โ โโโ healing.ts # Healing records
โ โ โ โ โโโ runs.ts # Test runs + SSE stream
โ โ โ โโโ db/ # Database layer
โ โ โ โ โโโ schema.ts # Drizzle schema definitions
โ โ โ โ โโโ database.ts # Database operations
โ โ โ โ โโโ connection.ts # DuckDB connection
โ โ โ โ โโโ migrate.ts # Migration runner
โ โ โ โโโ execution/ # Test execution management
โ โ โ โ โโโ manager.ts # ExecutionManager (singleton)
โ โ โ โโโ middleware/ # Middleware
โ โ โ โ โโโ errorHandler.ts # Global error handler
โ โ โ โโโ utils/ # Utilities
โ โ โ โ โโโ errors.ts # Custom error classes
โ โ โ โโโ index.ts # Server entry point
โ โ โโโ package.json
โ โ
โ โโโ web/ # Frontend (React + Rsbuild)
โ โโโ src/
โ โ โโโ components/ # UI components
โ โ โ โโโ ui/ # shadcn/ui components
โ โ โ โโโ ... # Custom components
โ โ โโโ pages/ # Route pages
โ โ โ โโโ Dashboard.tsx # Home dashboard
โ โ โ โโโ Services.tsx # Service list
โ โ โ โโโ ServiceDetail.tsx # Service detail
โ โ โ โโโ FeatureDetail.tsx # Feature detail
โ โ โ โโโ ScenarioEditor.tsx # Scenario editor
โ โ โ โโโ Components.tsx # Component list
โ โ โ โโโ ComponentEditor.tsx # Component editor
โ โ โ โโโ Runs.tsx # Test run history
โ โ โ โโโ RunDetail.tsx # Run detail (SSE)
โ โ โ โโโ Healing.tsx # Healing dashboard
โ โ โโโ lib/ # Utilities
โ โ โ โโโ api.ts # API client (Axios)
โ โ โโโ stores/ # Zustand stores
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ App.tsx # App root
โ โ โโโ main.tsx # Entry point
โ โโโ rsbuild.config.ts # Rsbuild configuration
โ โโโ package.json
โ
โโโ scripts/ # Development scripts
โ โโโ dev.ts # Concurrent dev server launcher
โ โโโ seed.ts # Database seeding script
โ
โโโ docs/ # Documentation
โ โโโ PRD.md # Product Requirements Document
โ โโโ USER_GUIDE.md # User documentation
โ
โโโ CLAUDE.md # Claude Code project guide
โโโ HEALING_DASHBOARD_ENHANCEMENTS.md # Recent work log
โโโ package.json # Root workspace config
โโโ bunfig.toml # Bun configuration
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # This file
| Command | Description |
|---|---|
bun run dev |
Start both server and web app in parallel |
bun run dev:server |
Start API server only (port 3001) |
bun run dev:web |
Start web app only (port 3000) |
bun run build |
Build both server and web for production |
bun run build:server |
Build server only |
bun run build:web |
Build web only |
bun run db:migrate |
Run database migrations |
bun run db:seed |
Seed database with sample data |
bun run test |
Run test suite |
bun run lint |
Lint TypeScript files |
bun run typecheck |
Type check without emitting files |
- Make changes to code in
packages/ - Hot reload is enabled for both server and web
- Type checking runs automatically in your editor (VS Code recommended)
- Lint before committing:
bun run lint - Run tests:
bun test
For the entire workspace:
bun add <package>For a specific package:
cd packages/web
bun add <package>For development only:
bun add -d <package>View database contents:
# Install DuckDB CLI (optional)
# macOS
brew install duckdb
# Then query
duckdb testforge.duckdb
> SELECT * FROM services;
> .tables -- list all tables
> .quitReset database:
rm testforge.duckdb
bun run db:migrate
bun run db:seedcd packages/web
# Add a new component
bunx shadcn@latest add <component-name>
# Examples
bunx shadcn@latest add button
bunx shadcn@latest add dialog
bunx shadcn@latest add table# Run all tests
bun test
# Run tests in watch mode
bun test --watch
# Run tests in a specific package
cd packages/core
bun test# Create a test file next to your source
# Example: packages/core/src/locator/resolver.test.ts
import { describe, test, expect } from "bun:test";
import { LocatorResolver } from "./resolver";
describe("LocatorResolver", () => {
test("should resolve element by testId", async () => {
// Test implementation
});
});User Action (Web UI)
โ
API Request (Hono RPC)
โ
Business Logic (Server)
โ
Database (DuckDB) or Test Execution (Core)
โ
Response / SSE Events
โ
UI Update (React + TanStack Query)
1. Scenario Loaded
โ
2. Variables Initialized
โ
3. Browser Context Created (Playwright)
โ
4. Steps Executed Sequentially
โโ Component Steps โ Expanded to sub-steps
โโ Browser Steps โ LocatorResolver โ Self-Healing
โโ API Steps โ HTTP Request + Validation
โ
5. Results Saved to Database
โ
6. SSE Events Sent to Client
โ
7. Browser Cleanup
1. Try primary locator strategy (e.g., testId)
โ
2. Element not found?
โ
3. Try fallback strategies (role โ text โ css)
โ
4. Element found with fallback?
โ
5. Create HealingRecord with confidence score
โ
6. Auto-approve if confidence > threshold
โ
7. Otherwise, await manual approval
โ
8. Approved? Update scenario with healed locator
- Product Requirements Document (PRD) - Complete technical specification
- User Guide - How to use TestForge
- Claude Code Guide - Development guidelines for AI agents
- Healing Dashboard Enhancements - Recent feature work
- Monorepo setup
- Database schema & migrations
- Basic CRUD APIs
- Frontend structure
- Multi-layer locator system
- Self-Healing detection
- Healing approval workflow
- Confidence scoring
- Reusable component system
- Component parameter binding
- API request/assert steps
- Response validation
- Real-time SSE execution
- Error handling
- Scenario duplication
- Screenshot improvements
- Advanced search/filtering
- Comprehensive documentation
- CI/CD integration (GitHub Actions, GitLab CI)
- Multi-browser support (Firefox, Safari)
- Visual regression testing
- Test result analytics dashboard
- AI-powered test generation
- Mobile app testing (iOS, Android)
- Performance testing support
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow the coding conventions (see CLAUDE.md)
- Read the PRD before implementing features
- Write tests for new functionality
- Run linting:
bun run lint - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
feat: add new feature
fix: bug fix
refactor: code refactoring
docs: documentation updates
chore: dependency updates, config changes
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Add to PATH (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.bun/bin:$PATH"bunx playwright install chromium# Reset the database
rm testforge.duckdb
bun run db:migrate# Find and kill process on port 3000 or 3001
lsof -ti:3000 | xargs kill -9
lsof -ti:3001 | xargs kill -9# Full type check
bun run typecheck
# Clean install
rm -rf node_modules bun.lockb
bun installThis project is licensed under the MIT License - see the LICENSE file for details.
- Bun - For the amazing runtime
- Hono - For the ultrafast web framework
- Playwright - For reliable browser automation
- shadcn/ui - For beautiful, accessible components
- DuckDB - For the embedded analytical database
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@testforge.dev
Built with โค๏ธ by the TestForge Team
Website โข Documentation โข Twitter