~/talk

Untangle Your Spaghetti Test Code

Talkat Øredev 2024 · 2024-11-06..11-08· [testing]
links:none on file
slides:none on file

Test code at this project level is treated as throwaway but causes real maintenance pain so the talk gives concrete fixes: a test data manager that truncates and seeds the database instead of hidden SQL scripts, concise test data builder pattern to reduce boilerplate, centralized act and assert helpers for REST calls, and using approval testing or JSON-equals to make failures obvious. Examples use Java and Spring Boot, show a front-end act helper, and report fewer refactors and far less mock churn when internal APIs change.

AI-written summary · about

  1. 0:00Introduction to test code challenges
  2. 2:10Test code quality importance
  3. 5:09Arrange Act Assert structure
  4. 6:37Avoid hidden arrange in setup
  5. 9:06Test data managers for control
  6. 12:01Eliminating magic values in tests
  7. 16:02Shortening arrange with builders
  8. 19:41Simplifying act with helpers
  9. 22:14Reducing assert complexity
  10. 28:32Clear intentions in assertions
  11. 29:40Problem with inconsistent test names
  12. 32:51Choosing meaningful test names
  13. 37:48Balancing conciseness and intent
  14. 40:53Behavior over specification
  15. 41:59Cheat sheet and closing
~/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.