Testpilot is a Visual Studio Code extension that automatically generates test cases for your smart contracts. Powered by OpenAI, it provides test results for Solidity contracts and supports various testing frameworks such as Mocha, Ganache, Jest, and more.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Effortlessly generate test cases for Solidity smart contracts in VS Code.
Testpilot automates test case creation using OpenAI's API, saving you time and boosting productivity. No more manual test writing—let Testpilot handle it!
Features ✨
🔥 Generate test cases in seconds with just a few clicks.
🛠️ Supports popular testing tools like Mocha with Chai, Jest, Truffle, and Ganache.
📂 Automatically creates organized test folders and files based on the active Solidity file.
💬 Provides custom messages to guide you through different scenarios.
Getting Started 🏁
Install the extension from the VS Code Marketplace.
Use the Command Palette to run the commands (see below).
Commands 📜
Command
Description
Generate Tests
Prompts for GitHub token and base URL to generate test cases. Saves credentials for future use.
Update API Key & Base URL
Updates the saved API key and base URL if needed.
Delete API Key & Base URL
Removes your saved credentials.
How to Use 🛠️
Generate Tests:
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Select Generate Tests.
Provide your GitHub token and base URL (get free one here).
Choose your desired testing tool, and Testpilot will do the rest!
Update/Delete Credentials:
Use the respective commands from the Command Palette to manage your credentials.
Dependencies 🧩
OpenAI API: Install via npm i openai.
Screenshots 🖼️
(Add a few screenshots or GIFs showing how the extension works.)
This extension was created by Rohan, a passionate fullstack developer specializing in frontend and blockchain technologies. Feel free to connect or share your feedback!
Developed with ❤️ by Rohan.
(X handle)[https://x.com/heyrohan7]