| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Tasty.Runners.Reporter
Contents
Description
An ingredient for tasty that prints a summary and outputs junit xml that works with jenkins.
Usage:
import Test.Tasty
import Test.Tasty.HUnit
import qualified Test.Tasty.Runners.Reporter as Reporter
main = defaultMainWithIngredients [Reporter.ingredient] tests
tests :: TestTree
Example output:
λ cabal test --test-show-details=always
...
Test suite spec: RUNNING...
↓ Unit tests
✗ List comparison (smaller length)
test/Main.hs:19:
expected: LT
but got: GT
↓ Unit tests
↓ sub group
✗ foo
Test threw an exception
user error (asdf)
TEST RUN FAILED
^^^^^^^^^^^^^^^
Duration: 0.000s
Passed: 1
Failed: 2
Synopsis
Documentation
ingredient :: Ingredient Source #
Ingredient for defaultMainWithIngredients
Runs all tests and outputs a summary as well as the failing tests.
Optionally takes `--xml=report.xml` and outputs junit xml.
Support for skipping tests (example usage coming soon)
data SkippingTests Source #
Types for skipping tests. (example coming soon)
Constructors
| TestSkipped | |
| TestOnly OnlyTestResult |
Instances
| Show SkippingTests Source # | |
Defined in Test.Tasty.Runners.Reporter Methods showsPrec :: Int -> SkippingTests -> ShowS # show :: SkippingTests -> String # showList :: [SkippingTests] -> ShowS # | |
| Exception SkippingTests Source # | |
Defined in Test.Tasty.Runners.Reporter Methods toException :: SkippingTests -> SomeException # fromException :: SomeException -> Maybe SkippingTests # displayException :: SkippingTests -> String # | |
Support for running only one test (example usage coming soon)
data OnlyTestResult Source #
Types for running only one test. (example coming soon)
Constructors
| OnlyTestPassed String | |
| OnlyTestFailed String |
Instances
| Show OnlyTestResult Source # | |
Defined in Test.Tasty.Runners.Reporter Methods showsPrec :: Int -> OnlyTestResult -> ShowS # show :: OnlyTestResult -> String # showList :: [OnlyTestResult] -> ShowS # | |