Test your apps with real web browsers using Symfony Panther

Workshop abstract

From a few lines of jQuery to modern React/Vue… PWA, Symfony apps always contain JavaScript code. Unfortunately the Symfony functional test helper and the Goutte web scraping lib aren’t able to execute JS code. It means that they cannot assert on client-side generated HTML, test if an element is visible or not, deal with alert boxes or detect if a bug occurs only with a specific browser.

Panther is a new e2e testing and web scraping library written in PHP that drives real browsers thanks to the WebDriver protocol from the W3C. It implements the exact same API than the BrowserKit component. It means than existing SF tests and Goutte scripts work without modification… but this time JS will be executed! The tool also brings new capabilities including taking screenshots, or executing custom JS in the execution context of the web page. To install Panther you only have one command to run, and it doesn’t need any dependency to install Panther. Let’s meet the feline!

Kévin Dunglas

Creator of API Platform & Mercure.rocks, Symfony Core Team

Kévin is the founder or the self-managed company Les-Tilleuls.coop. Polyglot developer, he is a member of the Symfony Core Team and is the creator of the API Platform framework. He also has contributed to 100+ open source projects and frequently speaks at tech conferences.