Don't write boilerplate for your feature tests! This package scans all the routes in your Laravel app and generates skeleton for testing them.
You can install the package via composer:
composer require jarektkaczyk/package-laravel-test-generator-laravel
You can publish the config file with and customize it afterwards in config/test_generator.php
:
php artisan vendor:publish --provider="Sofa\LaravelTestGenerator\LaravelTestGeneratorServiceProvider" --tag="config"
php artisan generate:feature-tests
- support for PHPUnit driver
- generate new test classes
- bare happy path case
- bare failing path case
- parse route model binding and build setup for tests accordingly
- (OPTIONAL) parse requests and build setup for tests accordingly - might be too complex in many cases
- (OPTIONAL) update existing test classes with new methods (not trivial with
nette/php-generator
, find better way?)
- support for different drivers
- (OPTIONAL) other drivers
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email jarek@softonsofa.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.