Popularity
7.5
Stable
Activity
0.0
Stable
4
10
7
Monthly Downloads: 3
Programming language: Haskell
License: MIT License
hspec-jenkins alternatives and similar packages
Based on the "hspec" category.
Alternatively, view hspec-jenkins alternatives based on common mentions on social networks and blogs.
-
hspec-expectations-json
Hspec expectations on JSON Values -
hspec-golden-aeson
Use tests to monitor changes in Aeson serialization -
hspec-attoparsec
utility functions for testing attoparsec parsers with hspec -
hspec-megaparsec
Utility functions for testing Megaparsec parsers with Hspec -
hspec-test-framework
Run test-framework tests with Hspec -
hspec-hedgehog
Hedgehog support for the Hspec testing framework -
hspec-expectations-match
An hspec expectation that asserts a value matches a pattern -
hspec-expectations-pretty-diff
Catchy combinators for HUnit +++ colored pretty-printed diffs -
hspec-leancheck
LeanCheck support for the Hspec test framework. -
hspec-multicheck
A testing framework for Haskell using Hspec
Clean code begins in your IDE with SonarLint
Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of hspec-jenkins or a related project?
README
hspec-jenkins
Hspec で JUnit っぽい XML を出力する
.cabal の設定
test-suite の build-depends に hspec-jenkins を追加する。
Hspec の設定
Hspec にはフォーマット方法をカスタマイズする方法が用意されている。 通常、
main = hspec spec
とするところを、
import Test.Hspec.Formatters.Jenkins (xmlFormatter)
main = do
summary <- withFile "results.xml" WriteMode $ \h -> do
let c = defaultConfig
{ configFormatter = xmlFormatter
, configHandle = h
}
hspecWith c spec
unless (summaryFailures summary == 0) $
exitFailure
のように変更する。ここでしていることは
- 出力先を results.xml へ設定
- フォーマッタとして
xmlFormatter
を指定 - 失敗したテストが1つでもあったら非0で exit (
hspec
だと勝手にこの挙動になる)
xmlFormatter
実装としては、 blaze-markup を使って JUnit っぽい XML を出力している。
微妙な点
- 各 testcase 毎に classname, name という2つの属性を設定できるが、今は Path を元に適当にドットで結合したものを設定している
- 実行時間の情報が欠落している
- Hspec のフォーマッタの仕様上、これを XML に含めるのは難しい
- pending (skip) したときのメッセージが Jenkins 上には表示されない
- これは Jenkins の問題
利用例
[example](example) にある。