~/talk

Old solutions to new testing problems

Talkat Assert(js) 2019 · on Thursday, 2019-09-12· [testing]
slides:none on file

xUnit Test Patterns provides five concrete warning signs and fixes applied to JavaScript: a flexible test with loops becomes split simple tests; a mystery guest caused by shared fixtures becomes inline/delegated/implicit setup; noisy fixtures get a minimal or parameterised creation approach (use test-data-bot or custom creators); interacting tests are solved with fresh fixtures or deep clones; duplicated production logic in assertions is replaced by hard‑coded, easy-to-check examples. Tools mentioned include Jest, Cypress and Percy.

AI-written summary · about

  1. 0:00Old Solutions
  2. 0:29JavaScript test tooling has improved a lot.
  3. 0:49The problem now: Test Maintainability
  4. 1:25How can we learn how to write more maintainable tests?
  5. 3:03Five Patterns
  6. 3:27Takeaways
  7. 4:211 "Code Smells"
  8. 7:07A Flexible Test
  9. 7:26Solution: Simple Tests
  10. 10:17A Mystery Guest
  11. 11:52In-Line Setup Each Test Method creates its own Fresh Future by building eactly
  12. 12:16Delegated Setup
  13. 13:49Implicit Setup We build the test future common to several tests in the setup
  14. 16:08A Irrelevant Information
  15. 16:46General Fixture
  16. 16:57Minimal Fixture
  17. 17:18What if that data is still needed for the code to run?
  18. 17:58Parameterized Creation Method
  19. 20:13Test Data Creation Libraries
  20. 23:06A Interacting Tests
  21. 23:50A Shared Fixture
  22. 24:18Solution: Fresh Fixture
  23. 27:00A Production Logic in Test
  24. 27:51Solution: Hard-Coded Test Data !
  25. 28:41Review: Test Patterns
  26. 30:02Let's talk about test patterns!
  27. 30:24The deeper takeaway...
  28. 31:04Let's connect people with our rich testing history
~/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.