lucatume/wp-browser
wp-browser integrates WordPress with Codeception, giving you acceptance, functional, and integration testing out of the box. It handles WordPress installation, database setup, and bootstrapping so you can write reliable tests for plugins, themes, and full sites.
Architecture fit
lucatume/wp-browser is a Codeception extension for testing WordPress — not a Laravel package. It ships Codeception modules (WPBrowser, WPWebDriver, WPDb, WPFilesystem, WordPress) that bootstrap a real WordPress installation, wrap $wpdb with table-prefix awareness, scaffold plugins/themes/mu-plugins per test, and expose fixture-style hooks into the WordPress load cycle. There is no service provider, no Artisan command, and no Laravel testing integration. For a Laravel codebase it is architecturally neutral — it neither conflicts nor contributes. Fit is high only where the organization owns WordPress plugins, themes, or a WordPress-backed content surface; in a pure Laravel test suite it is dead weight alongside Pest/PHPUnit and Laravel's own HTTP/database fakes.
Integration feasibility
High in a WordPress repo: composer require --dev, a codeception.yml, a wp-tests bootstrap, and a MySQL target. Medium-to-low as a cross-boundary tool in a Laravel monorepo — it would live in a separate composer.json and a separate CI job, never on Laravel's test runner. Prerequisites are non-trivial: MySQL/MariaDB instance, a writable web root for acceptance tests, Chrome/Chromedriver for WPWebDriver, and ideally WP-CLI for DB snapshot/restore.
Technical risk
Key questions
Stack fit
Treat this as a WordPress-surface tool only. Where a Laravel application integrates with WordPress (shared database, headless WP via REST/GraphQL, SSO bridge), keep the two suites separate and assert the contract at the boundary: Laravel-side tests mock the WP API; WP-side acceptance tests via wp-browser verify the WordPress half. Do not attempt to co-locate both in one Composer package — PHPUnit/Codeception version constraints will collide.
Migration path
WPDb + WordPress (fast, no browser), add WPWebDriver only for critical journeys.Compatibility
Confirm PHP 7.4–8.3 support against your runtime, Codeception 4 vs 5, WordPress 6.x, MySQL 5.7/8.0, and Chromedriver version alignment with the Chrome image. Multisite support exists but requires additional configuration — validate if any target site is multisite.
Sequencing
Security/provenance review → containerized spike (1 sprint) → single-repo pilot with CI job → document bootstrap and fixture conventions → expand to remaining WP repos. Gate expansion on pilot flake rate and runtime.
Maintenance
MIT license, ten-year track record, single primary maintainer. Budget for an internal owner who tracks upstream releases and re-validates the matrix quarterly. Realistically, expect to absorb one breaking upgrade per 12–18 months (Codeception major or WordPress core change). Internal mirroring plus a pinned SHA reduces supply-chain and abandonment exposure.
Support
Community-only: GitHub issues, no commercial SLA. If the WordPress surface is business-critical, consider sponsoring the maintainer or budgeting a few days per quarter of internal triage. Escalation path must be defined before adoption, not after a CI outage.
Scaling
Browser acceptance tests are the cost center — minutes per test, not milliseconds. Parallelize with Codeception's --group/shard support across CI runners; each shard needs its own database schema to avoid contention. Provision the WP install from a cached SQL dump rather than a fresh install per run. Capture screenshots, page HTML, and DB dumps as CI artifacts on failure — without them, flake triage consumes disproportionate engineering time.
Failure modes
Ramp-up
A developer fluent in PHPUnit needs roughly one to two weeks to become productive; the real learning curve is Codeception's suite/module model plus WordPress internals (hooks, table prefixes, multisite, activation flows). Allocate a documented internal getting-started guide and a reference suite from the pilot. QA engineers without PHP background will need closer support for the acceptance-test layer.
How can I help you explore Laravel packages today?