~/talk

Journey to an FP Test Harness

name:Mark Waks
github:jducoeur
slides:none on file

Case study traces converting Play API tests from Future-heavy, mutable traits into a pure-FP harness built with Cats IO and state transformers. Code moves from blocking Play helpers and cake-style self-types to a single TestOp type defined as StateT[IO], uses IndexedStateT to model phase changes, and maintains a cache of clients for multi-user tests. Play result helpers get rewritten, the harness composes and runs deterministically, and the experiment succeeds.

AI-written summary · about

  1. 0:00Start
  2. 0:57Background
  3. 3:05Functional Tests
  4. 4:17Test Code Is Code
  5. 11:06Monads
  6. 15:18Api Tests
  7. 15:53Futures and Side-Effects
  8. 18:05Helper Methods
  9. 21:57Clean Up the Play Helpers
  10. 27:04Model Phase Changes in the Test
~/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.