~/talk

How to build a test suite from scratch

Talkat phpday 2022 · 2022-05-19..05-20· [php, testing]
links:none on file
slides:none on file

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

  1. 0:00Building a test suite
  2. 2:02Why we needed it
  3. 3:50Framework and challenges
  4. 6:20Choosing test types
  5. 7:26Setting up functional tests
  6. 10:12Integrating PHPUnit
  7. 13:01Bootstrapping and dependency injection
  8. 14:28Mocking API calls
  9. 16:13Testing UI and assertions
  10. 17:16CI pipeline with GitLab
  11. 19:44Performance metrics
  12. 20:31Key lessons
  13. 21:24Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.