Report Generation API
Six report formats render from test_record_instance: HTML, JSON
(split by outcome), XML (split by outcome), CSV, JUnit XML, and a
percentile-summary JSON.
Note
Every generator raises if the record store is empty. Catch
LoadDensityHTMLException (HTML), LoadDensityGenerateJsonReportException
(JSON / summary / CSV / JUnit), or XMLException (XML).
HTML
generate_html()
def generate_html() -> Tuple[List[str], List[str]]
Returns (success_list, failure_list) — HTML table fragments for
each outcome.
generate_html_report()
def generate_html_report(html_name: str = "default_name") -> str
Writes {html_name}.html; returns the file path.
JSON (split by outcome)
generate_json()
def generate_json() -> Tuple[Dict[str, dict], Dict[str, dict]]
Returns (success_dict, failure_dict).
generate_json_report()
def generate_json_report(json_file_name: str = "default_name") -> Tuple[str, str]
Writes {name}_success.json + {name}_failure.json; returns
(success_path, failure_path).
XML (split by outcome)
generate_xml()
def generate_xml() -> Tuple[str, str]
Returns (success_xml_str, failure_xml_str); both wrapped under an
<xml_data> root.
generate_xml_report()
def generate_xml_report(xml_file_name: str = "default_name") -> Tuple[str, str]
Writes {name}_success.xml + {name}_failure.xml (pretty
printed).
CSV (one row per request)
def generate_csv_report(csv_name: str = "default_name") -> str
Writes {csv_name}.csv. Columns: outcome, Method, test_url, name,
status_code, response_time_ms, response_length, error.
JUnit XML (CI-friendly)
def generate_junit_report(report_name: str = "default_name-junit") -> str
Writes {report_name}.xml. Each request becomes a <testcase>;
failures attach <failure> nodes carrying the error message.
Summary (percentiles)
def build_summary() -> dict
def generate_summary_report(report_name: str = "default_name-summary") -> str
build_summary returns the in-memory dict; generate_summary_report
writes {report_name}.json. The dict contains totals, failure rate,
per-name counts, min / max / mean, and percentile (p50 / p90 / p95 /
p99) latencies. Useful for charting and regression checks.
Action-JSON commands
Command |
Writes |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the summary dict in memory. |