Monads for Testers
summary
Shows concrete Scala-on-JVM examples of replacing exceptions with Option and Either to return values-or-errors, using map/flatMap for monadic composition, and using immutable case classes and copy to avoid unexpected state changes. Demonstrates lists as monads for collection flatMap and how compiler-enforced exhaustivity forces handling new cases (e.g., a new country), which simplifies tests and makes property-based testing practical; notes these ideas apply to Java or C# environments as well.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:03Testing to QA
- 2:51Functional programming quality
- 6:44Option for empty values
- 10:20Either for error handling
- 19:48Immutability issues
- 25:11Pure functions benefits
- 33:54Parallel execution clean code
- 37:04Monads why use them
- 42:22Summary resources
- 44:07Q&A
related talks
44mMonads for Testers
36mTesting for Lawful Good Adventures
46mTesting in the world of Functional Programming
31mSCALATEST: YOU'RE ASSERTING IT WRONG
43mMonads: Exploring Railway Oriented Programming in Ruby
01h 00mA New Approach to Testing with ScalaCheck / Property Based Testing
32mMUnit: your new favorite Scala testing library?
46mThe Essence of Testing
