Library
Module
Module type
Parameter
Class
Class type
Low 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.
type properties = property list
Properties (e.g., environment settings) set during test execution.
val property_to_xml : property -> Tyxml.Xml.elt
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.
val error : ?message:string -> typ:string -> string -> error
error ?message ~typ description
creates an error element.
val error_to_xml : error -> Tyxml.Xml.elt
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.
val failure : ?message:string -> typ:string -> string -> failure
failure ?message ~typ description
creates a failure element.
val failure_to_xml : failure -> Tyxml.Xml.elt
Builds an XML element from a failure.
val result_to_xml : result -> Tyxml.Xml.elt
Builds an XML element from a result.
type testcases = testcase list
val testcase_to_xml : testcase -> Tyxml.Xml.elt
Builds an XML element from a testcase.
type testsuites = testsuite list
Contains an aggregation of testsuite results.
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
val testsuite_to_xml : testsuite -> Tyxml.Xml.elt
Builds an XML element from a testsuite.
val to_xml : testsuites -> Tyxml.Xml.elt
Builds an XML element from a list of testsuites.