Skip to content

Real Browsers, Real Kernel: Playwright Testing in Symfony

Avatar of Simon André Simon André

A Symfony application comes to life in the browser: navigation, validation, dynamic components, and JavaScript interactions. A DOM emulator can reproduce the HTML, but not the behavior of a real browser. Yet browser tests often run outside Symfony, against a separate application server and lifecycle, with little access to application state.

Playwright drives real browsers with semantic locators, automatic waiting, and web-first assertions. PlaywrightPHP brings this API to PHP: navigate, fill forms, drag and drop, execute JavaScript, inspect the network and console, record traces, or generate PHP code. The Playwright Symfony bundle brings that journey into Symfony's test environment. One PHPUnit test drags a card in a real Live Component, waits for the asynchronous update, then asserts the DOM, dispatched events, and database state.

The browser sends a real request. The bundle turns it into a Symfony Request, lets the test kernel handle it in the same PHP process as the test, and returns the Symfony Response to the page. No separate web server is required. The same test sees both sides: network, console, and trace in the browser; Request, Response, profiler, logs, and database state in Symfony.

Through one application and three live demonstrations, you will see how this model tests payment flows, Live Components, and design systems, protects critical user journeys, and catches visual regressions.

Delivered in English
Room:
SensioLabs Track

Thursday, November 26, 2026 at 11:15 AM – 11:50 AM