Skip to content

tests: add UI test infrastructure for VM Wizard#7631

Open
sdrabb wants to merge 3 commits intoutmapp:mainfrom
sdrabb:feature/ui-testing
Open

tests: add UI test infrastructure for VM Wizard#7631
sdrabb wants to merge 3 commits intoutmapp:mainfrom
sdrabb:feature/ui-testing

Conversation

@sdrabb
Copy link

@sdrabb sdrabb commented Feb 25, 2026

Summary

  • Add UTMUITests target wired into the macOS scheme so tests run via
    Xcode and xcodebuild test -scheme macOS -destination 'platform=macOS'
  • Add VMWizardViewTest with a window close button smoke test
  • Add TESTING.md guide covering how to run and extend the test suite
  • Add test-utm CI job to build.yml that runs on every push/PR,
    parallel to build-utm, sharing the same sysroot cache

#2565

Testing

Tested on: Mac mini M4, macOS 26.3 (Tahoe beta)

Notes

Code is AI-assisted. All commits carry Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>.
I have read the AI Contribution Guidelines and can attest that I have followed each item to the best of my ability.

@osy
Copy link
Contributor

osy commented Feb 26, 2026

Hi please confirm that you have read https://github.com/utmapp/UTM/blob/main/CONTRIBUTING.md and have followed the guidelines. Thanks!

alb3rto and others added 2 commits February 26, 2026 17:30
Add a UTMUITests target (com.apple.product-type.bundle.ui-testing)
that depends on the macOS app target and wire it into the macOS
scheme so that tests can be run both from Xcode and via:

  xcodebuild test -scheme macOS -destination 'platform=macOS'

Only the minimum required project.pbxproj entries are added:
PBXBuildFile, PBXContainerItemProxy, PBXFileReference,
PBXFrameworks/Resources/SourcesBuildPhase, PBXGroup,
PBXNativeTarget, PBXTargetDependency, XCBuildConfiguration
(Debug + Release), and XCConfigurationList. No unrelated target
settings are touched.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a test-utm job that runs UTMUITests against the macOS scheme
on every push/PR. The job depends on build-sysroot (same as
build-utm) so it can share the cached sysroot and run in parallel
with the other build jobs.

  xcodebuild test -scheme macOS -destination 'platform=macOS' \
    CODE_SIGNING_ALLOWED=NO

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@sdrabb sdrabb force-pushed the feature/ui-testing branch from f685795 to 466f481 Compare February 26, 2026 16:32
@sdrabb sdrabb changed the title test: add UI test target for VM Wizard tests: add UI test infrastructure for VM Wizard Feb 26, 2026
@sdrabb
Copy link
Author

sdrabb commented Feb 26, 2026

Any chance to run this on the self hosted runner that we have?

Removed CODE_SIGNING_ALLOWED=NO from test command.
@sdrabb
Copy link
Author

sdrabb commented Feb 28, 2026

I configure the one I have as self hosted for a run
https://github.com/sdrabb/UTM/actions/runs/22518346473/job/65239516585

@sdrabb sdrabb marked this pull request as ready for review February 28, 2026 10:06
@victorjquinones
Copy link

@copilot please review this PR for any errors.

Copy link
Contributor

@osy osy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked through all the changes and it's fine and is very similar to the code I have generated with my own AI agent. The reason why I didn't commit it is because the bulk of the work (99%) is actually defining the tests and implementing them. You can probably use AI to implement most of the tests (assuming you properly review it, etc) but the real work is defining all the test cases. That takes a lot of work in understanding the use cases and where the complexity lies and is not something that you can tell the AI to do without a lot of context and guidance (especially since by default these AI agents are not too good at debugging UI issues). What I want to see (in human written form) is a test plan that covers everything that is important across all the different platforms (not just macOS but it is okay to start with just macOS).

@sdrabb
Copy link
Author

sdrabb commented Mar 15, 2026

Ok then I'll do a proposal, thanks for the feedback

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.

3 participants