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 run name.
- 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.
Usage¶
You can launch hardpy panel by using the command hardpy-panel [...]
, where [...]
is a tests directory.
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).
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. Currently, there are some types of dialog boxes.
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.
image¶
Contains an instruction or question with image and a confirm
button for confirmation.
- Allows change width through
width
parameter. - Allows next image types: gif, jpeg, pjpeg, png, svg+xml, tiff, vnd.microsoft.icon, vnd.wap.wbmp, webp.
multiple steps¶
Contains an instruction with multiple steps and confirm
button for confirmation.
Allows steps with text and image.
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.
Options¶
The operator panel has some options.
To view all options run hardpy-panel -h
.
db_user¶
Statestore and runstore databases
The CouchDB instance user name for the statestore and runstore databases. The default is dev.
-dbu DB_USER, --db_user DB_USER
db_pswd¶
The CouchDB instance password for the statestore and runstore databases. The default is dev.
-dbpw DB_PSWD, --db_pswd DB_PSWD
db_port¶
The CouchDB instance port number for the statestore and runstore databases. The default is 5984.
-dbp DB_PORT, --db_port DB_PORT
db_host¶
The CouchDB instance hostname for the statestore and runstore databases. The default is localhost.
-dbh DB_HOST, --db_host DB_HOST
web_host¶
The web interface hostname. The default is localhost.
-wh WEB_HOST, --web_host WEB_HOST
web_port¶
The web interface port number. The default is 8000.
-wp WEB_PORT, --web_port WEB_PORT
sck_port¶
Internal socket port for passing backend data (such as a dialog box) to running pytest tests. The default is 6525.
-sp SCK_PORT, --sck_port SCK_PORT
sck_addr¶
Internal socket address for passing backend data (such as a dialog box) to running pytest tests. The default is localhost.
-sa SCK_ADDR, --sck_addr SCK_ADDR