Abstract
This paper describes two Haskell libraries for property-based testing. Following the lead of QuickCheck, these testing libraries SmallCheck and Lazy SmallCheck also use type-based generators to obtain test-sets of finite values for which properties are checked, and report any counter-examples found. But instead of using a sample of randomly generated values they test properties for all values up to some limiting depth, progressively increasing this limit. The paper explains the design and implementation of both libraries and evaluates them in comparison with each other and with QuickCheck.
Supplemental Material
Available for Download
- Sergio Antoy, Rachid Echahed, and Michael Hanus. A needed narrowing strategy. In POPL'94, pages 268--279, 1994. Google Scholar
Digital Library
- Lennart Augustsson. Overloaded booleans. http://augustss.blogspot.com/, 2007.Google Scholar
- Richard S. Bird. Introduction to Functional Programming Using Haskell. Prentice-Hall, 1998. Google Scholar
Digital Library
- Jan Christiansen and Sebastian Fischer. Easycheck - test data for free. In FLOPS'08, pages 322--336. LNCS 4989, 2008. Google Scholar
Digital Library
- K. Claessen, C. Runciman, O. Chitil, R. J. M. Hughes, and M. Wallace. Testing and tracing lazy functional programs using QuickCheck and Hat. In AFP'02, pages 59--99. Springer LNCS 2638, 2002.Google Scholar
- Koen Claessen and John Hughes. QuickCheck: A lightweight tool for random testing of Haskell programs. In ICFP'00, pages 268--279. ACM SIGPLAN, 2000. Google Scholar
Digital Library
- Andy Gill and Colin Runciman. Haskell program coverage. In Haskell'07, pages 1--12. ACM, 2007. Google Scholar
Digital Library
- Michael Hanus. Curry: An Integrated Functional Logic Language. Language report, available online at http://www.informatik.uni-kiel.de/~curry,/report.html, March 2006.Google Scholar
- Graham Hutton. The countdown problem. Journal of Functional Programming, 12(6):609--616, November 2002. Google Scholar
Digital Library
- Daniel Jackson. Software abstractions: logic, language and analysis. The MIT Press, 2006. Google Scholar
Digital Library
- Pieter W. M. Koopman, Artem Alimarine, Jan Tretmans, and Marinus J. Plasmeijer. Gast: Generic automated software testing. In IFL'02, pages 84--100. LNCS 2670, 2002. Google Scholar
Digital Library
- Fredrik Lindblad. Property directed generation of first-order test data. In TFP'07, volume 8, pages 105--123. Intellect, 2008.Google Scholar
- John W. Lloyd. Programming in an integrated functional and logic language. Journal of Functional and Logic Programming, 1999 (3).Google Scholar
- Wolfgang Lux. The Munster Curry Compiler. http://danae.uni-muenster.de/~lux/curry/, 2003.Google Scholar
- Neil Mitchell and Stefan O'Rear. Derive - project home page. http://www.cs.york.ac.uk/~ndm/derive/, March 2007.Google Scholar
- Neil Mitchell and Colin Runciman. A static checker for safe pattern matching in Haskell. In TFP'05, volume 6, pages 15--30. Intellect, 2007.Google Scholar
- Matthew Naylor and Colin Runciman. The Reduceron: Widening the von Neumann bottleneck for graph reduction using an FPGA. In IFL'07, page to appear. LNCS, 2008.Google Scholar
- Matthew Naylor and Colin Runciman. Finding inputs that reach a target expression. In SCAM'07, pages 133--142. IEEE Computer Society, 2007. Google Scholar
Digital Library
- Chris Okasaki. Red-black trees in a functional setting. Journal of Functional Programming, 9(4): 471--477, 1999. Google Scholar
Digital Library
- Simon Peyton Jones. The Implementation of Functional Programming Languages. Computer Science. Prentice-Hall, 1987. Google Scholar
Digital Library
- Simon Peyton Jones, Alastair Reid, Fergus Henderson, Tony Hoare, and Simon Marlow. A semantics for imprecise exceptions. In PLDI'99, pages 25--36. ACM, 1999. Google Scholar
Digital Library
- D. A. Turner. A new implementation technique for applicative languages. Software - Practice and Experience, 9(1):31--49, 1979.Google Scholar
Index Terms
Smallcheck and lazy smallcheck: automatic exhaustive testing for small values
Recommendations
Smallcheck and lazy smallcheck: automatic exhaustive testing for small values
Haskell '08: Proceedings of the first ACM SIGPLAN symposium on HaskellThis paper describes two Haskell libraries for property-based testing. Following the lead of QuickCheck, these testing libraries SmallCheck and Lazy SmallCheck also use type-based generators to obtain test-sets of finite values for which properties are ...
ArbitCheck: A Highly Automated Property-Based Testing Tool for Java
ICSTW '14: Proceedings of the 2014 IEEE International Conference on Software Testing, Verification, and Validation WorkshopsLightweight property-based testing tools are becoming popular these days. With property-based testing, developers can test properties of the system under test against large varieties of randomly generated inputs without writing test cases. Despite the ...
Automatic generation of test models and properties from UML models with OCL constraints
OCL '12: Proceedings of the 12th Workshop on OCL and Textual ModellingModel-Based Testing and Property-Based Testing are two testing methodologies that usually facilitate the automation of the generation of test cases, using either models or properties as basis to derive complete test suites. In doing so, they also ...







Comments