Testing the Scorer

In the previous section, we developed the score function iteratively at the REPL and saw it work correctly with a few example inputs. It doesn’t take much commitment to quality to want to do more validation than that! Let’s begin by teasing apart some of the things that people mean when they say “testing.” Testing includes the following:

  • Thinking through whether the code is correct
  • Stepping through the code in a development environment where you can see everything that is happening
  • Crafting inputs to cover the various code paths
  • Crafting outputs to match the crafted inputs
  • Running the code with various inputs
  • Validating the results for correctness
  • Automating the validation of results
  • Organizing tests so that they can be automatically ...

Get Programming Clojure, 2nd Edition 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.