testing-symfony
Stratégie de Tests Symfony 8.1 / PHP 8.5. Use when writing tests, reviewing test coverage, or setting up testing.
Works with
--- name: testing-symfony description: Stratégie de Tests Symfony 8.1 / PHP 8.5. Use when writing tests, reviewing test coverage, or setting up testing. license: MIT --- # Stratégie de Tests Symfony 8.1 / PHP 8.5 **Versions :** Symfony 8.1+ | PHP 8.5 | Pest 4.5+ | PHPUnit 12 | Playwright Abandonner Panther (lourd) et Behat (verbeux) — Pest 4 intègre tout nativement. ## Stack recommandée 2026 | Type | Outil | Usage | |------|-------|-------| | **Unit/Integration** | **Pest 4.5+** (PHPUnit 12, arch tests) | Tests backend Symfony | | **Browser/E2E** | **Pest 4 Browser Testing** (Playwright natif) | Tests frontend intégrés | | **Mutation** | **Infection** | Qualité des tests (MSI >= 80%) | | **Static Analysis** | **PHPStan Level 10** | Vérification statique | **Sources :** [Pest 4](https://pestphp.com/docs/pest-v4-is-here-now-with-browser-testing), [Infection](https://infection.github.io/) ## Invariants non-négociables - Couverture >= 80% (line + branch) - Mutation Score Indicator (MSI) >= 80% via Infection - PHPStan Level 10 — aucun `mixed` non justifié - Arch tests : domain indépendant de l'infrastructure - Fixtures via `doctrine/data-fixtures` — pas de données hard-codées - Pattern AAA (Arrange-Act-Assert) dans chaque test - Tests browser dans `tests/Browser/`, unit dans `tests/Unit/`, feature dans `tests/Feature/` ## Checklist par type | Type | Vérification | |------|-------------| | Unit | Isolation totale, pas de DB, mocks Prophecy/Mockery | | Integration | `KernelTestCase`, fixtures chargées, DB de test | | Browser | Playwright natif Pest 4, assertions sur l'UI réelle | | Arch | `pest()->arch()` — namespaces, dépendances, interdictions | | Mutation | `vendor/bin/infection --threads=4`, MSI >= 80 | > Détails complets, exemples de code, configs et checklists : voir [REFERENCE.md](./REFERENCE.md)
More Testing skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
setup-pre-commit
mattpocock/skills
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

