-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Merge PR #31009: Add agent instructions for UI test deployment #32324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
cbc7a54 to
3be5e40
Compare
|
/rebase |
|
@copilot please resolve merge conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR reorganizes and significantly improves the UI testing documentation for .NET MAUI by:
- Splitting the old monolithic
docs/design/UITesting.mdinto two focused documents: a practical guide (docs/UITesting-Guide.md) and an architecture document (docs/design/UITesting-Architecture.md) - Adding a new
AGENTS.mdfile at the repository root for universal AI coding assistant guidance - Creating path-specific instructions for UI tests (
uitests.instructions.md) - Updating the main copilot instructions with synchronization requirements and improved troubleshooting sections
- Standardizing front-matter metadata format in template instructions
Key Changes
- New comprehensive 613-line UI testing guide with complete examples, prerequisites, and best practices
- New architecture document focusing on CI/CD integration and advanced patterns
- Universal AGENTS.md file (378 lines) with setup commands, testing guidance, and troubleshooting
- Path-specific UI test instructions (303 lines) for Copilot when working in test directories
- Improved copilot-instructions.md with troubleshooting section and cross-file synchronization requirements
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
docs/design/UITesting.md |
Removed old monolithic testing doc (143 lines deleted) |
docs/design/UITesting-Architecture.md |
New architecture and CI integration guide focusing on advanced topics |
docs/UITesting-Guide.md |
New comprehensive practical guide for day-to-day UI test writing |
AGENTS.md |
New universal guidance file for all AI coding assistants with setup and testing workflows |
.github/instructions/uitests.instructions.md |
New path-specific Copilot instructions for UI test code |
.github/instructions/templates.instructions.md |
Standardized front-matter format (applyTo vs applies_to) |
.github/copilot-instructions.md |
Enhanced with synchronization requirements, troubleshooting, and references to new docs |
I've resolved the merge conflicts by rebasing this branch onto The main branch already contains all the UI testing documentation from PR #32064 and PR #32270, which this PR intended to add. The branch is now aligned with main and all conflicts are resolved. Note: The branch will need a force-push to update the remote. The local branch is clean and ready - it's currently one commit ahead of main with just an empty rebase marker commit. |
0f9f9d8 to
80c7e8c
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Rebase and fix the current conflict?
Rebase completed successfully in commit d87bc1c7. The branch is now based on origin/main (d4eb91b) with all conflicts resolved. The Additional Resources section was updated to include both the existing links from main and the new UI testing documentation links. Note: The local branch is ready but needs a force-push to update the remote. The rebase history shows:
|
# Conflicts: # .github/copilot-instructions.md
fd4be9c to
a325625
Compare
| xcrun simctl boot $UDID 2>/dev/null || true | ||
|
|
||
| # Install the app to the simulator | ||
| xcrun simctl install $UDID artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rolfbjarne is this alright? Are there better more dotnet ways to do this?
I can't use dotnet -t:run because it doesn't return so copilot just gets stuck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be more reliable if you didn't try to get it to discover a $UDID at all? What if you left that blank and it just launched the default iPad that it does when you leave that information out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what "dotnet test" does, but if you just need the app installed in the simulator, that'll work. We don't have any dotnet way to just install, without running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathanpeppers we have specific devices that we use for screen shots. So, for the purpose of running the tests locally and generating those screen shots we need it to default to the right device.
@rolfbjarne thank you! Yea, we just need the app installed and that's it. Dotnet test will take care of everything else (launching) via appium
| **Step 1: Find iPhone Xs with highest API level** | ||
| ```bash | ||
| # View all iPhone Xs devices with their iOS versions | ||
| xcrun simctl list devices available | awk '/^--.*iOS/ {version=$0} /iPhone Xs/ {print version " -> " $0}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's going to be more reliable to get json output, and then transform it using jq:
xcrun simctl list devices available --json | jq '...'
| xcrun simctl boot $UDID 2>/dev/null || true | ||
|
|
||
| # Install the app to the simulator | ||
| xcrun simctl install $UDID artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what "dotnet test" does, but if you just need the app installed in the simulator, that'll work. We don't have any dotnet way to just install, without running.
Merges changes from #31009 to enable agents to build, deploy, and test MAUI applications.
Note: This PR has been rebased onto
main(commit d4eb91b) to resolve merge conflicts.Changes
.github/copilot-instructions.mddocs/UITesting-Guide.md(new)docs/design/UITesting-Architecture.md(new).github/instructions/uitests.instructions.md(new).github/instructions/templates.instructions.md(updated)AGENTS.md(new)Usage Example
Deploy and test on Android:
Agents can now autonomously build, deploy, and validate MAUI UI tests.
Recent Updates
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.