BDD API Development with Symfony and Behat
summary
Claims that Behat + Symfony gives one test suite that runs both kernel‑level integration tests via the Symfony2 extension and live HTTP tests via Guzzle using PSR‑7 requests. Uses symfony PSR HTTP‑message bridge + zend-diactoros, catches Guzzle exceptions, and supports multi‑profile runs (dev/beta/rc/stage/prod). Real project numbers: LaunchKey API has 41 paths, 130 handlers, ~10,000 LOC; tests cover it with 55 features, 328 scenarios and ~3,000 lines of step code. Tests include setup/teardown endpoints and enforce feature cleanup and single‑responsibility features.
AI-written summary · about
chapters (32)
- 0:00Introduction
- 0:25Architecture landscape
- 3:36APIs and Symphony
- 8:52Behat
- 12:16BDD for websites
- 12:46Behavior driven development
- 13:42API requests responses
- 14:57OAuth
- 16:59Kernel and Life Tests
- 17:11Behat in Symphony
- 19:56Symphony 2 Extension
- 20:26Feature Context
- 21:03Context Hierarchy
- 21:26Abstract Context
- 22:40guzzle Client Context
- 22:55guzzle Client Config
- 23:43symphony
- 24:28kernel
- 25:04constructor
- 25:34web test case
- 26:49students from the trenches
- 26:59launchkey multifactor authentication
- 27:19step code
- 27:38split features by functionality
- 28:32clean up after themselves
- 29:08unit tests
- 30:38exposed endpoints
- 31:52test feature only once
- 32:26test every feature
- 34:03Questions
- 34:47Login
- 37:27Outro
