hspec-junit-formatter: A JUnit XML runner/formatter for hspec

[ library, mit, testing ] [ Propose Tags ]

Allows hspec tests to write JUnit XML output for parsing in various tools.


[Skip to Readme]
Versions [RSS] [faq] 1.0.0.0, 1.0.0.1, 1.0.0.2, 1.0.0.4, 1.0.0.5, 1.0.1.0, 1.0.2.0, 1.0.2.1, 1.0.2.2, 1.0.3.0
Change log CHANGELOG.md
Dependencies base (>=4.14.1.0 && <5), conduit (>=1.3.4.1), containers (>=0.6.2.1), directory (>=1.3.6.0), exceptions (>=0.10.4), filepath (>=1.4.2.1), hspec-core (>=2.8.1), text (>=1.2.4.1), time (>=1.9.3), xml-conduit (>=1.9.1.1), xml-types (>=0.3.8) [details]
License MIT
Copyright 2021 Renaissance Learning Inc
Author Freckle R&D
Maintainer engineering@freckle.com
Category Testing
Home page https://github.com/freckle/hspec-junit-formatter#readme
Bug tracker https://github.com/freckle/hspec-junit-formatter/issues
Source repo head: git clone https://github.com/freckle/hspec-junit-formatter
Uploaded by PatrickBrisbin at 2021-12-02T14:39:10Z
Distributions LTSHaskell:1.0.0.5, NixOS:1.0.0.5, Stackage:1.0.3.0
Downloads 1207 total (503 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-12-02 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for hspec-junit-formatter-1.0.3.0

[back to package description]

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