Wrapping Up

No one technique detects every problem. Strategic investments in a variety of testing techniques are the best way to get a great return on your testing effort. REPL-based testing helps us develop in small increments, making sure that each expression does what we expect. Example-based testing allows us to capture any interesting examples we discover during REPL testing, ensuring that special cases are covered by any future changes. Property-based testing clarifies our thinking and provides coverage from a wide variety of inputs. These techniques work together to give us validation that our code does what we expect.

Get Clojure Applied now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.