HUnit-Plus-2.0.0: A test framework building on HUnit.

Safe HaskellNone
LanguageHaskell2010

Test.HUnitPlus.XML

Contents

Description

Reporter for running HUnit tests and reporting results as JUnit-style XML reports. This uses the hexpat library for XML generation. This module also contains functions for creating the various nodes in a JUnit XML report.

Synopsis

XML Generation

propertyElem Source #

Arguments

:: (Text, Text)

The name/value pair

-> Node Text Text 

Generate an element for a property definition

propertiesElem Source #

Arguments

:: [(Text, Text)]

A list of name/value pairs to make into properties

-> Node Text Text 

Generate an element for a set of property definitions

systemOutElem Source #

Arguments

:: Text

The stdout output

-> Node Text Text 

Generate an element representing output to stdout

systemErrElem Source #

Arguments

:: Text

The stderr output

-> Node Text Text 

Generate an element representing output to stderr

failureElem Source #

Arguments

:: Text

A message associated with the failure

-> Node Text Text 

Generate an element representing a test failure.

errorElem Source #

Arguments

:: Text

A message associated with the error

-> Node Text Text 

Generate an element representing an error in a test.

testcaseElem Source #

Arguments

:: Text

The name of the test

-> Text

The path to the test (reported as "classname")

-> Word

The number of assertions in the test

-> Double

The execution time of the test

-> [Node Text Text]

Elements representing the events that happened during test execution.

-> Node Text Text 

Generate an element for a single test case.

skippedTestElem Source #

Arguments

:: Text

The name of the test

-> Text

The path of the test

-> Node Text Text 

Generate an element for a skipped test case

testSuiteElem Source #

Arguments

:: Text

The name of the test suite

-> HashMap Text Text

The properties defined for this suite

-> Word

The number of tests

-> Word

The number of failures

-> Word

The number of errors

-> Word

The number of skipped tests

-> Text

The hostname of the machine on which this was run

-> UTCTime

The timestamp at which time this was run

-> Double

The execution time for the test suite

-> [Node Text Text]

The testcases and output nodes for the test suite

-> Node Text Text 

Generate an element for a test suite run

testSuitesElem Source #

Arguments

:: Double

The execution time of all suites

-> [Node Text Text]

Elements representing all the test suites

-> Node Text Text 

Generate the top-level element containing all test suites

Reporter

xmlReporter :: Reporter [[Node Text Text]] Source #

A reporter that generates JUnit XML reports