AI TestGen – AI-Powered Testcase Generator for VS Code
AI TestGen is a Visual Studio Code extension that generates pytest-based unit tests using Google Gemini AI.
Select any function or class, trigger the command, and the extension automatically analyzes the code, identifies dependencies, and produces complete test files — ready to run.
Key Features
AI-generated pytest testcases for functions and classes
Automatic function/class detection based on cursor position
Project-wide file scanning to understand code structure
AI-driven related file analysis (imports, OOP relationships, helper modules)
Autogenerated test files saved under testcases/
Integrated pytest execution with logs stored under results/
Secure Gemini API key handling through external API
Works with JS, TS, C#, Python logic, or any code convertible to Python tests
Usage
Open any file in your project
Place the cursor inside a function or class
Right-click and select Generate Testcases
AI TestGen creates a pytest file and executes it automatically
Test results and logs appear in the results/ folder
The Gemini API key is not stored inside the extension.
It is retrieved securely through a custom API endpoint, making the extension safe for marketplace publishing.
Support
For issues or feature requests, contact Yakshna Solutions or raise a ticket in your Azure DevOps project.