mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-03 06:49:38 +08:00
doc: add docs for HttpRunner Main Interface
This commit is contained in:
@@ -6,6 +6,19 @@ from httprunner import (__version__, exceptions, loader, logger, parser,
|
||||
|
||||
|
||||
class HttpRunner(object):
|
||||
""" Developer Interface: Main Interface
|
||||
Usage:
|
||||
|
||||
from httprunner.api import HttpRunner
|
||||
runner = HttpRunner(
|
||||
failfast=True,
|
||||
save_tests=True,
|
||||
log_level="INFO",
|
||||
log_file="test.log"
|
||||
)
|
||||
summary = runner.run(path_or_tests)
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, failfast=False, save_tests=False, log_level="INFO", log_file=None):
|
||||
""" initialize HttpRunner.
|
||||
|
||||
@@ -280,6 +280,7 @@ def render_html_report(summary, report_template=None, report_dir=None, report_fi
|
||||
""" render html report with specified report name and template
|
||||
|
||||
Args:
|
||||
summary (dict): test result summary data
|
||||
report_template (str): specify html report template path, template should be in Jinja2 format.
|
||||
report_dir (str): specify html report save directory
|
||||
report_file (str): specify html report file path, this has higher priority than specifying report dir.
|
||||
|
||||
Reference in New Issue
Block a user