Chapter 1

Introduction

Unit testing concerns testing individual elements of a program in isolation. SchemeUnit is a framework for defining, organizing, and executing unit tests written in the PLT dialect of Scheme. SchemeUnit draws inspiration from two strands of work: existing practice in interactive environments and the development of unit testing frameworks following the growth of Extreme Programming.

In an interactive environment it is natural to write in a ``code a little, test a little'' cycle: evaluating definitions and then immediately testing them in the read-eval-print loop (REPL). We take the simplicity and immediacy of this cycle as our model. By codifying these practices we preserve the test cases beyond the running time of the interpreter allowing the tests to be run again when code changes.

Unit testing is one of the core practices of the Extreme Programming software development methodology. Unit testing is not new to Extreme Programming but Extreme Programming's emphasis on unit testing has spurred the development of software frameworks for unit tests. SchemeUnit draw inspiration from, and significantly extends the expressiveness of, these frameworks.