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

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.11.1.0 && <5), conduit (>=1.3.1), containers (>=0.5.11.0), directory (>=1.3.1.5), exceptions (>=0.10.0), filepath (>=1.4.2), hspec-core (>=2.8.1), iso8601-time (>=0.1.5), text (>=1.2.3.1), time (>=1.8.0.2), xml-conduit (>=1.8.0.1), xml-types (>=0.3.6) [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 2022-03-30T19:37:51Z
Distributions LTSHaskell:1.0.3.0, NixOS:1.0.3.0, Stackage:1.1.0.2
Downloads 1692 total (63 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-03-30 [all 1 reports]

Readme for hspec-junit-formatter-1.1.0.2

[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