launch_testing.junitxml module

launch_testing.junitxml.unittestCaseToXml(test_result, test_case)

Serialize a unittest.TestCase into an XML element.

<testcase name=”test_1” time=”1.05”/>

Note - an ordinary unittest.TestResult does not record time information. The TestResult class needs to be a launch_testing.TestResult class

launch_testing.junitxml.unittestResultToXml(name, test_result)

Serialize a single unittest.TestResult to an XML element.

<testsuite name=”str” tests=”#” failures=”#” errors=”#”>

</testsuite>

launch_testing.junitxml.unittestResultsToXml(*, name='launch_test', test_results={})

Serialize multiple unittest.TestResult objects into an XML document.

A testSuites element will be the root element of the document.