hspec-jenkins-0.1.1: Jenkins-friendly XML formatter for Hspec

Safe HaskellNone

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.

Synopsis

Documentation

xmlFormatter :: FormatterSource

Format Hspec result to Jenkins-friendly XML.