Page
Library
Module
Module type
Parameter
Class
Class type
Source
Junit_xml
SourceLow level interface to build XML elements.
This module defines basic data types for data, attributes and element occuring in JUnit reports.
It is based on the XSD provided in JUnit-schema git repository.
Those are low level functions. Values like id
, failures
or tests
will not be checked.
It allows you to build a report by hand if the facilities that are offered by Junit
do not suit your needs.
This part defines the categories of elements and attributes.
https://www.w3.org/TR/xmlschema-2/#token
Definition:
token represents tokenized strings. The ·value space· of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The ·lexical space· of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces. The ·base type· of token is normalizedString.
Properties (e.g., environment settings) set during test execution.
Builds an XML element from a property.
Indicates that the test errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. Contains as a text node relevant data for the error, e.g., a stack trace.
error ?message ~typ description
creates an error element.
Builds an XML element from a error.
Indicates that the test failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals. Contains as a text node relevant data for the failure, e.g., a stack trace.
failure ?message ~typ description
creates a failure element.
Builds an XML element from a failure.
Builds an XML element from a result.
Creates a testcase.
Builds an XML element from a testcase.
Contains the results of executing a testsuite.
val testsuite :
?system_out:string ->
?system_err:string ->
package:token ->
id:int ->
name:token ->
timestamp:timestamp ->
hostname:token ->
tests:int ->
failures:int ->
errors:int ->
time:float ->
properties ->
testcases ->
testsuite
Creates a testsuite.
Attributes
Elements
Builds an XML element from a testsuite.
Builds an XML element from a list of testsuites.