package junit
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8fee257ee4045aaf33f2293fcdf039a615aabfc926fad184cea1bfeb771b8533
sha512=546b155c65e6cbe4141c29cd95da68903c8845703bd81b12dd8ceaeb5c91d19137ca8202848d0b5cdfc3090694266c3a1815669c85b4d3d980c6122411136da3
doc/junit/Junit_xml/index.html
Module Junit_xmlSource
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.
Categories of elements and attributes
This part defines the categories of elements and attributes.
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.
Elements
Properties
Properties (e.g., environment settings) set during test execution.
Builds an XML element from a property.
Testcases
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.
Testsuites
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 ->
skipped:int ->
time:float ->
properties ->
testcases ->
testsuiteCreates a testsuite.
Attributes
Elements
Builds an XML element from a testsuite.
Builds an XML element from a list of testsuites.