Skip to content

pytest_f3ts.utils ​

F3TS Plugin Utilities.

class SerialNumber ​

Object for setting and updating the status number in the application frontend

SerialNumber.set(self, serial) ​

class StatusBanner ​

Application Custom Status Interface

Object for overriding the status banner in the application frontend

StatusBanner.override(self, override, status=None, color=None) ​

class UserDialog ​

User Dialog Interface

Object for sending user input prompts or popup messages either to the GUI or the serial terminal for pytest only configuration

UserDialog.close(self) ​

UserDialog.send(self, message: pytest_f3ts.schemas.msg.Dialog, blocking: bool = True) -> Union[pytest_f3ts.schemas.msg.DialogResponse, bool] ​

Send Custom User Dialog to the GUI or terminal

UserDialog.send_terminal(self, message: pytest_f3ts.schemas.msg.Dialog, blocking: bool = True) -> pytest_f3ts.schemas.msg.DialogResponse ​

Send Custom User Dialog to the pytest terminal

Requires -s option to be enabled to allow stdin

UserDialog.send_user_dialog(self, dialog: pytest_f3ts.schemas.msg.Dialog, timeout: int = 3600) ​

Send two-way user dialog message to the Backend.

UserDialog.websocket_connect(self) ​

Setup websocket connection to frontend.

get_config_from_file(f3ts_config=None, slot_id=None) ​

Return a configuration object.

get_log_filename(test_name: str, sn: str, dirname: str, extension: str = 'xml') -> str ​

Return a log filename.

get_settings_from_file(version: str, f3ts_config=None) -> Tuple[pytest_f3ts.schemas.limits.LimitsCreate, pytest_f3ts.schemas.config.GUISettings] ​

Return particular settings for logging to database.

log_vars(record_property, recurse=1) ​

Log standard F3TS variables.

Add the standard variables and expected configuration information to the JUnit-based XML test log. The following properties are recorded:

  • test_id: Test ID number
  • error_code: Error code for the test case
  • error_msg: Message to display when the test case fails
  • min_limit: Optional minimum limit
  • max_limit: Optional maximum limit
  • description: Optional test case description
  • meas: Value that is being measured and tested
  • test_config: F3TS fixture that provides test information from configuration files
    • The same values as listed above are logged.