hspec-junit-formatter-1.1.2.1: A JUnit XML runner/formatter for hspec
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Hspec.JUnit.Config

Synopsis

Documentation

Construction

defaultJUnitConfig :: Text -> JUnitConfig Source #

Construct a JUnitConfig given a suite name

See individual set functions for defaults.

setJUnitConfigOutputDirectory :: FilePath -> JUnitConfig -> JUnitConfig Source #

Set the directory within which to generate the report

Default is current working directory.

setJUnitConfigOutputName :: FilePath -> JUnitConfig -> JUnitConfig Source #

Set the name for the generated report

Default is junit.xml.

setJUnitConfigOutputFile :: FilePath -> JUnitConfig -> JUnitConfig Source #

Set the full path to the generated report

If given, the directory and name configurations are ignored.

setJUnitConfigSourcePathPrefix :: FilePath -> JUnitConfig -> JUnitConfig Source #

Set a prefix to apply to source paths in the report

Default is none. This can be required if you run specs from a sub-directory in a monorepository, and you need reported paths to be from the repository root.

setJUnitConfigDropConsoleFormatting :: Bool -> JUnitConfig -> JUnitConfig Source #

Set whether console formatting characters should be dropped from failure reports.

Default is False. Most XML processors will fail to parse the XML if it contains the ANSI control characters used by console formatting.

Use

getJUnitConfigOutputFile :: JUnitConfig -> FilePath Source #

Retrieve the full path to the generated report

getJUnitConfigSuiteName :: JUnitConfig -> Text Source #

Retrieve the suite name given on construction

getJUnitPrefixSourcePath :: JUnitConfig -> FilePath -> FilePath Source #

Retrieve the function to apply to reported source paths

Will be id if no prefix configured.

getJUnitConfigDropConsoleFormatting :: JUnitConfig -> Bool Source #

Retrieve whether console formatting characters should be dropped from failure reports.