All the options controlling a test run.
Modulesandwich-0.3.1.0Haskell2010
Test.Sandwich.Options
- 5 types
- 1 class
- 12 values
- Packagesandwich-0.3.1.0
- Exports18
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceRunTree.hs
A reasonable default set of options.
Artifacts
3 declarationsWhere to save test artifacts (logs, screenshots, failure reports, etc.).
Control whether test artifacts are stored to a directory.
Constructors
TestArtifactsNoneDo not create a test artifacts directory.
TestArtifactsFixedDirectoryUse the test artifacts directory at the given path, creating it if necessary.
TestArtifactsGeneratedDirectoryrunsRoot :: FilePathThe root folder under which test run directories will be created.
getTestRunDirectoryName :: IO FilePathAction to generate the new directory name.
Generate a test artifacts directory based on a timestamp.
Replace the colons with underscores, which makes this more safe for various systems including Windows and GitHub Actions.
Logging
4 declarationsMinimum test log level to save (has no effect if optionsTestArtifactsDirectory is TestArtifactsNone).
Test log level to store in memory while tests are running. (These logs are presented in formatters, etc.).
Formatter function for log entries.
A callback for formatting a log entry to a ByteString.
Formatting
3 declarationsWhich formatters to use to output the results of the tests.
An existential wrapper around Formatters
Constructors
forall f. (Formatter f, Show f, Typeable f) => SomeFormatter f
Instances1Show
Show SomeFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Types.RunTree
Methods
formatterName :: f -> StringName of the formatter
runFormatter :: (MonadLoggerIO m, MonadUnliftIO m, MonadCatch m) => f -> [RunNode BaseContext] -> Maybe (CommandLineOptions ()) -> BaseContext -> m ()The main function, executed while the test tree is running
finalizeFormatter :: (MonadIO m, MonadLogger m, MonadCatch m) => f -> [RunNode BaseContext] -> BaseContext -> m ()Called after the test tree is completed, can be used to print final results
Instances7Formatter, …
Formatter FailureReportFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.FailureReportFormatter LogSaverFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.LogSaverFormatter MarkdownSummaryFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.MarkdownSummaryFormatter PrintFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.Print · orphanFormatter SilentFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.SilentFormatter SocketFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.SocketFormatter TerminalUIFormatterDefined in sandwich-0.3.1.0 · Test.Sandwich.Formatters.TerminalUI · orphan
Filtering
3 declarationsFilter to apply to the text tree before running that only retains the matched tests.
Filter to apply to the text tree before running that prunes out the matched tests and their subtrees.
Constructors
Timing
1 declarationWhether to enable the test timer. When the test timer is present, timing information will be emitted to the project root (if present).
Dry run
1 declarationWhether to skip actually launching the tests. This is useful if you want to see the set of the tests that would be run, or start them manually in the terminal UI.
Misc
1 declarationAn optional absolute path to the root of the project being tested (i.e. the folder where the cabal file is found). This is useful to provide when the current working directory does not match the project root, for example in multi-project Stack setups. We use this hint to connect CallStack paths (which are relative to the project root) to their actual path on disk.