hspec-junit-formatter-1.1.0.2: A JUnit XML runner/formatter for hspec
Safe HaskellNone
LanguageHaskell2010

Test.Hspec.JUnit

Synopsis

Runners

hspecJUnit :: Spec -> IO () Source #

Like hspec but adds JUNit functionality

To actually use the JUnit format, you must set JUNIT_ENABLED=1 in the environment; by default, this function just behaves like hspec.

(If using hspec >= 2.9, running tests with --test-arguments="-f junit" also works.)

All configuration of the JUnit report occurs through environment variables.

See Test.Hspec.JUnit.Config and Test.Hspec.JUnit.Config.Env.

hspecJUnitWith :: Config -> Spec -> IO () Source #

hspecJUnit but built on a non-default Config

Directly modifying Config

configWithJUnitAvailable :: JUnitConfig -> Config -> Config Source #

Modify an Hspec Config to have the junitFormat available

Adds junit to the list of available options for -f, --format.

NOTE: This only works with hspec >= 2.9, otherwise it is a no-op.

Actual format function

junitFormat :: JUnitConfig -> FormatConfig -> IO Format Source #

Hspec configFormat that generates a JUnit report

Configuration