25 Mar 2006 pfdietz   » (Master)

William Bland has blogged about the Common Lisp packages COVER and ITERATE. I don't use ITERATE, but my group at work uses a modified version of COVER to ensure adequate unit testing of an important program. I was using it just this week and found several new bugs.

COVER is nearly 15 years old and is showing its age. It doesn't handle coverage of iteration constructs very well. It's ignorant of methods and generic functions. The way it's implemented involves destructive modification of lisp objects that occur as literal constants in compiled code (which is unconforming under the ANSI CL specification). Its internal logic is difficult to understand, if clever. It doesn't allow one to count uncovered branch points, just the number of uncovered code subtrees. It doesn't allow one to dump and reload coverage information, or combine coverage information from separate runs.

I've been thinking about reimplementing COVER to deal with these problems. Also, I would like the action taken on visiting an uncovered code segment to be dynamically reconfigurable, probably via CL's OO mechanisms. I want to do automated glassbox testing; COVER could provide feedback to a test generator, steering it (via genetic algorithms?) to visit code segments that have not been extensively tested. I'd want it to be able to maintain information beyond just 'some execution since the last global reset has visited this branch'.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!