Generate comprehensive, edge-case test cases using the Gemini API and automatically evaluate your competitive programming solutions right inside VS Code.
Features
- Gemini Integration: Automatically parses competitive programming problem links and generates exactly 10 high-quality test cases, complete with descriptions explaining the specific edge cases being tested.
- Auto-Execution: Directly runs your active solution file (supports Python, JavaScript/Node.js, C++, and Java) by feeding the generated inputs into
stdinand verifyingstdout. - Rich UI: View the generated test cases and their execution statuses in a beautiful, responsive Webview panel.
Usage
- Setup API Key: Create a
.envfile in the extension root directory and addGEMINI_API_KEY=your_api_key. - Open your solution: Open your code file (e.g.,
solution.pyormain.cpp). - Open the Panel: Run the command
Test Case Generator: Open Panelfrom the Command Palette (Ctrl+Shift+P). - Generate: Paste the link to a LeetCode or Codeforces problem, and click Generate Test Cases.
- Run: Review the generated test cases, then click Run All Test Cases to execute them against your solution.
Supported Languages
- Python
- JavaScript (Node.js)
- C++ (auto-compiles via
g++) - Java
Requirements
- You must have the respective language runtimes installed on your system (e.g.,
python,node,g++,java). - A Gemini API key.
Release Notes
1.0.0
- Initial release of the Test Case Generator.