[Home]

(clos-unit) Testing Framework



 

Abstract

There are different reasons why you would like to reimplement a tool or a framework using another language, trying to keep the same (maybe improved) functionality and the same design. I did it for the JUnit testing framework, reimplemented in and for CLOS. In this article I will explain why, I will show how the tool has been integrated into the incremental and interactive Lisp way of developing and I will try to show a comparison between the two implementations.

Introduction

The tool presented in this article, "clos-unit", is a simple CLOS implementation of the famous JUnit framework, probably the most used testing framework within the Java developers' community. So "yet another testing framework for lisp". Why then implementing clos-unit? There are many reasons for it, some very pragmatic, from a software development point of view, and others more didactical, from a computer science teaching point of view. In the next chapters I will first explain the reasons that led me to the idea and necessity to implement clos-unit. In a second part I will quickly show how easy you can incrementally write, evaluate and add new test cases and suites with clos-unit. Then I will show the architecture and explain the main differences between the Java and the CLOS implementation, showing at the same time how easy and natural is the CLOS realization of some design patterns that generate complex code in Java. During this article I use the terms CLOS and Lisp almost in an exchangeable way. The clos-unit tool has been implemented in CLOS, in order to follow the object-oriented architecture specified for JUnit, but, because Common Lisp Object System is embedded in Lisp, rather than representing its extension, the term Lisp can also be used to represent it.

Downloads

Software and documentation
Full Article