This Laravel package allows you to generate automated tests for your application using OpenAI, a powerful language model. With this package, you can quickly create test cases for your Laravel codebase, saving you time and effort in writing tests manually.
You can install the package via composer:
composer require wasinpwg/openai-test-generator --dev
Next publish the config file with:
php artisan vendor:publish --provider="OpenAI\Laravel\ServiceProvider"
php artisan vendor:publish --tag="openai-test-generator-config"
Set environment variable OPENAI_API_KEY
in .env
file.
OPENAI_API_KEY=sk-xxxxxx
php artisan openai:generate-test --class="App\Http\Controller\UserController" --class="App\Http\Controller\PostController"
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.