Testing the untestable PART II – patterns, use cases and practices
summary
Shows concrete techniques: use jQuick property-based tests (default 1,000 tries, author recommends 10,000 for text) and it found a missed edge case (library reported 8 edge cases, author had 7), inject caches by making constructors protected and use fixture subclasses to supply a test cache, separate retry policy into a decorator and test it with a failing fake using FailSafe (retry policy maxRetries=3), make executors explicit and use a deterministic scheduler or ThreadsCollider/JCStress for concurrency, test logs with an SLF4J test appender, and use EqualsVerifier for BigDecimal equality pitfalls; testcontainers must match production versions.
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 2:29Testing value objects with PBT
- 15:32Testing internal caches
- 18:47Testing private immutable fields
- 21:17Fault tolerance and resilience
- 27:27Multi-threading and concurrency
- 33:53Testing logging as a feature
- 39:42Testing equals and hashCode
- 41:55Testing persistence options
- 44:04Summary and feedback
related talks
44mTesting the untestable - patterns and use cases analysis
46mTesting the untestable - patterns and use cases analysis
26mTesting the Tricky Stuff
51mProperty Testing: Write Fewer Tests, Find More Bugs
57mAdvanced Testing Techniques: Tips from the trenches
55mNext-Gen Testing Tools for Java
02h 46mThe Joy of Testing
47mThe Valley of Success
