Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Behat Generator Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerated Test-Driven Development (TDD) or Behavior-Driven Development (BDD): Reduces manual effort in creating .feature files for route-based testing, enabling faster iteration and validation of API/route behavior.
  • Quality Assurance (QA) Automation: Supports scaling automated testing by auto-generating test cases for all routes, reducing human error and improving test coverage.
  • Onboarding & Documentation: Provides a scaffold for new developers to understand route expectations and edge cases, acting as a living documentation tool.
  • Build vs. Buy: Avoids reinventing a route-to-feature-file generator, leveraging an open-source solution to save engineering time.
  • Compliance & Regression Testing: Ensures critical paths (e.g., payment flows, admin dashboards) are tested systematically, reducing compliance risks.
  • Roadmap for "Shift-Left" Testing: Aligns with a strategy to integrate testing earlier in the SDLC, reducing late-stage bugs.

When to Consider This Package

  • Adopt if:

    • Your Laravel/PHP project has 50+ routes and manual .feature file creation is a bottleneck.
    • You prioritize BDD/TDD but lack dedicated QA resources to write test cases.
    • Your team uses Behat or is open to adopting it for end-to-end testing.
    • You need quick validation of route functionality (e.g., APIs, forms) without deep manual setup.
    • Your roadmap includes automated regression testing for critical user journeys.
  • Look elsewhere if:

    • Your project has highly dynamic routes (e.g., generated via API calls) that can’t be statically mapped.
    • You require custom business logic in test cases beyond basic route validation (e.g., complex assertions, mocking).
    • Your team lacks PHP/Behat expertise to maintain or extend the generated tests.
    • You’re using a non-Symfony/Laravel stack (e.g., Node.js, Python) where Behat isn’t a fit.
    • Your priority is unit testing (use PHPUnit + Pest instead) or UI testing (consider Cypress/Playwright).

How to Pitch It (Stakeholders)

For Executives:

"This package automates the creation of behavioral test cases for every route in our Laravel app, cutting the time to validate new features by 70%. By generating .feature files for Behat—an industry-standard BDD tool—we’ll catch UI/API issues earlier, reduce manual QA costs, and future-proof our regression testing. It’s a low-risk, high-reward investment to improve software quality without hiring additional testers."

Key Outcomes:Faster releases (less manual test case writing). ✅ Higher confidence in route stability (auto-generated safety nets). ✅ Scalable QA (tests grow automatically with new routes).


For Engineering:

*"The ACSEO Behat Generator Bundle lets us scaffold Behat .feature files for every route in our app with a single command. This is a game-changer for:

  • Onboarding: New devs get instant visibility into expected route behavior.
  • Maintenance: Adding a route? Tests are auto-generated—no more forgotten edge cases.
  • Integration: Works seamlessly with Laravel’s routing system and Behat’s Mink/Zombie drivers for JavaScript-capable tests.

Trade-offs:

  • Requires Behat setup (but we already use PHPUnit).
  • Generated tests are basic (we’ll need to extend them for complex logic).
  • Best for route-level validation (not deep business logic).

Proposal: Pilot this for our /api routes first—it’s a low-risk way to see how much time we save on test creation."*

Next Steps:

  1. Install Behat + Bundle (composer require acseo/behat-generator-bundle).
  2. Run php bin/console acseo:behat:generate to scaffold tests.
  3. Extend FeatureContext.php for custom assertions.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours