~/talk

Clean Test Code

TalkinPolishat 4Developers 2022 Online · 2022-04-04..04-07· [testing]
links:none on file
slides:none on file

Argues that poorly written tests can be worse than no tests and recommends refactoring legacy code before adding tests. Advocates focused, parameterized unit tests with a Given-When-Then structure (one When only), using parameter arrays for multiple cases, and avoiding brittle UI assertions by using data-selectors and harnesses. Shows practical examples: using a Pact mock server for real HTTP calls against a stubbed provider and a command-handler test asserting three side effects (persist, change context, emit event), and warns that aiming for an arbitrary 80% coverage target is a dangerous anti-pattern.

AI-written summary · about

  1. 0:00Wprowadzenie do tematu
  2. 1:07Problemy z kodem testowym
  3. 8:51Anatomia czystego testu
  4. 14:30Testowanie warstw aplikacji
  5. 20:55Testy stanu i akceptacyjne
  6. 23:01Praktyczne wzorce testowe
  7. 31:16Testowanie modułów i abstrakcji
  8. 35:30Podsumowanie i wnioski
~/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.