Add modern test result format support for Xcode 16+#14
Conversation
DominikPalo
commented
Jan 27, 2026
- Add ModernTestResult types for new xcresulttool JSON format
- Implement parseModernTests() to extract tests via xcresulttool
- Add formatModern() to generate test reports from modern format
- Auto-detect format: try modern first, fall back to legacy
6068ed9 to
9407099
Compare
|
@codex review |
- Add ModernTestResult types for new xcresulttool JSON format - Implement parseModernTests() to extract tests via xcresulttool - Add formatModern() to generate test reports from modern format - Auto-detect format: try modern first, fall back to legacy Co-Authored-By: Claude (anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
Move Xcode version detection from Parser to Formatter, making parseModernTests() always return a result and rename parse() to parseLegacy() for clarity. Remove unused exportObject() method and legacy flag handling from toJSON().
Regenerate expected output for modern test result format parsing and preserve legacy fixtures for backwards compatibility testing.
Match xcresulttool's actual schema naming for Xcode 16+ test results. Rename types and add JSON schema from xcresulttool documentation.
c36fa7f to
0257b98
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0257b98626
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (xcodeVersion >= 16) { | ||
| const modernResult = await this.parser.parseModernTests() | ||
| return this.formatModern(modernResult, options) |
There was a problem hiding this comment.
Restore fallback when modern parsing omits build failures
This early return sends every Xcode 16 run through formatModern() and skips the legacy branch that parses buildResult.logRef, annotations, and coverage. In builds that fail before tests start, the report now shows an empty/neutral test summary instead of the compile/link errors, so CI checks can miss real failures. Please keep a fallback to the legacy flow (or otherwise parse build logs) when modern test-results data is missing or insufficient.
Useful? React with 👍 / 👎.
| if (node.nodeType === 'Test Case') { | ||
| const testCase: TestCaseInfo = { |
There was a problem hiding this comment.
Count per-run executions in modern test traversal
The traversal only treats nodeType === 'Test Case' as an executable result, but modern xcresult trees also represent repeated/parameterized executions as Test Case Run nodes. That collapses multiple runs into a single case, which underreports totals/duration and can hide run-level failures in the generated summary/details. Include Test Case Run nodes (or expand repetition nodes) when aggregating modern results.
Useful? React with 👍 / 👎.
1b26dec to
0257b98
Compare