Skip to content

Add modern test result format support for Xcode 16+#14

Open
DominikPalo wants to merge 7 commits into
mainfrom
feature/support-for-modern-test-results
Open

Add modern test result format support for Xcode 16+#14
DominikPalo wants to merge 7 commits into
mainfrom
feature/support-for-modern-test-results

Conversation

@DominikPalo
Copy link
Copy Markdown
Member

  • 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

@DominikPalo DominikPalo force-pushed the feature/support-for-modern-test-results branch from 6068ed9 to 9407099 Compare January 27, 2026 14:13
@jozefizso
Copy link
Copy Markdown
Member

@codex review

@jozefizso jozefizso self-assigned this Apr 8, 2026
DominikPalo and others added 7 commits April 8, 2026 16:09
- 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.
@jozefizso jozefizso force-pushed the feature/support-for-modern-test-results branch from c36fa7f to 0257b98 Compare April 8, 2026 14:09
@jozefizso jozefizso marked this pull request as ready for review April 8, 2026 14:10
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/formatter.ts
Comment on lines +79 to +81
if (xcodeVersion >= 16) {
const modernResult = await this.parser.parseModernTests()
return this.formatModern(modernResult, options)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread src/formatter.ts
Comment on lines +973 to +974
if (node.nodeType === 'Test Case') {
const testCase: TestCaseInfo = {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@jozefizso jozefizso force-pushed the feature/support-for-modern-test-results branch from 1b26dec to 0257b98 Compare April 8, 2026 14:41
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.

2 participants