HUnit-Plus-0.3.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

:: (String, String)

The name/value pair

-> Node String String 

Generate an element for a property definition

propertiesElem Source

Arguments

:: [(String, String)]

A list of name/value pairs to make into properties

-> Node String String 

Generate an element for a set of property definitions

systemOutElem Source

Arguments

:: String

The stdout output

-> Node String String 

Generate an element representing output to stdout

systemErrElem Source

Arguments

:: String

The stderr output

-> Node String String 

Generate an element representing output to stderr

failureElem Source

Arguments

:: String

A message associated with the failure

-> Node String String 

Generate an element representing a test failure.

errorElem Source

Arguments

:: String

A message associated with the error

-> Node String String 

Generate an element representing an error in a test.

testcaseElem Source

Arguments

:: String

The name of the test

-> String

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

-> Word

The number of assertions in the test

-> Double

The execution time of the test

-> [Node String String]

Elements representing the events that happened during test execution.

-> Node String String 

Generate an element for a single test case.

skippedTestElem Source

Arguments

:: String

The name of the test

-> String

The path of the test

-> Node String String 

Generate an element for a skipped test case

testSuiteElem Source

Arguments

:: String

The name of the test suite

-> Map String String

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

-> String

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 String String]

The testcases and output nodes for the test suite

-> Node String String 

Generate an element for a test suite run

testSuitesElem Source

Arguments

:: Double

The execution time of all suites

-> [Node String String]

Elements representing all the test suites

-> Node String String 

Generate the top-level element containing all test suites

Reporter

xmlReporter :: Reporter [[Node String String]] Source

A reporter that generates JUnit XML reports