[DRAFT] Introduce Qt test automation bridge and gui functional tests#933
[DRAFT] Introduce Qt test automation bridge and gui functional tests#933johnny9 wants to merge 3 commits intobitcoin-core:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
This PR introduces an optional Qt test automation bridge and adds a first suite of GUI functional tests for bitcoin-qt.
The goal is to improve GUI testability and reduce reliance on manual regression testing for all of the gui flows.
Starting as a draft to get a conversation going.
• New CMake option: ENABLE_TEST_AUTOMATION (default OFF)
• New runtime arg: -test-automation=
• New files:
• src/qt/testbridge.h
• src/qt/testbridge.cpp
The test automation bride creates a unix socket server that has a simple json protocol defined in src/qt/testbridge.h.
The bridge adds the following commands to enable end to end gui validation
• list_windows
• get_active_window
• get_current_view (alias: get_current_page)
• get_property
• click
• set_text
• wait_for_window
• wait_for_view (alias: wait_for_page)
• wait_for_property
• get_text
• save_screenshot
• list_objects
Build:
• -DBUILD_GUI=ON
• -DENABLE_WALLET=ON
• -DENABLE_TEST_AUTOMATION=ON
Run:
• test/functional/test_runner.py gui_node_window.py
• test/functional/test_runner.py gui_settings_persistence.py
• test/functional/test_runner.py gui_wallet_lifecycle.py
• test/functional/test_runner.py gui_wallet_receive.py
• test/functional/test_runner.py gui_wallet_security.py
• test/functional/test_runner.py gui_wallet_send.py
• test/functional/test_runner.py gui_wallet_send_advanced.py