Constructors
TDeftestDefVal :: valuetestDefCallStack :: CallStack
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11
Modulesydtest-0.33.0.0Haskell2010
This module defines all the functions you will use to define your test suite.
TDeftestDefVal :: valuetestDefCallStack :: CallStackA tree of tests
This type has three parameters:
outers: A type-level list of the outer resources. These are resources that are prived once, around a group of tests. (This is the type of the results of aroundAll.)
inner: The inner resource. This is a resource that is set up around every test, and even every example of a property test. (This is the type of the result of around.)
result: The result (TestDefM is a monad.)
In practice, all of these three parameters should be () at the top level.
When you're just using sydtest and not writing a library for sydtest, you probably don't even want to concern yourself with this type.
DefSpecifyNode :: Text -> TDef (ProgressReporter -> ((HList outers -> inner -> IO ()) -> IO ()) -> IO TestRunResult) -> extra -> SpecDefTree outers inner extraDefine a test
DefPendingNode :: Text -> Maybe Text -> SpecDefTree outers inner extraDefine a pending test
DefDescribeNode :: Text -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraGroup tests using a description
DefSetupNode :: IO () -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraDefBeforeAllNode :: IO outer -> SpecDefForest (outer ': otherOuters) inner extra -> SpecDefTree outers inner extraDefBeforeAllWithNode :: (oldOuter -> IO newOuter) -> SpecDefForest (newOuter ': oldOuter ': otherOuters) inner extra -> SpecDefTree (oldOuter ': otherOuters) inner extraDefWrapNode :: (IO () -> IO ()) -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraDefAroundAllNode :: ((outer -> IO ()) -> IO ()) -> SpecDefForest (outer ': otherOuters) inner extra -> SpecDefTree outers inner extraDefAroundAllWithNode :: ((newOuter -> IO ()) -> HList (oldOuter ': otherOuters) -> IO ()) -> SpecDefForest (newOuter ': oldOuter ': otherOuters) inner extra -> SpecDefTree (oldOuter ': otherOuters) inner extraDefAfterAllNode :: (HList outers -> IO ()) -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraDefParallelismNode :: Parallelism -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraControl the level of parallelism for a given group of tests
DefRandomisationNode :: ExecutionOrderRandomisation -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraControl the execution order randomisation for a given group of tests
DefTimeoutNode :: (Timeout -> Timeout) -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraDefRetriesNode :: (Word -> Word) -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraDefFlakinessNode :: FlakinessMode -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraDefExpectationNode :: ExpectationMode -> SpecDefForest outers inner extra -> SpecDefTree outers inner extraFunctor (SpecDefTree a c)Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefFoldable (SpecDefTree a c)Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefTraversable (SpecDefTree a c)Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefMonadWriter (TestForest outers inner) (TestDefM outers inner)Defined in sydtest-0.33.0.0 · Test.Syd.Def.TestDefMParallelAs many at once as there are threads to run them.
ParallelWith !WordAt most this many at once, however many threads there are.
For tests that contend for something the test suite does not own, like one database server behind a database per test. Running fewer of those at once can be faster than running all of them, and is the smaller instrument where Sequential would do.
SequentialOne at a time.
Eq ParallelismDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefShow ParallelismDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefGeneric ParallelismDefined in sydtest-0.33.0.0 · Test.Syd.SpecDeftype Rep Parallelism = D1 ('MetaData "Parallelism"
"Test.Syd.SpecDef"
"sydtest-0.33.0.0-A4vYtVtkQp2DQjwds8Zw3v"
'False) (C1 ('MetaCons "Parallel"
'PrefixI 'False) U1 :+: (C1 ('MetaCons "ParallelWith"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word)) :+: C1 ('MetaCons "Sequential"
'PrefixI 'False) U1))Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefEq ExecutionOrderRandomisationDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefShow ExecutionOrderRandomisationDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefGeneric ExecutionOrderRandomisationDefined in sydtest-0.33.0.0 · Test.Syd.SpecDeftype Rep ExecutionOrderRandomisation = D1 ('MetaData "ExecutionOrderRandomisation"
"Test.Syd.SpecDef"
"sydtest-0.33.0.0-A4vYtVtkQp2DQjwds8Zw3v"
'False) (C1 ('MetaCons "RandomiseExecutionOrder"
'PrefixI 'False) U1 :+: C1 ('MetaCons "DoNotRandomiseExecutionOrder"
'PrefixI 'False) U1)Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefEq FlakinessModeDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefShow FlakinessModeDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefGeneric FlakinessModeDefined in sydtest-0.33.0.0 · Test.Syd.SpecDeftype Rep FlakinessMode = D1 ('MetaData "FlakinessMode"
"Test.Syd.SpecDef"
"sydtest-0.33.0.0-A4vYtVtkQp2DQjwds8Zw3v"
'False) (C1 ('MetaCons "MayNotBeFlaky"
'PrefixI 'False) U1 :+: C1 ('MetaCons "MayBeFlaky"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe String))))Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefEq ExpectationModeDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefShow ExpectationModeDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefGeneric ExpectationModeDefined in sydtest-0.33.0.0 · Test.Syd.SpecDeftype Rep ExpectationMode = D1 ('MetaData "ExpectationMode"
"Test.Syd.SpecDef"
"sydtest-0.33.0.0-A4vYtVtkQp2DQjwds8Zw3v"
'False) (C1 ('MetaCons "ExpectPassing"
'PrefixI 'False) U1 :+: C1 ('MetaCons "ExpectFailing"
'PrefixI 'False) U1)Defined in sydtest-0.33.0.0 · Test.Syd.SpecDefEq TestSuiteStatsDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefShow TestSuiteStatsDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefSemigroup TestSuiteStatsDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefMonoid TestSuiteStatsDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefTestRunReporttestRunReportExpectationMode :: !ExpectationModetestRunReportRawResults :: !NonEmpty TestRunResultRaw results, including retries, in order
testRunReportFlakinessMode :: !FlakinessModeShow TestRunReportDefined in sydtest-0.33.0.0 · Test.Syd.SpecDefGeneric TestRunReportDefined in sydtest-0.33.0.0 · Test.Syd.SpecDeftype Rep TestRunReport = D1 ('MetaData "TestRunReport"
"Test.Syd.SpecDef"
"sydtest-0.33.0.0-A4vYtVtkQp2DQjwds8Zw3v"
'False) (C1 ('MetaCons "TestRunReport"
'PrefixI 'True) (S1 ('MetaSel ('Just "testRunReportExpectationMode"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExpectationMode) :*: (S1 ('MetaSel ('Just "testRunReportRawResults"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty TestRunResult)) :*: S1 ('MetaSel ('Just "testRunReportFlakinessMode"
) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FlakinessMode))))Defined in sydtest-0.33.0.0 · Test.Syd.SpecDef