How to build a test suite from scratch
summary
Builds a functional test suite for a Phalcon app using PhpUnit and Phalcon integration, focuses on functional tests over E2E, uses real MySQL with per-test transactions and factories to seed complex relations, mocks external APIs with Mercury for API mocking, crawls HTML with Symfony DomCrawler, packages a Docker image close to production and runs pipelines that produce JUnit reports and deploy on merge, orchestrated via CI with GitLab Runner; current full suite runs about 10–15 minutes and is integrated into deploys.
AI-written summary · about
chapters (13)
- 0:00Building a test suite
- 2:02Why we needed it
- 3:50Framework and challenges
- 6:20Choosing test types
- 7:26Setting up functional tests
- 10:12Integrating PHPUnit
- 13:01Bootstrapping and dependency injection
- 14:28Mocking API calls
- 16:13Testing UI and assertions
- 17:16CI pipeline with GitLab
- 19:44Performance metrics
- 20:31Key lessons
- 21:24Q&A








