~/talk

Behat Best Practices

Talkat ScotlandPHP 2017 · on Saturday, 2017-11-04· [testing]
slides:none on file

Behat is used as a living-spec tool that runs Gherkin and maps Given/When/Then to PHP context methods, not as a browser automation toy; workflow recommends drive domain objects first, then refactor to a service layer tested via Behat contexts, and only add a few UI checks (Mink + Symfony/PSR‑7 drivers, Selenium or headless Chrome) to verify integration. Use fake infrastructure for speed and separate contract tests to guarantee parity with real storage, and run one end-to-end scenario via UI rather than exhaustively. Use fake infrastructure plus contract tests to keep suites fast and reliable.

AI-written summary · about

  1. 0:00Introduction to BDD
  2. 3:00The role of examples in BDD
  3. 5:14Refining rules with examples
  4. 11:08BDD best practices
  5. 15:13Introduction to Behat
  6. 20:23Domain-driven testing
  7. 24:29Implementing scenarios
  8. 30:15Adding service layers
  9. 35:47Testing infrastructure
  10. 41:58UI testing and summary
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.