Junit_xmlLow 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.
val timestamp : Ptime.t -> timestamptype properties = property listProperties (e.g., environment settings) set during test execution.
val property_to_xml : property -> Tyxml.Xml.eltBuilds 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 -> errorerror ?message ~typ description creates an error element.
val error_to_xml : error -> Tyxml.Xml.eltBuilds 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 -> failurefailure ?message ~typ description creates a failure element.
val failure_to_xml : failure -> Tyxml.Xml.eltBuilds an XML element from a failure.
val result_to_xml : result -> Tyxml.Xml.eltBuilds an XML element from a result.
type testcases = testcase listval testcase_to_xml : testcase -> Tyxml.Xml.eltBuilds an XML element from a testcase.
type testsuites = testsuite listContains 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 ->
skipped:int ->
time:float ->
properties ->
testcases ->
testsuiteCreates a testsuite.
Attributes
val testsuite_to_xml : testsuite -> Tyxml.Xml.eltBuilds an XML element from a testsuite.
val to_xml : testsuites -> Tyxml.Xml.eltBuilds an XML element from a list of testsuites.