Unlocking Potential of Property Based Testing with Ractor
summary
Built a Property‑based testing gem called PBT gem that implements generators, shrinking, deterministic seeds and about 30 arbitraries, with optional Ractor workers and experimental RSpec matcher support. Claim: Ractor helps only for CPU‑bound work and when code is Ractor‑compatible — benchmarks show up to 5x faster in those cases but can be 194x slower otherwise. Implementation notes: uses dynamic class eval to ship user predicates into Ractors, needs preloading and workarounds for RSpec and many standard gems.
AI-written summary · about
chapters (11)
- 0:00Introduction and setup
- 1:34What is property-based testing
- 8:49Ractor and testing synergy
- 10:12Introducing the PBT gem
- 13:34Demo of PBT gem
- 13:59Internal architecture of PBT
- 20:25Ractor and RSpec integration
- 24:16Benchmarking results
- 26:48Discoveries and limitations
- 29:54Future of Ractor compatibility
- 30:18Conclusion and promotion
related talks
30mRactor on Ruby 3.4
27mParallel testing with Ractors - Putting CPU's to work
28mCome Discuss Ractors and Concurrency with 'The Dude'!
28mRactors in Ruby 4.0: Message Passing Without the Pain
29mMillion-Agent Ruby: Ractor-Local GC in the Age of AI
25mRactor Demonstration
29mUsing Ractors and Making Ractors Usable
01h 00mBehaviour Driven Development with RSpec
