Skip to content

[Demo] Add Panther end-to-end test suite for use cases and profiler#2300

Open
chr-hertel wants to merge 1 commit into
symfony:mainfrom
chr-hertel:panther-demo-tests
Open

[Demo] Add Panther end-to-end test suite for use cases and profiler#2300
chr-hertel wants to merge 1 commit into
symfony:mainfrom
chr-hertel:panther-demo-tests

Conversation

@chr-hertel

@chr-hertel chr-hertel commented Jul 11, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? no
Docs? no
Issues Fix #1370
License MIT

Wires up Symfony Panther in the demo and covers the ten use
cases plus the Symfony AI panel of the profiler - the manual click-through this issue asked to
automate. Tests only, no production code is touched.

Local only, as discussed in the issue: the suite is not part of the default test suite (phpunit.xml
gets defaultTestSuite="default", so CI is unaffected), it needs a browser, and every test calls the
AI platforms for real. Run it with vendor/bin/phpunit --testsuite e2e - 15 tests, ~2 minutes. Setup
is documented in demo/tests/E2E/README.md.

Each use case is one test, driving the flow once and then asserting both the UI and what the AI
bundle collected for that very request: the platform calls with their model, input, options and
result, the registered tools, the tool calls, and the token usage. ProfilerTest covers the toolbar
block and the panel sections themselves. Tests skip themselves when their API key is missing
(OPENAI_API_KEY for eight of them, HUGGINGFACE_API_KEY for the cropping, MISTRAL_API_KEY for
the OCR), and BlogTest skips without an indexed store.

Two notes on how it runs:

  • Panther boots the app in the dev environment, because the AI data collector only exists with
    kernel.debug enabled - so the profiler has something to show. That also means the web server
    reads the real keys from .env.local, and the environment of the Docker services is passed on from
    symfony var:export, the way symfony serve does it.
  • Chrome fakes camera and microphone, so the video and speech use cases run without a human in front
    of the screen: the webcam shows Chrome's test pattern, the microphone plays back fixtures/audio.mp3.

While writing the suite it caught the SSE session bug on a first-time visitor - a browser without a
session cookie, which is what every test starts from. That is fixed in #2302 (and #2304), so this
branch is rebased on top of them and needs no demo changes of its own.

@chr-hertel chr-hertel requested a review from OskarStark as a code owner July 11, 2026 19:26
@carsonbot carsonbot added Bug Something isn't working Demo Issues & PRs about the demo application Status: Needs Review labels Jul 11, 2026
@chr-hertel chr-hertel removed the Bug Something isn't working label Jul 11, 2026
Adds a browser-driven test suite covering the ten demo use cases and the
Symfony AI panel of the web profiler. It runs locally only, excluded from
the default test suite, since it drives a real browser and calls the AI
platforms for real.

Panther boots the app in the dev environment, because the AI data collector
only exists with kernel.debug enabled - which also makes the real API keys
from .env.local and the environment of the Docker services available.
@chr-hertel chr-hertel force-pushed the panther-demo-tests branch from fe93d82 to 911b7f7 Compare July 11, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Demo Issues & PRs about the demo application Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Demo] Panther Test Suite for Demo Scenarios & Profiler

2 participants