Open Source/laravel-route-coverage/Overview
laravel-route-coverage
Generate routes coverage report
Overview
Laravel route coverage report.
With this package you can see the percentage of test coverage of your routes — the same way you would through Laravel or PHPUnit tests.
How it works?
The package will scan all your tests, collecting all the HTTP queries that are called in them. After that, it will compare the results with the routes of your application. Routes are taken only by the App prefix to exclude vendor routes.
Installation
The package can be installed via composer:
composer require yzen.dev/laravel-route-coverage --devUsage
Generate report:
php artisan route:coverageAfter executing the command, the result of the report will be displayed in the console.
Possible options
Group all the results by controllers, displaying how many actions there are in the controller, and how many of them are covered by tests:
php artisan route:coverage --group-by-controllerGenerate a report as an html page (located in the public directory public/route-coverage):
php artisan route:coverage --html