I build the initial codebase for my Haskell project with cabal init
I have several tests written with Hspec.
On cabal test
it compiles and runs these tests like expected and gives a message for failing/passing.
Now I included a quickCheck test and even when this test fails the output in terminal don't recognize the quickCheck test.
But in the dist/test/ dir i can see the test log *** Failed! ...
Is there a way to "include" quickCheck tests in the test workflow. So that i don't have to look on the test log after every test run.
import Test.Hspec
import Test.QuickCheck
spec :: Spec
spec = do
describe "myTest" $ do
it "Something something" $ do
myTest "" `shouldBe` False
quickCheckWith stdArgs { maxSuccess = 1000 } prop_myTest -- <== ?
You want the property function, see here.
Example:
spec :: Spec
spec = do
describe "myTest" $ do
it "Something something" $
property prop_myTest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With