airtest.report.report module
- timefmt(timestamp)[源代码]
Formatting of timestamp in Jinja2 templates :param timestamp: timestamp of steps :return: “%Y-%m-%d %H:%M:%S”
- class LogToHtml(script_root, log_root='', static_root='', export_dir=None, script_name='', logfile=None, lang='en', plugins=None)[源代码]
基类:
object
Convert log to html display
- scale = 0.5
- get_relative_log(output_file)[源代码]
Try to get the relative path of log.txt :param output_file: output file: log.html :return: ./log.txt or “”
- report_data(output_file=None, record_list=None)[源代码]
Generate data for the report page
- 参数:
output_file – The file name or full path of the output file, default HTML_FILE
record_list – List of screen recording files
- 返回:
- report(template_name='log_template.html', output_file='log.html', record_list=None)[源代码]
Generate the report page, you can add custom data and overload it if needed
- 参数:
template_name – default is HTML_TPL
output_file – The file name or full path of the output file, default HTML_FILE
record_list – List of screen recording files
- 返回: