AI-powered autonomous testing agent that reads your codebase, generates exhaustive test suites, executes them in isolated sandboxes, and delivers results directly to your repository.
Software testing is broken.
Developers write tests that confirm what they already know. They test the happy path, the obvious edge cases, and the things they expect to work. The bugs that make it to production are the ones nobody thought to testβrace conditions, memory leaks, concurrency issues, security holes, and performance cliffs hiding in the corners of the codebase.
Writing good tests is tedious. Writing great tests requires thinking like an attacker. Most developers are not attackers. They are builders.
TestFang is the attacker.
TestFang ingests your entire repository, understands its structure, dependencies, and critical paths, and generates a test suite designed to break your code. It does not test for coverage. It tests for destruction.
The test suite runs in an isolated microVM. If the tests pass, TestFang opens a pull request with the generated test files. If the tests fail, it opens an issue with detailed failure logs, stack traces, and an analysis of what went wrong.
You do not write tests. You review them.
You initiate a test run via the CLI or dashboard. TestFang clones your repository and prepares the environment.
Firecracker boots a lightweight microVM. Startup takes approximately 125 milliseconds and consumes roughly 5 megabytes of memory. The VM is isolated from the host system and from other test runs.
The microVM installs the DeepSeek TUI agent via npm. This provides the AI with the capability to read files, write files, execute shell commands, and interact with the repository.
Secrets required for the run (API keys, tokens) are stored encrypted using .anv. They are decrypted at runtime and injected into the environment. No secrets are written to disk.
The AI reads your entire repository. It analyzes file structure, dependencies, function signatures, error handling patterns, concurrency primitives, and security boundaries. Nothing is ignored.
The AI writes a comprehensive test suite. It targets:
- Boundary conditions
- Null and undefined handling
- Concurrency and race conditions
- Error recovery paths
- Security vulnerabilities
- Performance regressions
- Type mismatches
- Invalid input handling
The AI executes the tests inside the sandbox. It captures stdout, stderr, exit codes, and any generated artifacts.
If all tests pass:
- The AI stages the test files
- Creates a new branch
- Commits and pushes
- Opens a pull request with a detailed description of what was tested and why
If any tests fail:
- The AI gathers failure logs
- Analyzes the root cause where possible
- Opens an issue with the logs and recommended fixes
The microVM terminates. All state is destroyed. No logs remain on disk. No secrets persist.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Action β
β CLI or Dashboard Trigger β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Firecracker MicroVM β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Runtime Installation β β
β β npm install -g deepseek-tui β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Secret Decryption β β
β β .anv decrypt β environment variables β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β AI Agent β β
β β - Reads repository β β
β β - Writes test files β β
β β - Executes test commands β β
β β - Interprets results β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Outcome β β
β β βββββββββββββββββ βββββββββββββββββ β β
β β β Tests Pass β β Tests Fail β β β
β β β Open PR β β Open Issue β β β
β β βββββββββββββββββ βββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cleanup β
β VM terminates. State destroyed. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
TestFang employs two AI models in adversarial validation.
The primary model generates the test suite. It is instructed to be ruthless, exhaustive, and destructive.
The validator model reviews the generated test suite. It identifies gaps, challenges assumptions, and proposes additional tests. The validator is instructed to be even more critical than the primary model.
This adversarial process ensures that the final test suite is comprehensive. The first model writes the tests. The second model tries to break them. If the validator finds a flaw, the primary model revises the test suite. The process repeats until the validator is satisfied.
No single model is trusted. The system trusts the conflict between them.
Integrate TestFang into your CI pipeline. Run tests on every pull request before merge. Catch issues before they reach production.
Run TestFang before major releases. Ensure that critical paths have been tested exhaustively.
For projects with minimal test coverage, TestFang can generate an initial test suite that covers the entire codebase. This provides a safety net for refactoring.
Use TestFang to identify security vulnerabilities. The AI is instructed to think like an attacker and test for injection, privilege escalation, and data exposure.
TestFang can generate performance tests that stress your system under load. Identify bottlenecks before they impact users.
Each test run executes in its own Firecracker microVM. The VM has its own kernel and memory space. No test run can interfere with another.
All secrets are stored encrypted using .anv. They are decrypted at runtime and injected into the environment. No secrets are written to disk. The VM terminates and the secrets are gone.
The AI runs as a non-privileged user. It cannot modify system files, access other processes, or escalate privileges.
Network access is restricted. The AI can communicate with GitHub for PR/issue creation. It cannot reach arbitrary external services.
No test artifacts persist after the VM terminates. Logs, test files, and generated data are destroyed. The only persistent output is the PR or issue opened in your repository.
| Plan | Price | Features |
|---|---|---|
| Self-Hosted | $0 | Full source code. You configure and run your own infrastructure. |
| Pay-Per-Run | $3 | One full test suite run. PR or issue generated. No commitments. |
| Enterprise | Custom | Volume pricing. Dedicated infrastructure. Audit logs. SLA. |
No subscriptions. No recurring charges. You pay only when you run tests.
git clone https://github.com/slick-lab/testfang
cd testfang
zig build
./zig-out/bin/testfang --helpVisit testfang.com. Sign up. Add your repository. Run tests from the dashboard.
$ testfang run https://github.com/your-org/your-repo
Cloning repository...
Repository cloned. Analyzing structure...
AI analyzing 147 files...
AI generating test suite...
- Edge cases: 24 tests
- Concurrency: 12 tests
- Security: 8 tests
- Performance: 6 tests
Running tests...
Passed: 47 / 50
Failed: 3 tests
Opening issue with failure logs...
Issue opened: https://github.com/your-org/your-repo/issues/104Happy path tests are for beginners.
Ruthless tests are for production.
TestFang does not test for coverage. It tests for destruction. The goal is not to confirm that your code works. The goal is to find all the ways it can break.
If your code survives TestFang, it is ready for production. If it does not survive, you have a clear understanding of what needs to be fixed.
Contributions are welcome.
- Open an issue to report a bug or request a feature
- Submit a pull request with improvements
- Join the community discussions
See CONTRIBUTING.md for detailed guidelines.
MIT
- GitHub Issues: bug reports and feature requests
- Community Forum: discussions and questions
Any language. The AI adapts to the repository structure and generates appropriate test commands.
Can I run TestFang on private repositories?
Yes. The CLI and SaaS versions support both public and private repositories.
Typically 2-5 minutes, depending on repository size and test complexity.
TestFang clones your repository into a temporary directory within the microVM. It writes test files, executes them, and then destroys the VM. Your code is not stored or shared.
Yes. TestFang opens a pull request. You review the generated tests before merging.
The validator model reviews all generated tests. If the validator identifies issues, the primary model revises the tests. The process repeats until the validator is satisfied.
The self-hosted version is free. You provide your own infrastructure and API keys. The SaaS version is pay-per-run.
You provide your own DeepSeek API key for self-hosted deployments. The SaaS version includes API access in the per-run price.