Skip to content

Comments

Introduce Qml Test Bridge#503

Open
johnny9 wants to merge 4 commits intobitcoin-core:qt6from
johnny9:test-bridge
Open

Introduce Qml Test Bridge#503
johnny9 wants to merge 4 commits intobitcoin-core:qt6from
johnny9:test-bridge

Conversation

@johnny9
Copy link
Collaborator

@johnny9 johnny9 commented Feb 19, 2026

Adds a build config to compile in a json rpc server that can be used to query the QML engine tree and send click events to it. Python driver and harness are added as well as two basic tests. qml_test_bridge_sanity.py does a basic test against the test-bridge and qml_test_onboard.py does a basic click through of the onboard views.

Introduce a lightweight IPC server that allows external test scripts to
observe and drive the QML user interface over a Unix domain socket using
newline-delimited JSON messages.

The bridge is compiled only when ENABLE_TEST_AUTOMATION=ON and activated
only when -test-automation=<socket_path> is passed at runtime.

Supported commands: get_current_page, get_property, click, set_text,
get_text, wait_for_page, list_objects.
Add the Python test infrastructure for the QML test bridge:

- qml_driver.py: QmlDriver client that connects to the TestBridge Unix
  domain socket and provides a Pythonic interface for all bridge commands.
- qml_test_harness.py: Shared test harness that launches bitcoin-core-app
  with the test bridge enabled, or attaches to an already-running instance
  via --socket-path.
- qml_test_bridge_sanity.py: Smoke test verifying list_objects,
  get_current_page, get_property, error handling, and wait_for_page timeout.
Add objectName to all onboarding pages and unique buttonObjectName to
each page's ContinueButton so tests can unambiguously click through the
onboarding flow.

InformationPage gains a buttonObjectName property (default:
'continueButton') that controls the objectName of its ContinueButton.

Add qml_test_onboarding.py which walks through the full onboarding flow:
Cover -> Strengthen -> Blockclock -> StorageLocation -> StorageAmount ->
Connection -> main view.
Document the QML test automation bridge: architecture, protocol,
commands, Python client usage, running tests (headless and attach
modes), objectName annotation guidelines, onboarding page reference
table, and source file inventory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant