MIT licensed by Freckle R&D
This version can be pinned in stack with:hspec-junit-formatter-1.1.0.2@sha256:9c30765a224e00d44686e47372f77415e54433823588a4a9637163c2750a1f5f,3825

Module documentation for 1.1.0.2

hspec-junit-formatter

A JUnit XML runner/formatter for hspec.

Usage

import Test.Hspec
import Test.Hspec.JUnit
import System.Environment (setEnv)

main :: IO ()
main = do
  -- Most likely done in your CI setup
  setEnv "JUNIT_ENABLED" "1"
  setEnv "JUNIT_OUTPUT_DIRECTORY" "/tmp"
  setEnv "JUNIT_SUITE_NAME" "my-tests"

  hspecJUnit spec

spec :: Spec
spec = describe "Addition" $ do
  it "adds" $ do
    2 + 2 `shouldBe` (4 :: Int)

LICENSE

Changes

Unreleased

None

v1.1.0.2

  • Support GHCs 9.0 and 9.2

v1.1.0.1

  • Release with looser lower-bounds
  • CI against older GHCs

v1.1.0.0

  • Remove incorrectly-cased Test.HSpec modules

v1.0.3.0

  • Add hspecJUnit and environment-variable configuration
  • Fix file attribute not respecting source-path-prefix

v1.0.2.2

  • Add file and line attributes in testcase nodes

v1.0.2.1

  • Support for prefixing reported source paths (e.g. if in a monorepo)
  • Ensure tests pass within unpacked release tarball

v1.0.2.0

  • Create Test.Hspec module-space and deprecate misspelled Test.HSpec modules
  • Introduce configWithJUnit and JUnitConfig

v1.0.1.0

  • Format function can be used directly without withConfig or runJUnitSpec.
  • Test case duration is now supported.
  • Failure locations are listed for some result types.
  • Timestamps in the resulting XML now display the start time of formatting.

v1.0.0.4

  • Bring base bound back in to fix release

v1.0.0.3

  • Remove dependencies upper bounds

v1.0.0.2

  • Less restrictive upper bound on base

v1.0.0.1

  • Bump base dep

v1.0.0.0

Initial release.