i-nth logo

Authors

Alan Rust, Brian Bishop, & Kevin McDaid

Abstract

It is widely documented that the absence of a structured approach to spreadsheet engineering is a key factor in the high level of spreadsheet errors.

In this paper we propose and investigate the application of Test-Driven Development to the creation of spreadsheets. Test-Driven Development is an emerging development technique in software engineering that has been shown to result in better quality software code. It has also been shown that this code requires less testing and is easier to maintain.

Through a pair of case studies we demonstrate that Test-Driven Development can be applied to the development of spreadsheets. We present the detail of these studies preceded by a clear explanation of the technique and its application to spreadsheet engineering.

A supporting tool under development by the authors is also documented along with proposed research to determine the effectiveness of the methodology and the associated tool.

Sample

Screenshot of Test Driven Development tool
Screenshot of Test Driven Development tool

This figure shows a screenshot of the tool with details of a single test named "reordLvl_vers2.1".

When the test is run the tool substitutes 1900 into Cell C11 and 2900 into cell C10. The value in G11, based on the formula present, is then checked to make sure it is equal to 8100. In this case the value was correct and the test result is a green light.

If the value were incorrect a red light would be displayed and further changes would be made to the code until the test passes.

After the test is run, the original values in the input cells are reentered.

Publication

2006, EuSpRIG

Full article

Investigating the potential of test-driven development for spreadsheet engineering