Thursday, 29 January 2015
(And so FsCheck.)
One of the many challenges when doing Test-Driven Development is to come up with good enough random input values, in such a way that the system under test (SUT) can be exercised every time though the same code path.
These random input values, that exercise the SUT every time through the same code path, belong into a category, or set, or class, named Equivalence Class, after the xUnit Test Patterns book terminology.
QuickCheck provides a DSL, through its various combinators, that allows you to create and consume such Equivalence Classes.
QuickCheck also provides a sophisticated mechanism for executing test cases multiple times, and doing analytics through the concepts of classifying and shrinking, when reporting back the test results.
© 2011-2018 Nikos Baxevanis. All written content on this site is provided under a Creative Commons ShareAlike license. All code is provided under a MIT license unless otherwise stated.