TestForge is a powerful VS Code extension that uses AI to automatically generate comprehensive unit tests for your code. Supporting multiple programming languages, TestForge helps you ship your code faster and more reliably with AI-generated tests that cover edge cases and maintain high code quality.
Features
Smart Test Generation: Automatically generates unit tests for individual functions or entire files
Multi-Language Support:
Full support for TypeScript, JavaScript, Python, and Go
Preliminary support for Java and Rust
Context-Aware: Analyzes function dependencies and imports to create accurate and comprehensive tests
Easy Integration: Right-click menu integration for quick test generation
Customizable Output: Generated tests are saved in the same directory with customizable naming
Getting Started
Install the TestForge extension from the VS Code marketplace
Open a supported file (TypeScript, JavaScript, Python, Go, Java, or Rust)
Right-click on a function and select "TestForge: Generate Tests" or use the command palette
Commands
TestForge: Generate Tests - Generate tests for the function at cursor position
TestForge: Generate Tests for File - Generate tests for all functions in the current file
TestForge: Clear Invite Code - Clear the stored invite code
Requirements
VS Code version 1.31.0 or higher
Valid TestForge invite code (get one at testforge.ai)
Usage
Generate Tests for a Single Function:
Place your cursor inside a function
Right-click and select "TestForge: Generate Tests"
Tests will be generated in a new file with appropriate naming for your language:
TypeScript/JavaScript: test_[filename].ts/.js
Python: test_[filename].py
Go: [filename]_test.go
Java: [filename]Test.java
Rust: [filename]_test.rs
Generate Tests for an Entire File:
Open any supported file
Right-click and select "TestForge: Generate Tests for File"
Tests will be generated for all functions in the file
Extension Settings
Currently, TestForge requires an invite code which can be entered when first using the extension. You can clear the stored invite code using the TestForge: Clear Invite Code command.
Known Limitations
Test generation may take longer for large files with many dependencies
Rate limiting may occur when generating multiple tests in succession
Java and Rust support is preliminary and may not cover all language features
Release Notes
0.0.1
Initial release of TestForge:
Full support for TypeScript, JavaScript, Python, and Go