The FixturFab Test Executor uses a combination of websockets and HTTP requests to communicate with the Test Runner backend and frontend.
Communication Flow#
When a test technician presses Run in the User Interface, an API command is sent to the Test Executor (TE), which initiates the pytest thread. During test plan execution, messages are transmitted to the TE, logged to the results database, and communicated to the GUI. Custom messages can be sent via pytest-f3ts fixtures.
Websocket Message Structure#
All websocket messages follow this JSON format:
{
"type": "message_type",
"toClient": "{{received ID}}",
"fromClient": "{{sender ID}}",
"data": {
"key": "value"
}
}The connect message type is sent by the backend to the frontend to initiate a connection handshake.
Message Types#
Test Results#
Test result messages are sent after test execution via the pytest_runtest_logreport hook or manually using the f3ts_assert fixture.
TestResult Object:
| Field | Description |
|---|---|
test_id | Test identifier |
test_name | Test case name |
min_limit | Minimum limit setting |
max_limit | Maximum limit setting |
meas | Measurement value |
start | Test start time |
stop | Test completion time |
duration | Test execution duration |
passed | Pass/Fail status |
User Input#
Dialog messages are sent via the user_dialog fixture, which transmits Dialog objects over websockets. Blocking messages return DialogResponse objects.
Dialog Object:
| Field | Description |
|---|---|
title | Popup title |
message | Popup content |
okButtonText | Optional OK button text |
cancelButtonText | Optional Cancel button text |
inputType | Optional input type (supports "text") |
defaultText | Default input text |
DialogResponse Object:
| Field | Description |
|---|---|
inputText | User-entered text for "text" type |
okClicked | OK button click status |
cancelClicked | Cancel button click status |
Status Banner#
Custom status banners are sent via the status_banner fixture using StatusBanner objects.
StatusBanner Object:
| Field | Description |
|---|---|
status | Banner text (e.g., "Close Fixture", "Running") |
color | Hex color code (e.g., "#7E57C2") |
Next Steps#
- Technical Reference - API documentation and source code reference
- Test Runner - The GUI application that receives these messages