~/talk

Improve your Tests with Property State-Machine Tests

Talkat Scala Days 2023 Madrid · 2023-09-12..09-14· [scala, testing]
slides:none on file

Demonstrates property state‑machine testing with the new Karat library built on ScalaCheck (plus ScalaCheck-effect and HTTP4s integrations), using temporal logic style specifications and action generators instead of white‑box invariants. Concrete results include reproducing the LevelDB literature bug as 17 then 33‑step counterexamples, and finding a crafted bounded‑queue bug after ~1,000+ runs; test shrinking yields minimal failing traces and reproducible seeds. The approach treats systems as black‑box HTTP APIs, verifies temporal properties across complete traces, and successfully uncovers both implementation and spec errors.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10About speaker
  3. 2:11Why property-based testing
  4. 3:15Unit vs property tests
  5. 4:21Core concepts
  6. 8:19Stateful testing explained
  7. 12:35Demo with ScalaCheck
  8. 18:59Edge cases challenge
  9. 21:51Limitations of stateful testing
  10. 22:13Property state-machine testing
  11. 23:36Key components
  12. 25:25Introducing Karat
  13. 29:40Karat concepts to tests
  14. 30:02Testing HTTP APIs
  15. 35:24Benefits of state-machine testing
  16. 38:43Debugging with shrinking
  17. 40:11Recap and key takeaways
~/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.