Overview Version History Q & A Rating & Review
WeTest - LLM Test Generator for VS Code
Overview
WeTest is a VS Code extension that generates test code for various programming languages using LLMs like Gemini and GPT. It supports unit testing, API testing, and UI automation script generation.
1️⃣ Prerequisites
✅ Required Software
✅ LLM API Key Setup
You need at least one API key for a supported LLM (currently Gemini, GPT , with more coming in the future).
2️⃣ Installation Methods
📌 Install from VS Code Marketplace
Open VS Code.
Go to Extensions (Ctrl + Shift + X ).
Search for "WeTest" .
Click Install .
📌 Install from VSIX File
If you have a .vsix
file:
Open VS Code.
Press Ctrl + Shift + P → Type "Extensions: Install from VSIX" .
Select the .vsix
file and install.
📌 Install from Source (Development Mode)
Clone the repository:
git clone [this repository link]
Install dependencies:
npm install
Build the extension:
npm run compile
Launch the extension in a new VS Code window:
3️⃣ First-time Configuration
Open the Command Palette (Ctrl + Shift + P ).
Search for "WeTest: Configure API Keys" .
Select the active LLM and enter API keys for the supported models.
Click Save to apply the settings.
The settings will be saved in settings.json
.
4️⃣ How to Use
WeTest generates different types of test code using LLMs.
🔹 Steps to Use Any Command
Press Ctrl + Shift + P to open the Command Palette.
Search for and select the desired WeTest command.
Choose the file or folder (if required).
Select the programming language and framework.
Monitor task status (In Progress, Completed, Failed ) in the WeTest panel (click the WeTest extension icon on the left screen).
📌 Available Commands
WeTest: Generate Unit Test For Folder → Generate unit tests for all files in a folder.
WeTest: Generate Unit Test For File → Generate unit tests for a specific file.
WeTest: Generate Unit Test For Selected Code → Generate unit tests for highlighted code.
WeTest: Generate API Test Code For File → Generate API test code to call real API endpoints for APIs in a selected file.
WeTest: Generate Mocking API Test Code For File → Generate unit tests with mocked API responses.
WeTest: Generate UI Script → Generate UI automation scripts for front-end testing.
5️⃣ Troubleshooting
❌ Extension not working?
Reload VS Code (Ctrl + Shift + P → "Developer: Reload Window" ).
Ensure your API key is valid in the settings.
Check Developer Tools Console (Ctrl + Shift + I ) for errors.
❌ LLM API limit exceeded?
Check your API usage on the LLM provider's dashboard.
Switch to a different API key.
6️⃣ Contributing
We welcome contributions! To contribute:
Fork the repository.
Create a new branch (git checkout -b feature-branch
).
Commit your changes (git commit -m "Add new feature"
).
Push to the branch (git push origin feature-branch
).
Open a Pull Request.
7️⃣ License
WeTest is licensed under the MIT License . See LICENSE for details.
For issues or feature requests, create an issue on GitHub or reach out via email at lengoc.forworks@gmail.com