~/talk

Behat for characterisation on tests

Talkat Dutch PHP Conference 2018 · 2018-06-07..06-09· [testing]
slides:none on file

Shows how Behat captures existing API and UI behavior so teams can refactor big, running systems with confidence — used to refactor 5+ year old apps by first recording current outputs, then changing code. Uses Behat + Gherkin at the HTTP layer for characterization tests, Mountebank for HTTP mocks to simulate downstream services, and Mink + Selenium (Chrome) for browser tests. Recommends snapshot testing (PHPUnit extension) for large outputs, one test per boundary, and keeping characterization tests short-lived.

AI-written summary · about

  1. 0:00Intro
  2. 0:53No tests
  3. 1:28Without fear
  4. 1:59Hello
  5. 3:20Overview
  6. 3:45What is legacy code
  7. 6:19Unintended changes
  8. 7:23Characterization tests
  9. 13:24Do not change the card
  10. 15:07Minimum number of tests
  11. 16:09Dont overstate it
  12. 17:46Identify pinch points
  13. 18:52Behatgherkin
  14. 19:51Installation
  15. 20:36HTTP API
  16. 24:34Different types of tests
  17. 26:32HTTP endpoints
  18. 27:35HTTP mocks
  19. 29:45Browser automation
  20. 31:57Custom steps
  21. 38:29Snapshot testing
  22. 43:40Recap
~/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.