Go home now Header Background Image
Submission Procedure
share: |
Follow us
Volume 16 / Issue 2

available in:   PDF (485 kB) PS (642 kB)
Similar Docs BibTeX   Write a comment
Links into Future
DOI:   10.3217/jucs-016-02-0296


Systematic Unit Testing in a Read-eval-print Loop

Kurt Nørmark (Aalborg University, Denmark)

Abstract: Lisp programmers constantly carry out experiments in a read-eval-print loop. The experimental activities convince the Lisp programmers that new or modified pieces of programs work as expected. But the experiments typically do not represent systematic and comprehensive unit testing efforts. Rather, the experiments are quick and dirty one shot validations which do not add lasting value to the software, which is being developed. In this paper we propose a tool that is able to collect, organize, and re-validate test cases, which are entered as expressions in a read-eval-print loop. The process of collecting the expressions and their results imposes only little extra work on the programmer. The use of the tool provides for creation of test repositories, and it is intended to catalyze a much more systematic approach to unit testing in a read-evalprint loop. In the paper we also discuss how to use a test repository for other purposes than testing. As a concrete contribution we show how to use test cases as examples in library interface documentation. It is hypothesized--but not yet validated--that the tool will motivate the Lisp programmer to take the transition from casual testing to systematic testing.

Keywords: Emacs, interactive unit testing, program examples, scheme programming

Categories: D.1.1, D.2.5, D.2.6