Fully Automatic Testing with Functions as Specifications
Although computer systems penetrate all facets of society, the software running those systems may contain many errors. Producing high quality software appears to be difficult and very expensive. Even determining the quality of software is not easy. Testing is by far the most used way to estimate the quality of software. Testing itself is not easy and time consuming.
In order to reduce the costs and increase the quality and speed of testing, testing should be automated itself. An automatical specification based test tool generates test data, executes the associated tests, and makes a fully automatically verdict based on a formal specification. Advantages of this approach are that one specifies properties instead of instances of these properties, test data are derived automatically instead of manually, the tests performed are always up to date with the current specification, and automatic testing is fast and accurate.
We will show that functions in a functional programming language can be used very well to model properties. One branch of the automatic test system Gast handles logical properties relating function arguments and results of a single function call. The other branch of Gast handles specifications of systems with an internal state.
KeywordsState Machine Model Checker Search Tree Input Sequence Priority Queue
Unable to display preview. Download preview PDF.
- 1.See, http://www.junit.org
- 2.Bernot, G., Gaudel, M.C., Marre, B.: Software testing based on formal specifications: a theory and a tool. Software Engineering Journal, 387–405 (November 1991)Google Scholar
- 4.Koopman, P., Plasmeijer, R.: Testing reactive systems with GAST. In: Gilmore, S. (ed.) Trends in Functional Programming, vol. 4, pp. 111–129 (2004)Google Scholar
- 5.van Weelden, A., et al.: On-the-Fly Formal Testing of a Smart Card Applet. SEC 2005. Or technical report NIII-R0403, at: http://www.cs.ru.nl/research/reports
- 7.Plasmeijer, R., van Eekelen, M.: Clean language report version 2.1, http://www.cs.ru.nl/~clean
- 11.ISO/IEC, 13568:2002 standard, See also: http://www.vl.zuser.org
- 12.Koopman, P., Plasmeijer, R.: Generic Generation of Elements of Types. In: Sixth Symposium on Trends in Functional Programming (TFP 2005), Tallin, Estonia, September 23-24 (2005)Google Scholar
- 15.Holzmann, G.: The SPIN Model Checker (2004) ISBN 0-321-22862-6Google Scholar
- 18.Chen, H., Dean, D., Wagner, D.: Model checking one million lines of C code. In: Proceedings 11th Annual NDSS, San Diego, CA (February 2004)Google Scholar
- 22.Miller, T., Strooper, P.: A framework and tool support for the systematic testing of model-based specifications ACM Tr. Soft. Eng. and Meth., pp. 409–439 (2003)Google Scholar