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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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, 1.1.0.0, 1.1.0.1, 1.1.0.2
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-11-29T14:10:38Z
Distributions LTSHaskell:1.1.0.2, Stackage:1.1.0.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2667 total (45 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-11-29 [all 1 reports]

Readme for hspec-junit-formatter-1.0.2.1

[back to package description]

hspec-junit-formatter

A JUnit XML runner/formatter for hspec.

Usage

import Test.Hspec
import Test.Hspec.Core.Runner (defaultConfig, hspecWith)
import Test.Hspec.JUnit

main :: IO ()
main = do
  let
    junitConfig = setJUnitConfigOutputDirectory "/tmp" $ defaultJUnitConfig "my-tests"
    hspecConfig = configWithJUnit junitConfig defaultConfig

  hspecWith hspecConfig spec

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

LICENSE