~/talk

Unit Testing by Example

Talkat PHP UK Conference 2017 · 2017-02-16..02-17· [php, testing]
slides:none on file

Concrete how-to and measurable wins: start by writing a failing test for a discovered bug (example: make quantity 0.1 round up to 1), add tests when changing behavior (example: free shipping when subtotal ≥ 40 pounds), write tests before new features (catalog import parseFromCSV) and use integration checks as API contracts. Uses PHPUnit + Guzzle + ghazal, measures cyclomatic branches via PHPUnit reports, claims roughly a 50% speedup (six weeks → three) and shows tests actually prevent regressions.

AI-written summary · about

  1. 0:00Introduction
  2. 2:05How to become a testing expert
  3. 3:40Testing without automation
  4. 7:00First opportunity to test
  5. 9:50Safety net
  6. 13:25Regression test
  7. 13:52Improving existing code
  8. 14:42Changing the code
  9. 14:59Test both cases
  10. 15:33New code
  11. 17:50inspect array
  12. 18:57rock climbing
  13. 20:15ecommerce example
  14. 21:33catalog imports example
  15. 22:46write less code
  16. 24:45some things to consider
  17. 27:22use your judgment
  18. 29:05how many test cases
  19. 29:33cyclomatic complexity
  20. 29:58execution paths
  21. 31:09decision branches
  22. 38:08recap
  23. 39:57testing as preemptive debugging
  24. 51:00mock dependencies
  25. 52:47handling mocks
~/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.