We have now written a few applications, but we have not written any tests for them. While some people argue that testing puts an unnecessary burden on teams[1], there are some benefits to software testing[2], such as ensuring the quality of the product and shortening the product delivery time by catching bugs early in the development process. Clojure provides a number of unit testing frameworks that can help us to organize, write, and test code.
This chapter will cover the following topics:
- Why testing is important
- Different approaches to testing
- An introduction to Clojure unit testing frameworks
The Clojure unit testing frameworks that we will investigate are as follows:
- clojure.test
- expectations
- Midje
- Speclj