test: add pytest-qt GUI tests #1132
Draft
andychoquette wants to merge 1 commit intoaws-deadline:mainlinefrom
Draft
test: add pytest-qt GUI tests #1132andychoquette wants to merge 1 commit intoaws-deadline:mainlinefrom
andychoquette wants to merge 1 commit intoaws-deadline:mainlinefrom
Conversation
d4a820e to
9059b82
Compare
Add pytest-qt tests that replace the Squish tst_verify_settings_dialogue and tst_verify_gui_submitter_bundles test suites. These tests use MockDeadlineBackend to provide fake API responses in-process, requiring no AWS credentials, no Squish license, and no external infrastructure. New files: - test/gui/conftest.py: shared fixture for MockDeadlineBackend - test/gui/test_settings_dialogue.py: 14 tests for the config dialog - test/gui/test_gui_submitter_bundles.py: 6 tests for the GUI submitter Changes: - mock_deadline_backend.py: add ListFarms, ListQueues, ListStorageProfilesForQueue APIs and storage_profiles storage - hatch.toml: add [envs.gui] with pytest-qt and PySide6 deps - code_quality.yml: add GUITests job (Linux/macOS/Windows matrix) Run locally with: hatch run gui:test Signed-off-by: Andy Choquette <apcho@amazon.com> Signed-off-by: Andy Choquette <78888816+andychoquette@users.noreply.github.com>
9059b82 to
33f77a6
Compare
crowecawcaw
reviewed
Apr 24, 2026
Comment on lines
+213
to
+223
| ### GUI Tests (pytest-qt) | ||
|
|
||
| GUI tests are located under the `test/gui` directory. They use [pytest-qt](https://pytest-qt.readthedocs.io/) to test Qt widgets and dialogs in-process, with `MockDeadlineBackend` providing fake API responses. No AWS credentials or Squish license required. | ||
|
|
||
| #### Running GUI Tests | ||
|
|
||
| ```sh | ||
| hatch run gui:test | ||
| ``` | ||
|
|
||
| These tests run automatically in CI on Linux, macOS, and Windows as part of the Code Quality workflow. |
Contributor
There was a problem hiding this comment.
Since these don't actually need a screen or start up a GUI, could we run them with the rest of the unit tests?
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.
DRAFT - WIP
Add pytest-qt tests that replace the Squish tst_verify_settings_dialogue and tst_verify_gui_submitter_bundles test suites. These tests use MockDeadlineBackend to provide fake API responses in-process, requiring no AWS credentials, no Squish license, and no external infrastructure.
New files:
Changes:
Run locally with: hatch run gui:test
Fixes:
What was the problem/requirement? (What/Why)
What was the solution? (How)
What is the impact of this change?
How was this change tested?
See DEVELOPMENT.md for information on running tests.
downloadorasset_syncmodules? If so, then it is highly recommendedthat you ensure that the docker-based unit tests pass.
Was this change documented?
Does this PR introduce new dependencies?
This library is designed to be integrated into third-party applications that have bespoke and customized deployment environments. Adding dependencies will increase the chance of library version conflicts and incompatabilities. Please evaluate the addition of new dependencies. See the Dependencies section of DEVELOPMENT.md for more details.
Is this a breaking change?
A breaking change is one that modifies a public contract in a way that is not backwards compatible. See the
Public Contracts section
of the DEVELOPMENT.md for more information on the public contracts.
If so, then please describe the changes that users of this package must make to update their scripts, or Python applications.
Does this change impact security?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.