A test suite is a collection of automated tests executed together to evaluate a program or component. In a Stack project, test code lives under test, commonly starting with Spec.hs, and runs with stack test. section 9.5.3
A practical Haskell test suite connects several pieces:
- Define properties with names beginning with prop_, allowing QuickCheck's quickCheckAll to discover and run them. section 9.5.3
- Group properties into modules such as SuiteOne and SuiteTwo, each exporting a runTests action that returns whether its tests succeeded. section 9.5.3
- Combine suite results in Main and return exitSuccess only when every suite succeeds; otherwise return exitFailure. section 9.5.3
- Customize generated tests with QuickCheck controls such as withMaxSuccess, noShrinking, and cover. section 9.5.3
A failing property makes Stack fail
Suppose one suite contains prop_true, which passes, and prop_false, which always returns False. Running stack test reports the successful properties, identifies the falsifying case for prop_false, and ends with Test suite failure and ExitFailure 1.










