Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>AI Testcase GeneratorNew to Visual Studio Code? Get it now.
AI Testcase Generator

AI Testcase Generator

Yakshna Solutions

|
4 installs
| (0) | Free
Generate unit testcases using Google Gemini AI for selected functions or classes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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

  1. Open any file in your project
  2. Place the cursor inside a function or class
  3. Right-click and select Generate Testcases
  4. AI TestGen creates a pytest file and executes it automatically
  5. Test results and logs appear in the results/ folder

Output Structure

project/ ├── testcases/ │ └── <function_name>_test.py ├── results/ │ └── <function_name>_test.log └── src/ └── your code...


Requirements

  • Python 3.x
  • Pytest installed
  • VS Code 1.90.0+

Security

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.


License

MIT License — see LICENSE for details.


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft