Package rosunit :: Module junitxml
[frames] | no frames]

Module junitxml

source code

Library for reading and manipulating Ant JUnit XML result files.

Classes
  TestInfo
Common container for 'error' and 'failure' results
  TestError
'error' result container
  TestFailure
'failure' result container
  TestCaseResult
'testcase' result container
  Result
Functions
 
invalid_char_replacer(m) source code
 
filter_nonprintable_text(text) source code
 
cdata(cdata_text) source code
Result
read(test_file, test_name)
Read in the test_result file
source code
Result
read_all(filter_=[])
Read in the test_results and aggregate into a single Result object
source code
 
test_failure_junit_xml(test_name, message, stdout=None)
Generate JUnit XML file for a unary test suite where the test failed
source code
 
test_success_junit_xml(test_name)
Generate JUnit XML file for a unary test suite where the test succeeded.
source code
 
print_summary(junit_results, runner_name='ROSUNIT')
Print summary of junitxml results to stdout.
source code
Variables
  invalid_chars = re.compile(r'[^\t\n\r -~\x85\xa0-\xff\u0100-\u...
  RE_XML_ILLEGAL = u'([- - -￾-￿])|([�-�][^�-�])|([^�-�][�-�]...
  __package__ = 'rosunit'
Function Details

read(test_file, test_name)

source code 

Read in the test_result file

Parameters:
  • test_file (str) - test file path
  • test_name (str) - name of test
Returns: Result
test results

read_all(filter_=[])

source code 

Read in the test_results and aggregate into a single Result object

Parameters:
  • filter_ ([str]) - list of packages that should be processed
Returns: Result
aggregated result

test_failure_junit_xml(test_name, message, stdout=None)

source code 

Generate JUnit XML file for a unary test suite where the test failed

Parameters:
  • test_name (str) - Name of test that failed
  • message (str) - failure message
  • stdout (str) - stdout data to include in report

test_success_junit_xml(test_name)

source code 

Generate JUnit XML file for a unary test suite where the test succeeded.

Parameters:
  • test_name (str) - Name of test that passed

Variables Details

invalid_chars

Value:
re.compile(r'[^\t\n\r -~\x85\xa0-\xff\u0100-\ud7ff\ue000-\ufdcf\ufde0-\
\ufffd]')

RE_XML_ILLEGAL

Value:
u'([---￾-￿])|([�-�][^�-�])|([^�-�][�-�])|([�-�]$)|(^[�-�])'