#995 Implement unified UI automation framework (Qt HTTP Server + Playwright) - #998
Open
magnesj wants to merge 13 commits into
Open
#995 Implement unified UI automation framework (Qt HTTP Server + Playwright)#998magnesj wants to merge 13 commits into
magnesj wants to merge 13 commits into
Conversation
… Qt HTTP server
…eld and command endpoints
…tionserver option
…eference workflow
ApplicationLibCode/Automation is not part of the target include directories, so RiaGuiApplication.cpp failed to compile when configuring with RESINSIGHT_ENABLE_UI_AUTOMATION=ON. Use a sibling-relative include instead.
Playwright resolves request paths against baseURL using WHATWG URL semantics, where a leading slash replaces the entire path. Every call therefore hit the server root instead of /api/v1 and returned 404. Normalize baseURL to end with a slash and make the client paths relative.
…tion Many commands act on the object selected in the project tree, but the automation API had no way to drive it and there is no command-file verb for selection either. GET /api/v1/selection reports the selected objects. PUT /api/v1/selection selects an object by address using Riu3DMainWindowTools::selectAsCurrentItem, the same call the context menu features use, so the property editor and the active view follow along as they do for a user click.
Cell filters and many other objects are created and deleted by command features rather than by command-file verbs, so tests could not reach them. POST /api/v1/features invokes a feature the same way its context menu entry does, and GET /api/v1/features lists what is available together with whether it applies to the current selection. Only an explicit allow list can be invoked, because a large share of the features open modal dialogs that would block the server with no user present to dismiss them. PUT /api/v1/selection now sets the selection manager in addition to syncing the tree view. Riu3DMainWindowTools::selectAsCurrentItem silently does nothing when the object is not present in a visible tree view, which left objects such as the cell filter collection unselectable. Features read the selection manager. This makes the reference workflow from issue #993 run end to end, so the test is no longer marked fixme.
The commands route executed arbitrary command-file (RICF) text. The only thing the tests needed from it was importing a grid and opening a view, and command features now cover the rest of the workflow. POST /api/v1/cases imports a grid file through RiaImportEclipseCaseTools::openEclipseCaseFromFile, which is the path the file menu uses, with the time step filter dialog disabled so nothing waits for input. The response reports the new case id and the ids of the views created for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the unified UI automation framework from #995 (investigation #993, recommendation #994).
One localhost automation surface serves both UI workflow tests and AI tooling:
qthttpserver), targeting Qt 6.6.3. New moduleApplicationLibCode/Automation/(RiaAutomationServer), gated behind the new CMake optionRESINSIGHT_ENABLE_UI_AUTOMATION(OFF by default) and started withResInsight --automationserver [port].docs/automation/openapi.yamlis the source of truth, covering/health,/project,/objects/{address}(+ field write),/views,/views/{id}/visibleCellCount, and/commands(RICF).Testing/UiAutomation/with read-only smoke tests and the cell-range-filter reference workflow from Framework used for AI tooling and UI unit tests #993.The server binds to
127.0.0.1only. Field writes reuse the same scripting capability as the Python/gRPC interface; command execution reuses the RICF command vocabulary.Notes
build/).fixmepending/commandsvocabulary for creating/removing cell range filters.Closes #995