Property-based testing for functional programs
Licentiatavhandling, 2011

This thesis advances the view that property-based testing is a powerful way of testing functional programs, that has advantages not shared by traditional unit testing. It does this by showing two new applications of property-based testing to functional programming as well as a study of the effectiveness of property-based testing. First, we present a tool, QuickSpec, which attempts to infer an equational specification from a functional program with the help of testing. The resulting specifications can be used to improve your understanding of the code or as properties in a test suite. The tool is applicable to quite a wide variety of situations. Second, we describe a system that helps to find race conditions in Erlang programs. It consists of two parts: a randomised scheduler to provoke unusual behaviour in the program under test and allow replayability of test cases, and a module that tests that all of the functions of an API behave atomically with respect to each other. Finally, we present an experiment we carried out to compare property-based testing against test-driven development. The results were inconclusive, but in the process we developed a black-box algorithm for automatically grading student programs by testing, by inferring for each program a set of bugs that the program contains.

testing

Functional programming

Room EC, EDIT building, Hörsalsvägen 11, Göteborg
Opponent: Colin Runciman, Department of Computer Science, University of York

Författare

Nicholas Smallbone

Chalmers, Data- och informationsteknik, Programvaruteknik

Finding Race Conditions in Erlang with Quick Check and PULSE

ICFP'09: Proceedings of the ACM SIGPLAN International Conference on Functional Programming,;(2009)p. 149-160

Paper i proceeding

Ranking programs using black box testing

Proceedings - International Conference on Software Engineering,;(2010)p. 103-110

Paper i proceeding

QuickSpec: Guessing Formal Specifications using Testing

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics),;Vol. 6143(2010)p. 6-21

Paper i proceeding

Styrkeområden

Informations- och kommunikationsteknik

Ämneskategorier

Programvaruteknik

Utgivare

Chalmers

Room EC, EDIT building, Hörsalsvägen 11, Göteborg

Opponent: Colin Runciman, Department of Computer Science, University of York

Mer information

Senast uppdaterat

2019-01-18