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 Laravel Package Development: Enables rapid, reliable testing of UI/UX and API interactions for Laravel packages, reducing time-to-market for new features or integrations.
  • Shift Left on Quality: Integrates browser/HTTP testing into the package development lifecycle, catching UI/API regressions early (e.g., form submissions, redirects, JSON responses).
  • Build vs. Buy: Justifies building custom Laravel packages over third-party solutions when UI/API behavior is a core differentiator (e.g., admin dashboards, form handlers).
  • Roadmap Prioritization: Validates UI/API-heavy features (e.g., "Add multi-step form support") by ensuring test coverage exists before development.
  • Compliance/Regulatory Use Cases: Critical for packages handling sensitive data (e.g., authentication flows, payment forms) where end-to-end testing is mandatory.
  • Monetization: Demonstrates robustness to potential customers evaluating Laravel packages (e.g., "Our package includes 100% test coverage for all UI paths").

When to Consider This Package

  • Adopt When:

    • Developing Laravel packages with UI interactions (forms, redirects, dynamic content).
    • Building APIs requiring rigorous HTTP/JSON validation (e.g., REST, GraphQL).
    • Targeting enterprise or regulated industries where test coverage is audited.
    • Your team lacks dedicated QA resources but needs to maintain high test standards.
    • You’re extending Laravel’s ecosystem (e.g., plugins, themes) with custom behavior.
  • Look Elsewhere If:

    • Your package is purely backend logic (e.g., CLI tools, scheduled jobs) with no HTTP layer.
    • You’re using non-Laravel frameworks (Symfony, Django) or need cross-framework testing.
    • Your tests are already 100% covered by unit/integration tests (e.g., via PestPHP or Laravel’s built-in HttpTests).
    • You prioritize performance testing over functional/UI testing (consider Laravel Dusk or Pest’s browser extensions instead).
    • Your package is open-core and you need to hide test implementation details from public repos.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us ship Laravel packages faster and with fewer bugs by automating UI/API testing—just like how Selenium revolutionized web QA, but tailored for Laravel. For example, we can test a new admin dashboard’s form submissions in minutes, not days. It’s a force multiplier for our dev team, especially for high-visibility features like [X Product], where UI polish directly impacts customer retention. The MIT license means zero vendor lock-in, and the active maintenance (recent 2026 release) ensures long-term reliability."

ROI Hook: "Every hour saved on manual UI testing = $X in dev costs avoided. For [Project Y], this could cut QA time by 40%."


For Engineering/Dev Leads:

*"This is Testbench on steroids for Laravel packages. It extends Laravel’s built-in browser-kit-testing with a fluent API to:

  • Simulate user flows (clicks, form fills, file uploads) in one-liners (e.g., ->type('Taylor', 'name')->press('Submit')).
  • Test JSON APIs with assertions for structure, exact matches, or nested data (e.g., ->seeJsonStructure(['user' => ['posts' => ['*']]])).
  • Mock auth/sessions without manual setup (e.g., ->actingAs($user)->visit('/dashboard')).
  • Integrate seamlessly with existing Testbench tests—just swap TestCase for BrowserKit\TestCase.

Why not Laravel Dusk?

  • Lightweight: No headless browser overhead; runs in-memory.
  • Package-focused: Designed for isolated package testing (e.g., testing a package’s routes/controllers without booting a full app).
  • Future-proof: Supports Laravel 6–12 and plays well with modern testing tools like PestPHP.

Action Item: Let’s pilot this for [Package Z]’s next release. I’ll provide a 30-minute spike to show how it cuts our test suite from 200 LOC to 50 LOC for the same coverage."*


Key Selling Points:

  • Dev Experience: "Write tests in plain English (e.g., ->see('Error message')->dontSee('Success'))."
  • Maintainability: "Tests mirror real user journeys, so they’re easier to debug than unit tests."
  • Scalability: "Adds zero runtime cost; only used in CI/CD."
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.
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle