Skip to content

[tests] Misc improvements to the app size tests#25522

Merged
rolfbjarne merged 1 commit into
mainfrom
dev/rolf/improve-appsize-tests
May 27, 2026
Merged

[tests] Misc improvements to the app size tests#25522
rolfbjarne merged 1 commit into
mainfrom
dev/rolf/improve-appsize-tests

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

  • Make assertion failure messages context-aware: in CI, mention the build
    artifact; locally, just suggest WRITE_KNOWN_FAILURES=1.
  • Gate the PublishPipelineArtifact step on the directory actually existing
    to avoid noisy 'succeeded with issues' when tests pass.
  • Fix misleading assertion messages for preserved-API checks: 'No added
    APIs.' → 'Unexpected APIs were added to the preserved set.'
  • Fix SKILL.md documentation to show actual artifact naming pattern
    (including uploadPrefix) and realistic file name examples.

- Make assertion failure messages context-aware: in CI, mention the build
  artifact; locally, just suggest WRITE_KNOWN_FAILURES=1.
- Gate the PublishPipelineArtifact step on the directory actually existing
  to avoid noisy 'succeeded with issues' when tests pass.
- Fix misleading assertion messages for preserved-API checks: 'No added
  APIs.' → 'Unexpected APIs were added to the preserved set.'
- Fix SKILL.md documentation to show actual artifact naming pattern
  (including uploadPrefix) and realistic file name examples.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 06:19
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 improves the developer experience around the app size unit tests by making failure output more actionable, reducing CI noise from artifact publishing, and aligning documentation with the actual artifact naming/file patterns used by the pipeline and tests.

Changes:

  • Gate publishing the “updated expected sizes” pipeline artifact on the output directory existing to avoid noisy “succeeded with issues” when there’s nothing to publish.
  • Make AppSizeTest assertion failure hints context-aware (CI vs local) and correct misleading preserved-API assertion messages.
  • Update the SKILL.md instructions to match the real artifact naming pattern (including uploadPrefix) and the current {Platform}-{Variant}-*.txt file naming.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tools/devops/automation/templates/tests/run-tests.yml Adds a pre-check step and conditions the artifact publish on the updated-expected-sizes directory existing.
tests/dotnet/UnitTests/AppSizeTest.cs Refines failure messaging for app size + preserved API diffs, and centralizes the “how to update” hint logic.
.github/skills/update-expected-app-size/SKILL.md Updates documentation to reflect actual artifact name pattern and realistic expected file naming examples.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #d424e44] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: d424e446049449aae982deb02d29657fb4ef7888 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #d424e44] Build passed (Build packages) ✅

Pipeline on Agent
Hash: d424e446049449aae982deb02d29657fb4ef7888 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: d424e446049449aae982deb02d29657fb4ef7888 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #d424e44] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: d424e446049449aae982deb02d29657fb4ef7888 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne enabled auto-merge (squash) May 27, 2026 06:12
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🚀 [CI Build #d424e44] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 183 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. [attempt 3] Html Report (VSDrops) Download
✅ generator: All 5 tests passed. (⚠️ Html Report Publish failed ⚠️) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ linker (iOS): All 11 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. [attempt 3] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. (⚠️ Html Report Publish failed ⚠️) Download
✅ monotouch (tvOS): All 18 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. (⚠️ Html Report Publish failed ⚠️) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: d424e446049449aae982deb02d29657fb4ef7888 [PR build]

@rolfbjarne rolfbjarne merged commit 9be4da4 into main May 27, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants