This page covers practical local testing for Catroweb.
- Dynamic tests: PHPUnit + Behat
- Static analysis: ESLint, Stylelint, Prettier, PHP-CS-Fixer, PhpStan, Psalm, and Symfony linters
For CI implementation details, see GitHub Actions FAQ (Workflow Automation) and .github/workflows/.
Use one of:
- Docker setup: Docker
- Native setup: Setup guide Ubuntu or Setup guide macOS
If you use Docker, run tests inside app.catroweb.
Where files live:
- Configuration:
phpunit.xml.dist - Tests:
tests/PhpUnit/
Run all:
bin/phpunit testsRun a single test:
bin/phpunit tests --filter <method-name> <file-path>Generate coverage:
bin/phpunit --coverage-html tests/TestReports/CoverageReports/PhpUnit \
--coverage-clover=tests/TestReports/CoverageReports/PhpUnit/coverage.xmlWhere files live:
- Configuration:
behat.yaml.dist - Feature files:
tests/BehatFeatures/ - Context logic:
src/System/Behat/Context/
Run all suites:
bin/behatRun one suite:
bin/behat -s web-adminRun one scenario:
bin/behat -s web-admin tests/BehatFeatures/web/admin/<file-name>.feature:<line-number>Rerun failed scenarios:
bin/behat --rerunUseful failure artifacts:
- Screenshots:
tests/TestReports/TestScreenshots/ - Behat logs:
tests/TestReports/Behat/
yarn test-js
yarn test-css
yarn test-asset
yarn test-php
yarn test-twigyarn testyarn fixbin/console lint:twig templates/
bin/console lint:yaml translations/ config/ .github/ docker/ behat.yaml.dist
bin/console lint:containerdocker exec -it app.catroweb bin/phpunit tests
docker exec -it app.catroweb bin/behat -s web-general
docker exec -it app.catroweb php bin/console cache:clear --env=test