| Install | |
|---|---|
composer require gessyken/laravel-test-accelerator |
|
| Latest Version: | v1.0.0 |
| PHP: | ^8.4 |
A Laravel package that accelerates test development by automatically generating tests, analyzing code coverage, and providing performance insights.
composer require gessyken/laravel-test-accelerator --dev
Publish the configuration file:
php artisan vendor:publish --tag="laravel-test-accelerator-config"
# Generate tests for a specific file
php artisan test:generate app/Models/User.php
# Generate tests for a directory
php artisan test:generate app/Services/
# Use AI to generate smarter tests
php artisan test:generate app/Models/User.php --ai
# Basic coverage analysis
php artisan test:coverage
# Generate HTML report
php artisan test:coverage --report
# Set minimum threshold
php artisan test:coverage --threshold=80
# Analyze test performance
php artisan test:benchmark
# Custom thresholds
php artisan test:benchmark --slow-threshold=2000 --memory-threshold=2048
Add these variables to your .env file for AI features:
TEST_ACCELERATOR_AI_PROVIDER=openai
TEST_ACCELERATOR_AI_API_KEY=your_api_key_here
TEST_ACCELERATOR_AI_MODEL=gpt-4
composer test
The MIT License (MIT). Please see License File for more information.
Aurel KENNE