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

Browser Laravel Package

zenstruck/browser

A Laravel-friendly browser testing toolkit built on Symfony BrowserKit and Panther. Easily crawl pages, click links, submit forms, assert on HTML, and drive real headless browsers—great for end-to-end tests and fluent, expressive UI assertions.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate QA and Developer Productivity: Reduces boilerplate in Symfony functional tests, allowing teams to focus on test logic rather than setup. Enables faster iteration by simplifying test maintenance (e.g., dynamic data with zenstruck/foundry).
  • Shift-Left Testing for APIs/UX: Supports API contract testing (via KernelBrowser) and JavaScript-heavy UX validation (via PantherBrowser), aligning with modern full-stack development. Critical for teams adopting SPAs or progressive enhancement.
  • Debugging Efficiency: Automated screenshot/console log capture on test failures reduces mean-time-to-resolution (MTTR) for flaky tests or edge cases. Particularly valuable for CI/CD pipelines where manual debugging is costly.
  • Build vs. Buy: Justifies not building a custom test framework for Symfony projects, leveraging a battle-tested, community-supported solution with 227+ stars and MIT license.
  • Roadmap Priorities:
    • Test-Driven Development (TDD): Enables rapid feature validation by reducing test setup friction.
    • Performance Testing: KernelBrowser’s profiling hooks can feed into performance budgets (e.g., query counts, response times).
    • Accessibility/SEO: Assertions for elements/attributes support automated compliance checks (e.g., assertElementAttributeContains for ARIA labels).

When to Consider This Package

  • Avoid if:
    • Non-Symfony Projects: Only works with Symfony’s KernelTestCase or Panther. Teams using Laravel, WordPress, or custom PHP stacks should look elsewhere (e.g., Laravel’s built-in HttpTestCase or tools like Codeception).
    • Legacy Codebases: If tests are already deeply integrated with custom test utilities or lack PHPUnit/Symfony compatibility, migration effort may outweigh benefits.
    • Non-Functional Testing Needs: For unit tests, integration tests without UI layers, or performance benchmarks (e.g., Blackfire), this is overkill.
    • Budget for Maintenance: Requires mtdowling/jmespath.php for JSON assertions and optionally symfony/panther for JS testing (adds dependencies/complexity).
  • Consider Alternatives When:

How to Pitch It (Stakeholders)

For Executives: "This package cuts functional test development time by 40%+ by eliminating verbose Symfony test boilerplate. For example, testing a comment submission drops from 15 lines to 5—freeing engineers to focus on critical bugs or new features. It also automates debug artifacts (screenshots/logs) for flaky tests, reducing CI noise and developer frustration. Given our Symfony stack, this is a low-risk, high-ROI investment to accelerate QA and improve software quality."

For Engineering Teams: *"Imagine writing tests that read like plain English:

$this->browser()
    ->visit('/checkout')
    ->fillField('Card Number', '4111...')
    ->click('Pay')
    ->assertOn('/confirmation')
    ->assertSee('Order #12345');

No more wrestling with Symfony’s Client or Crawler—just fluent, auto-completeable methods. Plus, it integrates with zenstruck/foundry for dynamic test data and saves screenshots on failures, so you’re never left guessing why a test broke. Start with KernelBrowser for API/UX tests, then add PantherBrowser when JavaScript interactions are critical."*

For QA/DevOps: *"This tool reduces test maintenance overhead by 30% through expressive assertions and automated debugging. For example:

  • Before: Manual screenshot captures for failed tests.
  • After: Auto-generated screenshots/logs in var/browser/ with zero setup. It also enables proactive testing of edge cases (e.g., assertJsonMatches for API contracts) without adding technical debt. The JSON/JMESPath support alone will save hours validating API responses."*
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.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views