Rtos API example

Embed: (wiki syntax)

« Back to documentation index

ReportExporter Class Reference

ReportExporter Class Reference

Public Member Functions

def report
def report_to_file
def get_tooltip_name
def get_result_div_sections
def get_result_tree
def get_all_unique_test_ids
def exporter_html
def exporter_junit
def exporter_print
def exporter_text

Detailed Description

Class exports extended test result Python data structure to
    different formats like HTML, JUnit XML.

Parameter 'test_result_ext' format:

u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                  'duration': 20,
                                                  'elapsed_time': 1.7929999828338623,
                                                  'output': 'Host test instrumentation on ...\r\n',
                                                  'result': 'OK',
                                                  'target_name': u'LPC1768',
                                                  'description': 'stdio',
                                                  'id': u'MBED_2',
                                                  'toolchain_name': u'uARM'}},

Definition at line 32 of file test_exporters.py.


Member Function Documentation

def exporter_html (   self,
  test_result_ext,
  test_suite_properties = None 
)
Export test results in proprietary HTML format.

Definition at line 188 of file test_exporters.py.

def exporter_junit (   self,
  test_result_ext,
  test_suite_properties = None 
)
Export test results in JUnit XML compliant format

Definition at line 258 of file test_exporters.py.

def exporter_print (   self,
  test_result_ext,
  print_log_for_failures = False 
)
Export test results in print format.

Definition at line 313 of file test_exporters.py.

def exporter_text (   self,
  test_result_ext 
)
Prints well-formed summary with results (SQL table like)
    table shows target x test results matrix across

Definition at line 360 of file test_exporters.py.

def get_all_unique_test_ids (   self,
  test_result_ext 
)
Gets all unique test ids from all ran tests.
    We need this to create complete list of all test ran.

Definition at line 171 of file test_exporters.py.

def get_result_div_sections (   self,
  test,
  test_no 
)
Generates separate <DIV> sections which contains test results output.

Definition at line 117 of file test_exporters.py.

def get_result_tree (   self,
  test_results 
)
If test was run in a loop (we got few results from the same test)
    we will show it in a column to see all results.
    This function produces HTML table with corresponding results.

Definition at line 154 of file test_exporters.py.

def get_tooltip_name (   self,
  toolchain,
  target,
  test_id,
  loop_no 
)
Generate simple unique tool-tip name which can be used.
    For example as HTML <div> section id attribute.

Definition at line 111 of file test_exporters.py.

def report (   self,
  test_summary_ext,
  test_suite_properties = None,
  print_log_for_failures = True 
)
Invokes report depending on exporter_type set in constructor

Definition at line 77 of file test_exporters.py.

def report_to_file (   self,
  test_summary_ext,
  file_name,
  test_suite_properties = None 
)
Stores report to specified file

Definition at line 97 of file test_exporters.py.