| name | typo3-testing |
| description | Agent Skill: TYPO3 extension testing (unit, functional, E2E, architecture, mutation). Use when setting up test infrastructure, writing tests, configuring PHPUnit, or CI/CD. By Netresearch. |
TYPO3 Testing Skill
Templates, scripts, and references for comprehensive TYPO3 extension testing.
Test Type Selection
| Type | Use When | Speed |
|---|---|---|
| Unit | Pure logic, no DB, validators, utilities | Fast (ms) |
| Functional | DB interactions, repositories, controllers | Medium (s) |
| Architecture | Layer constraints, dependency rules (phpat) | Fast (ms) |
| E2E (Playwright) | User workflows, browser, accessibility | Slow (s-min) |
| Fuzz | Security, parsers, malformed input | Manual |
| Crypto | Encryption, secrets, key management | Fast (ms) |
| Mutation | Test quality verification, 70%+ coverage | CI/Release |
Commands
# Setup infrastructure
scripts/setup-testing.sh [--with-e2e]
# Run tests via runTests.sh
Build/Scripts/runTests.sh -s unit
Build/Scripts/runTests.sh -s functional
Build/Scripts/runTests.sh -s architecture
Build/Scripts/runTests.sh -s e2e
# Quality tools
Build/Scripts/runTests.sh -s lint
Build/Scripts/runTests.sh -s phpstan
Build/Scripts/runTests.sh -s mutation
Scoring
| Criterion | Requirement |
|---|---|
| Unit tests | Required, 70%+ coverage |
| Functional tests | Required for DB operations |
| Architecture tests | phpat required for full points |
| PHPStan | Level 10 (max) |
Note: Full conformance requires phpat architecture tests enforcing layer boundaries.
References
references/unit-testing.md- UnitTestCase, mocking, assertionsreferences/functional-testing.md- FunctionalTestCase, fixtures, databasereferences/functional-test-patterns.md- Container reset, PHPUnit 10+ migrationreferences/typo3-v14-final-classes.md- Testing final/readonly classes, interface extractionreferences/architecture-testing.md- phpat rules, layer constraintsreferences/e2e-testing.md- Playwright, Page Object Modelreferences/accessibility-testing.md- axe-core, WCAG compliancereferences/fuzz-testing.md- nikic/php-fuzzer, securityreferences/crypto-testing.md- Encryption, secrets, sodiumreferences/mutation-testing.md- Infection, test qualityreferences/ci-cd.md- GitHub Actions, GitLab CI
Templates
templates/UnitTests.xml,templates/FunctionalTests.xml- PHPUnit configstemplates/phpat.php- Architecture test rulestemplates/Build/playwright/- Playwright setuptemplates/runTests.sh- Test orchestrationtemplates/github-actions-tests.yml- CI workflow
External Resources
- TYPO3 Testing Docs
- Tea Extension - Reference implementation
- phpat - PHP Architecture Tester
Contributing: https://github.com/netresearch/typo3-testing-skill