QuickCheck
Developer(s) | Koen Claessen, John Hughes |
---|---|
Stable release | 2.4.1.1
/ Tue Apr 26 18:58:51 UTC 2011 |
Operating system | Unix-like, Microsoft Windows |
Type | Software testing |
License | BSD-style |
Website | http://www.cse.chalmers.se/~rjmh/QuickCheck/ |
QuickCheck is a combinator library written in Haskell, designed to assist in software testing by generating test cases for test suites. It is compatible with the GHC compiler and the Hugs interpreter.
In QuickCheck the programmer writes assertions about logical properties that a function should fulfill; these tests are specifically generated to test and attempt to falsify these assertions. The project was started in 2000. Besides being used to test regular programs, QuickCheck is also useful for building up a functional specification, for documenting what functions should be doing, and for testing compiler implementations.[1]
Re-implementations of QuickCheck exist for Erlang,[2] Scheme[3], Common Lisp,[4] Perl,[5] Python,[6] Ruby,[7] Java,[8][9] Scala,[10] F#,[11], Smalltalk,[12] Standard ML,[13] JavaScript,[14], Node.js[15], Clojure[16], C.[17], C++.[18], OCaml[19].
See also
References
- ^ http://www.cse.unsw.edu.au/~dons/code/fps/tests/Properties.hs
- ^ Arts, Thomas and Hughes, John and Johansson, Joakim and Wiger, Ulf (2006). "Testing Telecoms Software with Quviq QuickCheck". Proceedings of the Fifth ACM SIGPLAN Erlang Workshop": 2. doi:10.1145/1159789.1159792.
{{cite journal}}
:|access-date=
requires|url=
(help);|format=
requires|url=
(help); Unknown parameter|coauthors=
ignored (|author=
suggested) (help)CS1 maint: multiple names: authors list (link) - ^ "Scheme-Check is a module that implements randomized unit testing in PLT Scheme. With Scheme-Check, instead of creating lots of individual tests, you specify properties of your code and Scheme-Check generates a large amount of random data sets to test those properties. Scheme-Check is basically a Scheme port of QuickCheck" [1] -(Internet Archive copy).
- ^ cl-quickcheck
- ^ "Test::LectroTest::Tutorial".
The LectroTest project was inspired by Haskell's QuickCheck module by Koen Claessen and John Hughes: http://www.cs.chalmers.se/~rjmh/QuickCheck/.
{{cite web}}
: External link in
(help)|quote=
- ^ qc - another Python implementation of QuickCheck
- ^ RushCheck
- ^ Quickcheck for Java
- ^ JCheck
- ^ ScalaCheck
- ^ FsCheck
- ^ QuickSmash]
- ^ QCheck/SML
- ^ qc.js
- ^ Node.js quickcheck
- ^ ClojureCheck
- ^ qc
- ^ QuickCheck++
- ^ Ocaml
Further reading
- Koen Claessen, John Hughes (2002). "Testing Monadic Programs with QuickCheck" (PostScript). SIGPLAN Notices. 37 (12): 47–59. doi:10.1145/636517.636527. Retrieved 2006-01-29.
- Koen Claessen and John Hughes (2000). "QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs" (PostScript). Proc. Of International Conference on Functional Programming (ICFP), ACM SIGPLAN. Retrieved 2006-01-29. [dead link]
- Koen Claessen and John Hughes (2003). "Specification Based Testing with QuickCheck". The Fun of Programming, Cornerstones of Computing, Jeremy Gibbons and Oege de Moor (eds.): 17–40. Retrieved 2006-01-29. [dead link]
- Koen Claessen (2004). "QuickCheck: Specification-based Random Testing" (PPT). Presentation at Summer Institute on Trends in Testing: Theory, Techniques and Tools. Retrieved 2006-01-29.
{{cite journal}}
: Unknown parameter|month=
ignored (help) [dead link] - Koen Claessen, Colin Runciman, Olaf Chitil, and John Hughes (2002). "Testing and Tracing Lazy Functional Programs Using QuickCheck and Hat" (PostScript). Advanced Functional Programming: 4th International School, Lecture Notes in Computer Science. 2638: 59–99. Retrieved 2006-01-29.
{{cite journal}}
: CS1 maint: multiple names: authors list (link) [dead link]
External links
- "Introduction to QuickCheck" -(on the Haskell wiki)
- "QuickCheck as a test set generator: Haskell as an ultimate "smoke testing" tool OR Using QuickCheck as a DIY test data generator"
- "QuickCheck / GADT"
- "Introductory Haskell: Solving the Sorting-It-Out Kata" -(demonstration of the use of QuickCheck in solving a programming problem)
- QuickCheck testimonial
- "System.FilePath, automated testing"
- "Chapter 11. Testing and quality assurance" of Real World Haskell; covers property-based testing using QuickCheck