| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Test.Sandwich.Formatters.Slack
Contents
Description
The Slack formatter shows live-updating test progress and failures by sending messages to a Slack channel.
Documentation can be found here.
Synopsis
- defaultSlackFormatter :: SlackFormatter
 - data SlackFormatter
 - slackFormatterSlackConfig :: SlackFormatter -> SlackConfig
 - slackFormatterChannel :: SlackFormatter -> String
 - slackFormatterTopMessage :: SlackFormatter -> Maybe String
 - slackFormatterMaxFailures :: SlackFormatter -> Maybe Int
 - slackFormatterMaxFailureReasonLines :: SlackFormatter -> Maybe Int
 - slackFormatterMaxCallStackLines :: SlackFormatter -> Maybe Int
 - slackFormatterVisibilityThreshold :: SlackFormatter -> Maybe Int
 - slackFormatterMaxMessageSize :: SlackFormatter -> Maybe Int64
 - newtype SlackConfig = SlackConfig {}
 - data SlackFormatterShowCallStacks
 
Documentation
data SlackFormatter Source #
Instances
| Show SlackFormatter Source # | |
Defined in Test.Sandwich.Formatters.Slack Methods showsPrec :: Int -> SlackFormatter -> ShowS # show :: SlackFormatter -> String # showList :: [SlackFormatter] -> ShowS #  | |
| Formatter SlackFormatter Source # | |
Defined in Test.Sandwich.Formatters.Slack Methods formatterName :: SlackFormatter -> String # runFormatter :: (MonadLoggerIO m, MonadUnliftIO m, MonadCatch m) => SlackFormatter -> [RunNode BaseContext] -> Maybe (CommandLineOptions ()) -> BaseContext -> m () # finalizeFormatter :: (MonadIO m, MonadLogger m, MonadCatch m) => SlackFormatter -> [RunNode BaseContext] -> BaseContext -> m () #  | |
Options
slackFormatterSlackConfig :: SlackFormatter -> SlackConfig Source #
Slack credentials
slackFormatterChannel :: SlackFormatter -> String Source #
Slack channel on which to create the progress bar.
slackFormatterTopMessage :: SlackFormatter -> Maybe String Source #
Message to put above the progress bar. For example, the name of the test suite and a link to the run in the CI system.
slackFormatterMaxFailures :: SlackFormatter -> Maybe Int Source #
Maximum number of failures to include in a message. If too many are included, it's possible to hit Slack's request limit of 8KB, which causes the message to fail to update. Defaults to 30.
slackFormatterMaxFailureReasonLines :: SlackFormatter -> Maybe Int Source #
Maximum number of lines to devote to showing the failure reason underneath a failure. Set to 'Just 0' to disable showing failure reasons.
slackFormatterMaxCallStackLines :: SlackFormatter -> Maybe Int Source #
Maximum number of lines to devote to showing the call stack underneath a failure. Set to 'Just 0' to disable showing call stacks.
slackFormatterVisibilityThreshold :: SlackFormatter -> Maybe Int Source #
If present, filter the headings on failures to only include nodes whose visibility threshold is less than or equal to the value.
slackFormatterMaxMessageSize :: SlackFormatter -> Maybe Int64 Source #
If present, make sure the messages we transmit to Slack default don't exceed this number
 of bytes. When a message does exceed it (probably because there are a ton of failures),
 start dropping blocks from the end of the message until the size is small enough.
 Making use of slackFormatterMaxFailures, slackFormatterMaxFailureReasonLines, and
 slackFormatterMaxCallStackLines is a good way to avoid hitting the limit.
Auxiliary types
newtype SlackConfig Source #
Configuration options needed to connect to the Slack API
Constructors
| SlackConfig | |
Fields 
  | |
Instances
| Show SlackConfig Source # | |
Defined in Test.Sandwich.Formatters.Slack.Internal.Types Methods showsPrec :: Int -> SlackConfig -> ShowS # show :: SlackConfig -> String # showList :: [SlackConfig] -> ShowS #  | |
data SlackFormatterShowCallStacks Source #
Constructors
| SlackFormatterNoCallStacks | Don't include callstacks in failure messages  | 
| SlackFormatterTopNCallStackFrames Int | Include the top N stack frames  | 
| SlackFormatterFullCallStack | Include the full callstack  |