~/talk

Property Based Testing: Concepts and Examples

Talkat Great International Developer Summit 2023 · 2023-04-25..04-28· [testing]
links:none on file
slides:none on file

Shows concrete PBT with jqwik using @Property/@ForAll to generate ~1000 random cases by default, reports the seed for reproducibility and uses shrinking to reduce failures (example shrinks to [0,1]). Verifies properties like “reverse(reverse(list)) == original,” builds custom generators with Arbitraries (German ZIP five-digit strings), finds real bugs (ChatGPT stream reverse, Caesar-cipher charset/shift limits, Math.abs overflow at Integer.MIN_VALUE, URL encode failures for some charsets), and demonstrates restricting ranges and combining generators for class constructors.

AI-written summary · about

  1. 0:00Introduction to jQwik
  2. 3:07Property testing examples
  3. 5:40Annotations and workflow
  4. 8:25Configuring test reports
  5. 12:04Shrinking and debugging
  6. 16:09Data generation options
  7. 18:57Handling Java time types
  8. 23:19Custom data generators
  9. 26:58Testing Java records
  10. 32:47When to use PBT
  11. 36:56Caesar Cipher case study
  12. 43:38Boundary condition testing
  13. 47:40Finding property patterns
  14. 52:26Testing FizzBuzz
  15. 55:02Fibonacci and conclusion
~/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.