Chapter 8Testing Clojure

Programs are written by people. Unfortunately, that means that regardless of how much time we spend planning and designing the perfect program, the resulting code is imperfect. Testing is the verification process that we use to check our work and ensure that our programs do what we intended.

We can take many approaches to testing. Each tool or approach verifies different kinds of problems and has different creation and maintenance costs. As with diversifying a financial portfolio, you must balance the mixture of testing investments in your test suite. Our goal is to maximize the value (in terms of coverage, bugs found, and reduced risk) with respect to the effort (for both initial creation and ongoing maintenance). Generally ...

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.