acseo/behat-generator-bundle
Symfony bundle that generates Behat .feature files automatically from your app’s routes, jumpstarting BDD coverage. Includes setup guidance for Behat + Mink with the Zombie.js driver and an example FeatureContext for form submission.
Pros:
.feature files for all routes, reducing manual test setup effort—ideal for Laravel’s RESTful or API-heavy applications.Cons:
.feature files (e.g., Given I am on "/route"), requiring manual refinement for edge cases (auth, validation, etc.)..feature files (e.g., using Given I send a POST to "/api/resource")..feature files?{id}), named routes, or middleware-constrained routes? The bundle may need customization..feature files?.feature files (e.g., Git diffs, CI checks)?HttpKernel, routing).composer require.MinkContext and inject the Symfony container (Laravel’s ServiceContainer works).php artisan route:list) to estimate coverage..feature file adjustments (e.g., auth, file uploads).composer require --dev acseo/behat-generator-bundle behat/behat behat/mink-extension behat/mink-zombie-driver
behat.yml with Laravel’s base URL (e.g., http://test-app.test).FeatureContext extending MinkContext with Laravel service injection.php bin/console acseo:behat:generate)..feature files in features/ directory.FeatureContext with Laravel-specific steps (e.g., Given there is an authenticated user).FeatureContext.route('profile.show')) should work, but dynamic segments may need regex adjustments in .feature files.auth, guest) may require custom steps to handle auth states.GET /route; API-specific assertions (e.g., JSON responses) need manual addition.FeatureContext for Laravel-specific needs (e.g., auth, validation)..feature files based on test results.behat.yml or FeatureContext propagate across all tests..feature files may overwrite manual changes (mitigate with .gitignore or CI checks).FeatureContext must evolve with Laravel features (e.g., new auth systems)..feature files can be slower than PHP unit tests (natural language ambiguity).APP_DEBUG=false in tests).--tags or CI workers).How can I help you explore Laravel packages today?