@hackage tasty-jenkins-xml0.1.0.0

Render tasty output to XML for Jenkins (ingredient transformer)

tasty-jenkins-xml

Haskell Programming Language BSD3 License

Hackage Hackage Dependencies Build

Description

An ingredient transformer version of tasty-ant-xml.

This package implements a tasty ingredient transformer that makes it possible to output test results as JUnit XML in addition to other output ingredient, e.g. a consoleTestReporter. Internally it invokes the tasty-ant-xml ingredient.

To be practically useful, it implements two additions:

  • --jxml alias for --xml for test-framework compatibility,

  • --exit-success to distinguish between failed and unstable builds in Jenkins CI.

Usage

Example:

import Test.Tasty
import Test.Tasty.Runners.JenkinsXML (jenkinsXMLTransformer)

main :: IO ()
main = defaultMainWithIngredients ingredients tests
  where
    ingredients = [listingTests, jenkinsXMLTransformer [consoleTestReporter]]

Alternatively jenkinsXMLTransformer may be applied directly to defaultIngredients.

For comparison, here's a main that uses tasty-ant-xml instead (and can't output to console and XML at the same time):

import Test.Tasty
import Test.Tasty.Runners.AntXML (antXMLRunner)

main :: IO ()
main = defaultMainWithIngredients ingredients tests
  where
    ingredients = [listingTests, antXMLRunner, consoleTestReporter]

Contributing

Contributions are welcome! Documentation, examples, code, and feedback - they all help.

License

The BSD 3-Clause License, see LICENSE file for details.