| Safe Haskell | None |
|---|
Test.Hspec.Formatters.Jenkins
Description
This module provides xmlFormatter that can be used with hspecWith.
Example usage:
import Test.Hspec.Formatters.Jenkins (xmlFormatter)
import Test.Hspec.Runner
main :: IO ()
main = do
summary <- withFile "results.xml" WriteMode $ \h -> do
let c = defaultConfig
{ configFormatter = xmlFormatter
, configHandle = h
}
hspecWith c spec
unless (summaryFailures summary == 0) $
exitFailure
An example project is located in example directory.
Documentation
xmlFormatter :: FormatterSource
Format Hspec result to Jenkins-friendly XML.