Skip to content

fix(xcresult): support new 'Skip Message' test node type#1124

Closed
TylerJang27 wants to merge 2 commits into
mainfrom
claude/fix-xcresult-skip-message-node-type-a9zf
Closed

fix(xcresult): support new 'Skip Message' test node type#1124
TylerJang27 wants to merge 2 commits into
mainfrom
claude/fix-xcresult-skip-message-node-type-a9zf

Conversation

@TylerJang27

Copy link
Copy Markdown
Collaborator

What

Add Skip Message to the TestNodeType enum in the xcresult test-results JSON schema.

Why

Newer Xcode (26.x) xcresulttool emits a Skip Message child node (the XCTSkip reason, analogous to Failure Message) in the output of xcrun xcresulttool get test-results tests. TestNodeType is codegen'd by typify from this snapshotted schema and lacked that variant, so serde rejected the entire document and the whole .xcresult -> JUnit conversion failed:

failed to parse json from xcresulttool output: unknown variant `Skip Message`, expected one of `Test Plan`, ...

Any run containing a skipped test on a newer Xcode lost all of its xcresult-derived results (the --xcresult-path flow failed the whole upload; the glob flow silently dropped the bundle).

Change

One-line schema add; build.rs/typify regenerates #[serde(rename = "Skip Message")] SkipMessage. Skipped tests are already handled via TestResult::Skipped, and all TestNodeType usages are non-exhaustive matches!/filter, so no match arms change. Verified with cargo build -p xcresult.

Follow-ups (not in this PR)

  • Add a regression fixture: an .xcresult with an XCTSkip'd test from the newer Xcode.
  • Harden TestNodeType to tolerate unknown variants so future Apple schema drift degrades gracefully instead of dropping the whole upload.

Sentry: ANALYTICS-CLI-6W2 / ANALYTICS-CLI-6W3

Newer Xcode (26.x) xcresulttool emits a 'Skip Message' child node
(the XCTSkip reason, analogous to 'Failure Message') in the output of
'xcrun xcresulttool get test-results tests'. Our TestNodeType enum is
codegen'd by typify from this snapshotted JSON schema and did not
include that variant, so serde rejected the entire document and the
whole .xcresult -> JUnit conversion failed:

  failed to parse json from xcresulttool output: unknown variant
  `Skip Message`, expected one of `Test Plan`, ...

Any run containing a skipped test on a newer Xcode lost all of its
xcresult-derived results (the --xcresult-path flow failed the whole
upload; the glob flow silently dropped the bundle).

Add 'Skip Message' to the TestNodeType enum so the document parses.
Skipped tests are already handled via TestResult::Skipped, and all
TestNodeType usages are non-exhaustive matches!/filter, so no match
arms change.

Sentry: ANALYTICS-CLI-6W2 / ANALYTICS-CLI-6W3
@trunk-io

trunk-io Bot commented Jun 23, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Mirror the existing Failure Message handling: collect 'Skip Message'
child nodes of a skipped test case and set their text as the JUnit
skipped message. Build-verified; node placement should be confirmed
during QA against a real skip xcresult.
@trunk-staging-io

trunk-staging-io Bot commented Jun 23, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
variant_quarantine_test should be quarantined when run with variant A test expected the sum of 2 + 2 to be 5, but it was 4, indicating a failing assertion. Logs ↗︎

View Full Report ↗︎Docs

@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.61%. Comparing base (282d74d) to head (d13a1bf).

Files with missing lines Patch % Lines
xcresult/src/xcresult.rs 73.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1124      +/-   ##
==========================================
+ Coverage   82.37%   82.61%   +0.24%     
==========================================
  Files          69       69              
  Lines       15381    15396      +15     
==========================================
+ Hits        12670    12720      +50     
+ Misses       2711     2676      -35     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trunk-io

trunk-io Bot commented Jun 23, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants