Software testing software
QuickCheck is asoftware library , acombinator library , originally written in theprogramming language Haskell , designed to assist insoftware testing by generatingtest cases fortest suites – an approach known asproperty testing .
It is compatible with thecompiler ,Glasgow Haskell Compiler (GHC) and theinterpreter , Haskell User's Gofer System (Hugs ). It isfree and open-source software released under aBSD-style license.
In QuickCheck, assertions are written about logical properties that afunction should fulfill. Then QuickCheck attempts to generate a test case thatfalsifies such assertions. Once such a test case is found, QuickCheck tries to reduce it to a minimal failing subset by removing or simplifying input data that are unneeded to make the test fail.
The project began in 1999. Besides being used to test regular programs, QuickCheck is also useful for building up afunctional specification , for documenting what functions should be doing, and for testing compiler implementations.[ 1]
Re-implementations of QuickCheck exist for many languages:
^ "Data.Collections.Properties" .hackage.haskell.org .^ Pennebaker, Andrew (mcandre) (October 13, 2011)."qc" .GitHub . RetrievedDecember 9, 2011 . ^ Zito, Andrea (nivox) (July 27, 2014)."quickcheck4c" .GitHub . RetrievedJuly 27, 2014 . ^ Vokes, Scott (March 30, 2015)."Theft: property-based testing for C" .GitHub . RetrievedNovember 16, 2015 . ^ "QuickCheck" .Software.legiasoft.com . RetrievedDecember 9, 2011 .^ "CppQuickCheck" .GitHub . RetrievedMarch 30, 2015 .^ "RapidCheck" .GitHub . RetrievedMarch 30, 2015 .^ Pennebaker, Andrew (mcandre)."cluckcheck" .GitHub . RetrievedDecember 9, 2011 . ^ Draper, Reid (reiddraper) (May 9, 2013)."simple-check" .GitHub . RetrievedAugust 21, 2013 . ^ Draper, Reid (reiddraper) (March 27, 2014)."org.clojure/test.check" .GitHub . RetrievedMarch 27, 2014 . ^ "cl-quickcheck" .Cliki . RetrievedDecember 9, 2011 .^ Pennebaker, Andrew (mcandre) (October 27, 2011)."dashcheck" .GitHub . RetrievedDecember 9, 2011 . ^ "elm-explorations/test" .GitHub . RetrievedNovember 20, 2018 .^ Thomas, Dave (pragdave) (July 17, 2017)."quixir: Property-based testing for Elixir" .GitHub . RetrievedApril 1, 2019 . ^ Alfert, Klaus."propcheck: Property based testing for Elixir" .GitHub . RetrievedFebruary 1, 2021 . ^ "PropEr: a QuickCheck-inspired property-based testing tool for Erlang" .GitHub . RetrievedMay 8, 2019 .^ "FsCheck" .GitHub . June 25, 2015. RetrievedJune 25, 2011 .^ Pennebaker, Andrew (mcandre) (October 13, 2011)."factcheck" .GitHub . RetrievedDecember 9, 2011 . ^ leanovate (April 26, 2016)."Gopter" .GitHub . RetrievedApril 26, 2016 . ^ Pennebaker, Andrew (mcandre) (October 17, 2011)."IoCheck" .GitHub . RetrievedDecember 9, 2011 . ^ "FunctionalJava's QuickCheck module" .FunctionalJava . RetrievedAugust 14, 2015 .^ "Quickcheck for Java" .Quickcheck.dev.java.net . Archived fromthe original on November 17, 2011. RetrievedDecember 9, 2011 .^ "JCheck" .JCheck . RetrievedDecember 9, 2011 .^ "junit-quickcheck" .junit-quickcheck . RetrievedJuly 3, 2013 .^ "jqwik for the JUnit5 Platform" .jqwik . RetrievedJune 19, 2017 .^ "Quick Theories property testing for Java 8" .ncredinburgh . RetrievedOctober 30, 2017 .^ "jetCheck property-based testing for Java 8" .JetBrains . RetrievedJuly 10, 2018 .^ Thompson, Darrin (darrint)."qc.js" .Bitbucket . Archived fromthe original on August 7, 2011. RetrievedDecember 9, 2011 . ^ Crockford, Douglas."jscheck" .GitHub . RetrievedOctober 21, 2017 . ^ Dubien, Nicolas (dubzzz)."fast-check" .GitHub . RetrievedFebruary 3, 2018 . ^ "JSVerify — property based testing for JavaScript. Like QuickCheck" .jsverify.github.io .^ "Checkers.jl" .GitHub . RetrievedApril 8, 2018 .^ "lgtunit" . RetrievedFebruary 26, 2020 .^ "lua-quickcheck" .GitHub . RetrievedFebruary 25, 2017 .^ "QuickCheck.wl — Automated Property-Based Testing for the Wolfram Language - Online Technical Discussion Groups—Wolfram Community" .community.wolfram.com . RetrievedJuly 11, 2021 .^ Pennebaker, Andrew (mcandre)."objcheck" .GitHub . RetrievedDecember 9, 2011 . ^ Cruanes, Simon."QuickCheck inspired property-based testing for OCaml" .GitHub . RetrievedSeptember 1, 2022 . ^ "Test: LectroTest: Tutorial" .The LectroTest project was inspired by Haskell's QuickCheck module by Koen Claessen and John Hughes ^ "library(quickcheck)" .^ Amaral, Claudio; Florido, Mario; Costa, Vitor Santos (2014)."PrologCheck - Property-based testing in Prolog" .Proceedings of the Twelfth International Symposium on Functional and Logic Programming (FLOPS 2014) . Lecture Notes in Computer Science. Vol. 8475. pp. 1– 17.doi :10.1007/978-3-319-07151-0_1 .ISBN 978-3-319-07150-3 . ^ Oestreicher, Stefan (steos)."PhpQuickCheck" .GitHub . RetrievedNovember 12, 2015 . ^ Wahl, Matthias (mfelsche)."ponycheck" .GitHub . RetrievedDecember 26, 2018 . ^ MacIver, David (April 16, 2016)."QuickCheck in Every Language" . RetrievedAugust 1, 2022 . ^ "quickcheck: Property Based Testing in R" .GitHub . March 17, 2022.^ "Quickcheck" .docs.racket-lang.org .^ "QuickChick" .GitHub . RetrievedAugust 26, 2019 .^ Pennebaker, Andrew (mcandre) (September 14, 2017)."Rubycheck: a Ruby port of the QuickCheck unit test framework" .GitHub . ^ Gallant, Andrew (BurntSushi)."QuickCheck for Rust (with shrinking)" .GitHub . RetrievedMay 27, 2015 . ^ "Hypothesis-like property testing for Rust" .GitHub .^ "ScalaCheck" .GitHub . RetrievedJune 30, 2016 .^ "scalaprops/scalaprops" .GitHub . RetrievedJune 30, 2016 .^ "nyaya" .GitHub . RetrievedJune 30, 2016 .^ "Scheme-Check: Randomized Unit Testing for PLT Scheme" . Archived fromthe original on February 12, 2005.Scheme-Check is a module that implements randomized unit testing in PLT Scheme. With Scheme-Check, instead of creating many 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. ^ Mejr, Antero."SRFI 252: Property Testing" .Scheme Requests for Implementation . RetrievedApril 25, 2024 . ^ Pennebaker, Andrew (mcandre)."QuickSmash" .GitHub . RetrievedDecember 9, 2011 . ^ "QCheck/SML" .Contrapunctus . November 22, 2011. RetrievedDecember 9, 2011 .^ "SwiftCheck: QuickCheck for Swift" .GitHub . November 3, 2017.^ Dubien, Nicolas (dubzzz)."fast-check" .GitHub . RetrievedFebruary 3, 2018 . ^ Chin, Janice."QuickCheck for Whiley" (PDF) . RetrievedApril 20, 2020 . [permanent dead link ] Claessen, Koen; Hughes, John (2002)."Testing Monadic Programs with QuickCheck" (PostScript ) .SIGPLAN Notices .37 (12):47– 59.CiteSeerX 10.1.1.111.1618 .doi :10.1145/636517.636527 . RetrievedJanuary 29, 2006 . Claessen, Koen & Hughes, John (2000)."QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs" (PDF) .Proceedings of the International Conference on Functional Programming (ICFP), ACM SIGPLAN . RetrievedJanuary 29, 2006 . Claessen, Koen & Hughes, John (2003)."Specification Based Testing with QuickCheck" .The Fun of Programming, Cornerstones of Computing, Jeremy Gibbons and Oege de Moor (Eds.) . Palgrave:17– 40. Archived fromthe original on July 4, 2007. RetrievedJanuary 29, 2006 . Claessen, Koen (August 2004)."QuickCheck: Specification-based Random Testing" .Presentation at Summer Institute on Trends in Testing: Theory, Techniques and Tools . Archived fromthe original (PPT ) on April 30, 2007. RetrievedJanuary 29, 2006 . Claessen, Koen; Runciman, Colin; Chitil, Olaf & Hughes, John (2002)."Testing and Tracing Lazy Functional Programs Using QuickCheck and Hat" .Advanced Functional Programming: 4th International School, Lecture Notes in Computer Science .2638 . Springer Verlag:59– 99. Archived fromthe original (PostScript ) on October 12, 2006. RetrievedJanuary 29, 2006 .