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

Testbench Browser Kit Laravel Package

orchestra/testbench-browser-kit

Adds Laravel BrowserKit testing to Orchestra Testbench for package development. Swap your base test case to Orchestra\Testbench\BrowserKit\TestCase to use fluent visit/see/form APIs in functional tests across supported Laravel versions.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate Package Development: Enables rapid, reliable testing of Laravel packages with BrowserKit integration, reducing time-to-market for new features or third-party packages.
  • Build vs. Buy: Justifies building a custom testing suite for Laravel packages instead of relying on ad-hoc solutions or third-party tools (e.g., PestPHP, Dusk). This package provides a lightweight, Laravel-native alternative.
  • Roadmap Prioritization: Supports prioritizing testability as a core feature for internal Laravel packages (e.g., auth, payments, analytics) or open-source contributions.
  • Use Cases:
    • Package Maintainers: Simplifies testing UI interactions, forms, and APIs for packages like spatie/laravel-permission, laravel/breeze, or custom admin panels.
    • Enterprise Adoption: Ensures consistent testing standards across microservices built with Laravel, reducing integration risks.
    • Education/Onboarding: Standardizes testing patterns for new devs joining Laravel projects, lowering cognitive load.

When to Consider This Package

  • Adopt if:

    • Your team develops Laravel packages (not just apps) and needs fluent, BrowserKit-based testing (e.g., for UI flows, APIs, or form submissions).
    • You’re maintaining legacy Laravel packages (5.4+) and want to modernize testing without rewriting tests.
    • Your project relies on Testbench for package testing but lacks BrowserKit capabilities (e.g., form interactions, session/auth testing).
    • You need JSON API testing alongside traditional HTTP assertions (e.g., validating responses from package endpoints).
  • Look elsewhere if:

    • You’re using Laravel Dusk (for full browser automation) or PestPHP (for a more modern testing syntax).
    • Your tests are unit-focused (this package is for functional/integration tests).
    • You’re not using Laravel/Testbench (this package extends it).
    • Your project uses non-Laravel frameworks (e.g., Symfony, Django).
    • You need visual regression testing (consider tools like Applitools or Percy).

How to Pitch It (Stakeholders)

For Executives:

"This package lets our engineering team test Laravel packages faster and more reliably—think of it as ‘GitHub Actions for testing’ but for package functionality. For example, if we’re building a new auth package, we can automatically verify that login flows, form submissions, and API responses work as expected, without manual QA. This reduces bugs in production and speeds up releases. The cost? Minimal—it’s a lightweight, open-source tool that integrates seamlessly with our existing Laravel stack. ROI? Fewer post-launch fixes and smoother adoption of our packages by other teams."

For Engineering:

*"Testbench Browser Kit gives us BrowserKit testing superpowers for Laravel packages. Need to test a form submission in a package? Done. Verify an API endpoint returns the right JSON structure? Done. It’s like upgrading from assertEquals() to a full IDE for testing—fluent, readable, and packed with helpers for:

  • UI interactions (clicking links, filling forms).
  • JSON API validation (exact matches, nested structures).
  • Auth/sessions (testing logged-in flows).
  • Middleware isolation (bypassing auth for specific tests).

It’s zero setup beyond swapping a base test class, and it plays nice with Testbench. Perfect for ensuring our packages (or third-party ones) work end-to-end before they hit production."*

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport