byteblower_test_framework.report module
Reporting interfaces.
- class byteblower_test_framework.report.ByteBlowerHtmlReport
Bases:
ByteBlowerReport
Generate a report in HTML format.
Generates summary information of test status, test configuration and results from all flows.
This report contains:
A global PASS/FAIL result
Port configuration table
Correlated results
Aggregated results over all flows (supporting aggregation of over time graphs and summary table)
Per-flow results
Flow configuration
Results for all Analysers attached to the flow
- __init__(output_dir: str | None = None, filename_prefix: str = 'byteblower', filename: str | None = None, layer2_speed: Layer2Speed | None = Layer2Speed.frame) None
Create a ByteBlower HTML report generator.
The report is stored under
<output_dir>
. The default structure of the file name is<prefix>_<timestamp>.html
where:
<output_dir>
: Configurable viaoutput_dir
. Defaults to the current working directory.<prefix>
: Configurable viafilename_prefix
<timestamp>
: Current time. Defined at construction time of theByteBlowerReport
Python object.
- Parameters:
output_dir (str, optional) – Override the directory where the report file is stored, defaults to
None
(meaning that the “current directory” will be used)filename_prefix (str, optional) – Prefix for the ByteBlower report file name, defaults to ‘byteblower’
filename (str, optional) – Override the complete filename of the report, defaults to
None
layer2_speed (Layer2Speed, optional) – Configuration setting to select the layer 2 speed reporting, defaults to
frame
- class byteblower_test_framework.report.ByteBlowerJsonReport
Bases:
ByteBlowerReport
Generate report in JSON format.
Generates summary information of test status, test configuration and results from all flows.
This report contains:
Global test status
Port configuration (to-do)
Correlated results
Aggregated results over all flows (supporting aggregation of over time data (to-do) and summary data)
Per-flow results (to-do)
Flow configuration
Results for all Analysers attached to the flow
- __init__(output_dir: str | None = None, filename_prefix: str = 'byteblower', filename: str | None = None) None
Create a ByteBlower JSON report generator.
The report is stored under
<output_dir>
. The default structure of the file name is<prefix>_<timestamp>.json
where:
<output_dir>
: Configurable viaoutput_dir
. Defaults to the current working directory.<prefix>
: Configurable viafilename_prefix
<timestamp>
: Current time. Defined at construction time of theByteBlowerReport
Python object.
- Parameters:
output_dir (str, optional) – Override the directory where the report file is stored, defaults to
None
(meaning that the “current directory” will be used)filename_prefix (str, optional) – Prefix for the ByteBlower report file name, defaults to ‘byteblower’
filename (str, optional) – Override the complete filename of the report, defaults to
None
- class byteblower_test_framework.report.ByteBlowerReport
Bases:
ABC
Abstract ByteBlower Report interface definition.
- __init__(output_dir: str | None = None, filename_prefix: str = 'byteblower', filename: str | None = None) None
Create a ByteBlower report generator.
The report is stored under
<output_dir>
. The default structure of the file name is<prefix>_<timestamp>.<ext>
where:
<output_dir>
: Configurable viaoutput_dir
. Defaults to the current working directory.<prefix>
: Configurable viafilename_prefix
<timestamp>
: Current time. Defined at construction time of theByteBlowerReport
Python object.<ext>
: Output type specific file extension.
- Parameters:
output_dir (str, optional) – Override the directory where the report file is stored, defaults to
None
(meaning that the “current directory” will be used)filename (str, optional) – Override the complete filename of the report, defaults to
None
filename_prefix (str, optional) – Prefix for the ByteBlower report file name, defaults to ‘byteblower’
- abstract add_flow(flow: Flow) None
Add the flow info.
- Parameters:
flow (Flow) – Flow to add the information for
- class byteblower_test_framework.report.ByteBlowerUnitTestReport
Bases:
ByteBlowerReport
Generate test report in Unit XML format.
- __init__(output_dir: str | None = None, filename_prefix: str = 'byteblower', filename: str | None = None) None
Create a ByteBlower Unit test report generator.
The report is stored under
<output_dir>
. The default structure of the file name is<prefix>_<timestamp>.xml
where:
<output_dir>
: Configurable viaoutput_dir
. Defaults to the current working directory.<prefix>
: Configurable viafilename_prefix
<timestamp>
: Current time. Defined at construction time of theByteBlowerReport
Python object.
- Parameters:
output_dir (str, optional) – Override the directory where the report file is stored, defaults to
None
(meaning that the “current directory” will be used)filename_prefix (str, optional) – Prefix for the ByteBlower report file name, defaults to ‘byteblower’
filename (str, optional) – Override the complete filename of the report, defaults to
None
- class byteblower_test_framework.report.Layer2Speed
Bases:
Enum
What will be included in the Layer 2 speed calculation.
- frame = 'frame'
Frame without FCS.
Frame (as build and send by ByteBlower)
This way, each Frame gets 0 Bytes extra.
- frame_with_fcs = 'frame_with_fcs'
Frame with FCS.
Frame (as build and send by ByteBlower)
FCS (CRC Frame Checksum, 4 Bytes)
This way, each Frame gets 4 Bytes extra.
- physical = 'physical'
Frame with FCS and physical overhead.
Frame (as build and send by ByteBlower)
FCS (CRC Frame Checksum, 4 Bytes)
Preamble (7 Bytes)
SFD (Start Frame Delimiter, 1 Byte)
Pause (12 Bytes)
This way, each Frame gets 24 Bytes extra.
- class byteblower_test_framework.report.UnitTestReport
Bases:
object
Helper for generating JUnit XML test reports.
- add_skipped(step: str, message: str, stdout: str | None = None, stderr: str | None = None) None
Add a skipped test case.