SpecForge — AI-Powered Test Generation
Generate, run, and self-heal unit & integration tests directly inside VS Code using a multi-agent AI pipeline.
Features
|
|
| One-click generation |
Right-click any file → Generate Tests with SpecForge |
| Workspace scan |
Automatically finds all untested files across your project |
| 3-agent pipeline |
Code Analyzer → Test Planner → Test Generator |
| Self-healing tests |
Automatically fixes failing tests (up to 3 attempts) |
| Multi-file context |
Reads your imports so the AI understands real types |
| Live dashboard |
Track every run — in VS Code or in the browser |
| Multi-language |
TypeScript, JavaScript, Python |
Requirements
- VS Code 1.85+
- Access to the SpecForge server (hosted or local)
- An SpecForge account (free)
Quick Start
1. Install the extension
Install specforge-0.1.0.vsix via:
Extensions panel → ··· → Install from VSIX
2. Sign in
Open the Command Palette (Ctrl+Shift+P) and run:
SpecForge: Sign In
Enter your email and password. Your session is stored securely in VS Code SecretStorage.
3. Generate your first test
Right-click any .ts, .js, or .py file in the Explorer:
Generate Tests with SpecForge
A test file is created next to your source file and runs automatically.
4. View results
Click the 🧪 SpecForge icon in the Activity Bar to open the sidebar.
Click Open Dashboard to see full test history.
Commands
| Command |
Description |
SpecForge: Generate Tests |
Generate tests for the selected file |
SpecForge: Generate Tests for Workspace |
Scan workspace and generate tests for all untested files |
SpecForge: Run All Tests |
Run all existing test files in the workspace |
SpecForge: Open Dashboard |
Open the dashboard inside VS Code |
SpecForge: Sign In |
Sign in to the SpecForge server |
SpecForge: Sign Out |
Sign out |
SpecForge: Start Tour |
Open the interactive product tour |
Extension Settings
| Setting |
Default |
Description |
specforge.serverUrl |
https://your-server.com |
SpecForge server URL |
Configure in VS Code Settings (Ctrl+,) → search SpecForge.
How It Works
Your source file
↓
┌──────────────────┐
│ Agent 1 │ Analyzes functions, classes, types, imports
│ Code Analyzer │
└────────┬─────────┘
↓
┌──────────────────┐
│ Agent 2 │ Plans test cases: happy path, edge, error
│ Test Planner │
└────────┬─────────┘
↓
┌──────────────────┐
│ Agent 3 │ Writes clean, runnable test code
│ Test Generator │
└────────┬─────────┘
↓
Run Tests
↓ (if failing)
┌──────────────────┐
│ Self-Healing │ Reads error output → fixes test → re-runs
│ Fix Loop ×3 │
└────────┬─────────┘
↓
✅ Green Tests
Supported Languages
| Language |
Test Framework |
Test File |
| TypeScript / TSX |
Jest |
filename.test.ts |
| JavaScript / JSX |
Jest |
filename.test.js |
| Python |
Pytest |
test_filename.py |
Dashboard
The dashboard is accessible in two ways:
- Inside VS Code — Click Open Dashboard in the SpecForge sidebar
- In Browser — Navigate to
<server-url>/dashboard
Dashboard features:
- Test Suites — Latest result per source file
- Run History — All executions with expandable test case details
- Stats — Pass rate, total tests, average generation time
Troubleshooting
Extension shows "Server error"
- Ensure the SpecForge server is running and the
serverUrl setting is correct
- Check the server URL in Settings →
specforge.serverUrl
Tests fail immediately after generation
- The self-healing loop will automatically attempt to fix them
- After 3 failed attempts, open the test file and check the error in the terminal
"No supported source files found"
- Only
.ts, .tsx, .js, .jsx, .py files are supported
- Ensure you have a workspace folder open (not just a single file)
Generated tests have wrong imports
- The AI uses the file's import statements as context
- Ensure your source file has proper import/require statements
Privacy
- Source code is sent to the SpecForge server for AI processing
- No code is stored permanently — it is used only to generate tests
- Authentication tokens are stored in VS Code's encrypted SecretStorage
License
MIT © SpecForge