QuickCheck: a lightweight tool for random testing of Haskell programs

@inproceedings{Claessen2000QuickCheckAL,
  title={QuickCheck: a lightweight tool for random testing of Haskell programs},
  author={Koen Claessen and John Hughes},
  booktitle={ICFP '00},
  year={2000}
}
Quick Check is a tool which aids the Haskell programmer in formulating and testing properties of programs. Properties are described as Haskell functions, and can be automatically tested on random input, but it is also possible to define custom test data generators. We present a number of case studies, in which the tool was successfully used, and also point out some pitfalls to avoid. Random testing is especially suitable for functional programs because properties can be stated at a fine grain… 
MuCheck: an extensible tool for mutation testing of haskell programs
TLDR
MuCheck is a counterpart to the widely used QuickCheck random testing tool for functional programs, and can be used to evaluate the efficacy of QuickCheck property definitions.
Testing monadic code with QuickCheck
TLDR
This paper shows how to use QuickCheck for testing monadic code, and in particular imperative code written using the ST monad, and defines a new language of monadic properties, and makes a link between program testing and the notion of observational equivalence.
Random Testing of ML Programs
TLDR
This thesis examines existing tools for randomly testing functional programs, and outlines an extension of one of these tools which is easier and quicker to use and allows more complex properties to be tested.
Lightweight verification of functional programs
TLDR
The goal is to allow programmers to do more with QuickCheck properties than just test them, and to develop the theory behind sound type encodings, and have written tools that implement the ideas.
ValiErlang: A Structural Testing Tool for Erlang Programs
TLDR
A tool is presented, called ValiErlang, which implements specific testing criteria for sequential and parallel Erlang programs, the latter using the message-passing paradigm, and evaluates the obtained coverage by criteria, thus, the tester can evaluate the quality of the program being tested.
QuickEval: An Interactive Tool for Coverage Based Testing of Haskell Programs
TLDR
QuickEval can be used effectively to perform the assignment evaluation process as it can create the test suite automatically and also helps to evaluate the function with all possible test cases which guarantees the proper evaluation of assignments.
AutoBench: comparing the time performance of Haskell programs
TLDR
This article shows how QuickCheck can be combined with the Criterion benchmarking library to give a lightweight means to compare the time performance of Haskell programs, and finds that many QuickCheck correctness properties are also efficiency improvements.
1 CurryCheck: A Tool for Testing Properties of Curry Programs
  • Computer Science
  • 2020
TLDR
CurryCheck is a tool that supports the automation of testing Curry programs and the properties to be tested are written by combinators proposed for EasyCheck, which are actually influenced by QuickCheck but extended to the demands of functional logic programming.
Verifying Haskell programs by combining testing and proving
TLDR
A method for improving confidence in the correctness of Haskell programs by combining testing and proving is proposed, which has extended the Agda/Alfa proof assistant for dependent type theory with a tool for random testing.
...
...

References

SHOWING 1-10 OF 34 REFERENCES
An Evaluation of Random Testing
TLDR
Simulation results are presented which suggest that random testing may often be more cost effective than partition testing schemes and results of actual random testing experiments are presented, which confirm the viability of random testing as a useful validation tool.
Automatically Checking an Implementation against Its Formal Specification
TLDR
This work proposes checking the execution of an abstract data type's imperative implementation against its algebraic specification, which can be thought of as itself an implementation with maximum design diversity, and the validation as a form of multiversion-programming comparison.
Why Functional Programming Matters
TLDR
This paper shows that two features of functional languages in particular, higher-order functions and lazy evaluation, can contribute significantly to modularity.
Data Abstraction, Implementation, Specification, and Testing
TLDR
A compiler-based system DAISTS that combines a data-abstraction implementation language (derived from the SIMULA class) with specification by algebraic axioms with the advantage over conventional programming systems is described.
Compiler testing using a sentence generator
TLDR
A system for assisting in the testing phase of compilers is described and some experimental results are reported concerning PLZ, MINIPL and some other languages.
Lava: hardware design in Haskell
TLDR
The system design exploits functional programming language features, such as monads and type classes, to provide multiple interpretations of circuit descriptions that implement standard circuit analyses such as simulation, formal verification and the generation of code for the production of real circuits.
Observable Sharing for Functional Circuit Description
TLDR
This paper proposes an extension to call-by-need languages which makes graph sharing observable, based on non updatable reference cells and an equality test on this type, and shows that this simple and practical extension has well-behaved semantic properties.
Self-testing/correcting with applications to numerical problems
TLDR
This work presents general techniques for constructing simple to program self-testing/correcting pairs for a variety of numerical functions, including integer multiplication, modular multiplication, matrix multiplication, inverting matrices, computing the determinant of a matrix, Computing the rank of a Matrix, integer division, modular exponentiation, and polynomial multiplication.
Generating test data with enhanced context-free grammars
TLDR
The author's experience using context-free grammars to generate tests for VLSI circuit simulators indicates that they are remarkably effective tools that virtually anyone can use to debug virtually any program.
Designing programs that check their work
TLDR
This paper defines the concept of a program checker, designs program checkers for a few specific and carefully chosen problems in the class P of problems solvable in polynomial time and characterizes the problems that can be checked.
...
...