Testing Workflow
Test Surfaces
make bats- Bash and Makefile behaviormake unit-tests- Unit suitemake integration-tests- Integration suitemake behat- BDD and end-to-end scenariosmake tests-with-coverage- PHPUnit with Clover outputmake infection- Mutation testing
Setup
For anything that touches database-backed behavior:
make setup-test-db
Practical Order
Small change
make unit-tests
Persistence or request-flow change
make setup-test-db
make unit-tests
make integration-tests
make behat
Risky refactor
make setup-test-db
make unit-tests
make integration-tests
make behat
make infection
Debugging Notes
- Re-run the smallest failing suite first.
- If only integration or Behat fails, confirm the database was recreated with
make setup-test-db. - When mutation testing fails, improve tests rather than relaxing Infection.
- If Makefile behavior is changed, run
make bats.
Done Criteria
- The changed behavior is covered by at least one relevant suite.
- The suite that failed has been rerun successfully.
- Any unrun suites are explicitly called out in the final summary.