~/talk

Property-Based Testing: Let Your Testing Library Work for You

Talkat ScalaCon November 2021 · 2021-11-02..11-05· [testing]
slides:none on file

Explains property-based testing by building a discount-calculator example, using ScalaTest with ScalaCheck generators to produce 100 randomized cases (ScalaTest defaults to 10 unless changed) that uncover edge bugs — e.g. a leap-year Feb 29 failure — then automatically shrink failing inputs to minimal counterexamples. Covers generators, assumptions, frequency weighting, and patterns for writing properties (invariants, symmetry, oracle), plus practical tradeoffs: harder to write properties, non-determinism, and strategies: example-first or target key components.

AI-written summary · about

  1. 0:00Introduction to property-based testing
  2. 7:56Example-based vs property-based testing
  3. 14:39Writing first property-based test
  4. 26:10Challenges of property-based testing
  5. 37:37When to use property-based testing
  6. 43:38Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.