wasinpwg/openai-test-generator

This is my package openai-test-generator

v0.1.0 2023-07-03 22:59 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

Installation

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

Usage

php artisan openai:generate-test --class="App\Http\Controller\UserController" --class="App\Http\Controller\PostController"

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.