ReportGenerator

class mtf.utils.report_generator.ReportGenerator.ReportGenerator

platform report generator : generate reports from templates All report generator inherit from this class

template_path = ''
template_filename = ''
report_path = ''
context = {}
classmethod init_report(path, template, report)

Initialize parameters to generate the report :param path: template path :type path: str :param template: the template file name :type template: str :param report: the report path :type report: str

classmethod addToContext(context)

Add a dictionary to the context : Information that will be written in the report :param context: information to write in the report :type context: dict

classmethod generate_report_from_template(functions=None)

Generate report from the template and write the result in a file. The generation is done via Jinja2 :param functions: list of function to use in the template. :type functions: List

classmethod build_txt_report(functions=None)

Generate string from the template and return the rendered value The generation is done via Jinja2 :param functions: list of function to use in the template. :type functions: List

classmethod write_report()

This method will be defined in sub_classes

classmethod apply_external_config(force=False)
classmethod build_value(raw_value)
classmethod get_properties()
classmethod init_paths(workspace, search_path)
is_configured = False
search_path = '.'
workspace_path = '.'