PestGPT: ChatGPT Test Generator for Laravel
Generate Unit Tests for Laravel Code in Pest with the power of ChatGPT
Welcome to the "PestGPT: ChatGPT Test Generator for Laravel" Visual Studio Code extension!
This extension is designed to generate unit tests in pest for your laravel code. By using the power of the ChatGPT API, this extension can generate high-quality unit tests for your code in any programming language.
• Easy and quick setup
• Only takes 10-20 seconds to generate
• Security: The data is not stored or utilized for training purposes
To use the extension, simply open the file that you want to generate unit tests for and then run the extension. The extension will use the ChatGPT API to analyze your code and generate a suite of unit tests that cover the functionality of your code.
The generated tests are designed to be easily customizable and can be tailored to fit your specific testing needs. You can edit the generated tests to include additional test cases, modify the test inputs and expected outputs, and more.
Please note that in order to use this extension, you will need an API key for the ChatGPT API. You can sign up for an API key on the ChatGPT website.
We hope that you find this extension to be a useful tool for your testing workflow. If you have any feedback or suggestions, please don't hesitate to reach out to us. Happy testing!
API Key Setup
Get your API Key ready from here: OpenAI
- Once you have your API key, press CTRL+SHIFT+P (Windows) and CMD+SHIFT+P (Mac) to open the Command Palette.
- Run the command
PestGPT: Set OpenAI API Key
to set your API Key.
How to Use
Open a file: Open the file that you want to generate unit tests for in Visual Studio Code.
Run the extension: Press CTRL+SHIFT+P (Windows) and CMD+SHIFT+P (Mac) to open the Command Palette. Then run the command PestGPT: Generate for this file
.
- Wait for the tests to generate: The extension will use the ChatGPT API to analyze your code and generate a suite of unit tests. The time it takes to generate the tests will depend on the size and complexity of your code.
- Review and customize the generated tests: Once the tests have been generated, you can review them and customize them to fit your specific testing needs. You can edit the generated tests to include additional test cases, modify the test inputs and expected outputs, and more.