HardPy panel¶
The hardpy panel or operator panel is a web interface that displays and controls the testing process in HardPy.
Capability¶
HardPy panel allows you to:
- Start and stop testing;
- Interact with dialog box during testing;
- Browse:
- Test suite name.
- Last test run status.
- Test module name.
- Duration of test modules execution.
- Test module status.
- Test case name.
- Test case message.
- Test case status.
- Browse current statestore state in debug mode.
Languages¶
You can set one of the following operator panel languages via the configuration file:
- English ("en")
- German ("de")
- French ("fr")
- Spanish ("es")
- Chinese ("zh")
- Japanese ("ja")
- Russian ("ru")
Usage¶
Launch operator panel¶
Use the hardpy run command to start the web server. After this open page http://localhost:8000/ in the browser.
When the operator panel is running, you can run tests through the web interface or through the pytest launcher (in a terminal or from another application).
Start and stop tests¶
The operator panel contains a test start/stop button in the lower right corner of the screen. The user can start/stop tests using the space key.
Operator panel bar¶
Operator panel bar displays key system status information in a compact tag-based format.
Fields:
- Stand name - name of the test stand;
- Status - current system status;
- Start time - test/operation start timestamp with timezone;
- Finish time - completion timestamp with timezone;
- Alert - active warning or error message;
- Test stand info - additional test stand parameters from set_dut_info info;
All fields appear as minimal tags and only display when data is available.
Settings¶
The operator panel contains a setting button in the top right corner.
debug mode¶
The user can view the statestore database online by clicking on the Turn on the debug mode button.
Debug mode is disabled by default.
sound¶
The user can turn on the sound of the end of the test by clicking on the Turn on the sound button.
Sound is disabled by default.
Dialog box¶
For user interaction with the test, it is possible to use dialog boxes. An example of usage can be seen in the example dialog box and in dialog box documentation. Currently, there are some types of dialog boxes.
Each dialog box can contain an image.
- Allows the width to be changed using the
width
parameter. - Allows changing the border thickness with the
border
parameter. - Allow the following image types: gif, jpeg, pjpeg, png, svg+xml, tiff, vnd.microsoft.icon, vnd.wap.wbmp, webp.
basic dialog box¶
Contains an instruction or question and a confirm
button for confirmation.
text input field¶
Contains an instruction or question, a text input field, and a confirm
button for confirmation.
The text is transmitted in UTF-8 encoding.
number input field¶
Contains an instruction or question, a number input field, and a confirm
button for confirmation.
- Allows float numbers with a dot separator.
- Allows negative numbers.
- Allows numbers to be entered using E notation with
e
, e.g.2e3
. - The entered numbers will be converted to float.
radiobutton¶
Contains radiobutton widget.
- The user selects one option from several possible ones.
- Returns the contents of the selected item as a string.
checkbox¶
Contains checkbox widget.
- The user selects several options from several possible ones.
- Returns a list with the contents of the selected items.
multiple steps¶
Contains an instruction with multiple steps and confirm
button for confirmation.
Allows steps with text and image.
Operator message¶
The messages to the operator are similar to dialog boxes,
but do not contain a Confirm button and can be called outside
the execution of the test plan, for example in case of exception
catching in the conftest.py
file.
For more information, see the example operator message
or in the function description set_operator_message.
warning window¶
If the user clicks confirm
without entering anything, a warning window will be displayed.
error notification¶
If the user closes the dialog box (using the cross in the upper right corner), the tests will be stopped, an error message will be displayed.
Charts¶
For visualizing test data, it is possible to use interactive charts. Charts provide a graphical representation of measurement results and allow operators to analyze data trends in real-time.
Charts support the following features:
- Multiple datasets on a single chart
- Zooming capabilities
- Logarithmic scales for both X and Y axes
- Collapsible/expandable view
Basic line chart¶
Displays a single dataset as a line chart with customizable styling.
Multiple datasets¶
Shows multiple datasets on the same chart for comparative analysis. Each dataset can have different colors and styles.
Collapsed view¶
Charts can be collapsed to save screen space when not actively being analyzed.
Expanded view¶
Charts can be expanded to full view for detailed analysis.
Logarithmic X-axis¶
When dealing with data that spans multiple orders of magnitude, the X-axis can be set to logarithmic scale.
Logarithmic Y-axis¶
The Y-axis can be set to logarithmic scale for better visualization of exponential data trends.
Logarithmic X and Y axes¶
Both axes can be set to logarithmic scale for data that requires logarithmic representation in both dimensions.
Chart interaction¶
- Zoom: Click and drag to select an area to zoom into
- Pan: Click and drag to move around the chart when zoomed in
- Reset zoom: Double-click to reset to the original view
- Data points: Hover over data points to see exact values
- Legend: Click on legend items to show/hide specific datasets
- Download: Downloading plot as a PNG.