Download the PHP package simplemachineorg/generate-laravel-test without Composer
On this page you can find all versions of the php package simplemachineorg/generate-laravel-test. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simplemachineorg/generate-laravel-test
More information about simplemachineorg/generate-laravel-test
Files in simplemachineorg/generate-laravel-test
Package generate-laravel-test
Short Description Use AI to dynamically create a test for a PHP Class in your application.
License MIT
Homepage https://github.com/simplemachineorg/generate-laravel-test
Informations about the package generate-laravel-test
Use AI to dynamically create a test for a PHP Class in your application.
ALPHA
This package is a work in progress and may have breaking changes.
Overview
It make it easy to quickly create Laravel tests using GPT. The package sends your code file to GPT along with some prompt instructions and saves a draft test in a _draft folder.
Every generated test needs adjustment since GPT doesn't know everything about the app, but it's a helpful starting point. In practice, it's easier to write more tests when the scaffolding work is automated.
Installation
Issue this command...
Then, set your API Key in env...
Optionally, you can publish the config file using...
Using this package
Issue this command to use AI to generate a test...
It will ask you to search for a PHP file in your code base and use that to generate the test.
Adding custom notes about the app
You can create a file which renders custom notes about the app in every request, so that the test generator is more intelligent about your specific setup. By default, create a view inside resources/views/utility/generate-test-custom-notes.blade.php
and write your notes. You can optionally change the location of the file in the config.
Publishing Config (optional)
This is the default config file...
All versions of generate-laravel-test with dependencies
illuminate/contracts Version ^9.0|^10.0|^11.0
laravel/prompts Version ^0.1.15|dev-support-older-php
spatie/laravel-package-tools Version ^1.14.0