QuickCheck
Developer(s) | Koen Claessen, John Hughes |
---|---|
Initial release | 1999 |
Stable release | 2.6 / 7 March 2013 |
Operating system | Unix-like, Microsoft Windows |
Available in | Haskell |
Type | Software testing |
License | BSD-style |
Website |
www |
QuickCheck is a combinator library originally 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. Then QuickCheck attempts to generate test cases that falsify these assertions. The project was started in 1999. 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 C,[2][3] C++,[4][5] Chicken Scheme,[6] Clojure,[7][8][9] Common Lisp,[10] D,[11] Elm, [12] Erlang, F#,[13] Factor,[14] Io,[15] Java,[16][17][18] JavaScript,[19] Node.js,[20] Objective-C,[21] OCaml,[22] Perl,[23] Prolog,[24][25] Python,[26] R,[27] Ruby,[28] Scala,[29] Scheme,[30] Smalltalk[31] and Standard ML.[32]
See also
References
- ↑ http://hackage.haskell.org/packages/archive/collections-api/1.0.0.0/doc/html/Data-Collections-Properties.html
- ↑ mcandre (October 13, 2011). "qc". Github.com. Retrieved December 9, 2011.
- ↑ nivox (July 27, 2014). "quickcheck4c". Github.com. Retrieved July 27, 2014.
- ↑ "QuickCheck". Software.legiasoft.com. Retrieved December 9, 2011.
- ↑ "CppQuickCheck". Github.com. Retrieved March 30, 2015.
- ↑ mcandre. "cluckcheck". Github.com. Retrieved December 9, 2011.
- ↑ ClojureCheck. "ClojureCheck". Bitbucket.org. Retrieved December 9, 2011.
- ↑ reiddraper (May 9, 2013). "simple-check". Github.com. Retrieved August 21, 2013.
- ↑ reiddraper (March 27, 2014). "org.clojure/test.check". Github.com. Retrieved March 27, 2014.
- ↑ "cl-quickcheck". Cliki.net. Retrieved December 9, 2011.
- ↑ mcandre (October 27, 2011). "dashcheck". Github.com. Retrieved December 9, 2011.
- ↑ "elm-check". Github.com. Retrieved February 18, 2015.
- ↑ "FsCheck". Codeplex.com. May 29, 2011. Retrieved December 9, 2011.
- ↑ mcandre (October 13, 2011). "factcheck". Github.com. Retrieved December 9, 2011.
- ↑ mcandre (October 17, 2011). "IoCheck". Github.com. Retrieved December 9, 2011.
- ↑ "Quickcheck for Java". Quickcheck.dev.java.net. Retrieved December 9, 2011.
- ↑ "JCheck". JCheck. Retrieved December 9, 2011.
- ↑ "junit-quickcheck". junit-quickcheck. Retrieved July 3, 2013.
- ↑ qc.js. "qc.js". Bitbucket.org. Retrieved December 9, 2011.
- ↑ Node.js node-quickcheck
- ↑ mcandre. "objcheck". Github.com. Retrieved December 9, 2011.
- ↑ little-arhat. "ocaml-quickcheck". Github.com. Retrieved December 9, 2011.
- ↑ "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/.
- ↑ "library(quickcheck)".
- ↑ Claudio Amaral, Mario Florido, Vitor Santos Costa (2014). "PrologCheck - Property-based testing in Prolog". Proceedings of the Twelfth International Symposium on Functional and Logic Programming (FLOPS 2014).
- ↑ MacIver, David (March 30, 2015). "Hypothesis documentation". Retrieved March 30, 2015.
- ↑ https://github.com/RevolutionAnalytics/quickcheck
- ↑ https://github.com/mcandre/rubycheck
- ↑ "ScalaCheck". Retrieved March 30, 2015.
- ↑ "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" -(Internet Archive copy).
- ↑ mcandre. "QuickSmash". Github.com. Retrieved December 9, 2011.
- ↑ "QCheck/SML". Contrapunctus.net. November 22, 2011. Retrieved December 9, 2011.
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" (PDF). Proc. Of International Conference on Functional Programming (ICFP), ACM SIGPLAN. Retrieved 2006-01-29.
- 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.
- Koen Claessen (August 2004). "QuickCheck: Specification-based Random Testing" (PPT). Presentation at Summer Institute on Trends in Testing: Theory, Techniques and Tools. Retrieved 2006-01-29.
- 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.
External links
Wikibooks has a book on the topic of: Haskell/Testing |
- "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.