test-framework-leancheck alternatives and similar packages
Based on the "test" category.
Alternatively, view test-framework-leancheck alternatives based on common mentions on social networks and blogs.
-
test-framework
Framework for running and organising QuickCheck test properties and HUnit test cases -
test-framework-th
Automagically (using Template Haskell) generates the Haskell-code you need when using HUnit -
test-framework-sandbox
test-sandbox support for the test-framework package -
test-framework-th-prime
Template Haskell for test framework -
test-monad-laws
QuickCheck properties for monad classes -
test-invariant
Provide common invariants to be checked with QuickCheck -
test-fun
Representation of higher-order functions for property testing -
test-framework-doctest
Test.Framework wrapper for DocTest -
test-framework-program
A test-framework plugin that will run executables. -
test-framework-skip
A module for the test-framework system that allows one to mark a test to be skipped. -
test-framework-golden
Golden tests support for test-framework
Updating dependencies is time-consuming.
Do you think we are missing an alternative of test-framework-leancheck or a related project?
Popular Comparisons
README
test-framework-leancheck: LeanCheck support for test-framework
LeanCheck support for the test-framework test framework.
Installing
$ cabal install test-framework-leancheck
Example
Here's how your test.hs
might look like:
import Test.Framework
import Test.Framework.Providers.LeanCheck as LC
import Data.List
main :: IO ()
main = defaultMain tests
tests :: [Test]
tests =
[ LC.testProperty "sort . sort == sort"
$ \xs -> sort (sort xs :: [Int]) == sort xs
, LC.testProperty "sort == id" -- not really, should fail
$ \xs -> sort (xs :: [Int]) == xs
]
And here is the output for the above program:
$ ./eg/test
sort . sort == sort: [OK, passed 100 tests.]
sort == id: [Failed]
*** Failed! Falsifiable (after 7 tests):
[1,0]
Properties Total
Passed 1 1
Failed 1 1
Total 2 2
Options
Use -a
or --maximum-generated-tests
to configure
the maximum number of tests for each property.
$ ./eg/test -a5
sort . sort == sort: [OK, passed 5 tests.]
sort == id: [OK, passed 5 tests.]
Properties Total
Passed 2 2
Failed 0 0
Total 2 2
Since LeanCheck is enumerative, you may want to increase the default number of tests (100). Arbitrary rule of thumb:
- between 200 to 500 on a developer machine;
- between 1000 and 5000 on the CI.
Your mileage may vary.