Fix the run destination OS name by floze-the-genius · Pull Request #429 · XCTestHTMLReport/XCTestHTMLReport · GitHub
Skip to content

Fix the run destination OS name - #429

Open
floze-the-genius wants to merge 1 commit into
XCTestHTMLReport:mainfrom
floze-the-genius:fix/364-device-os-name
Open

floze-the-genius wants to merge 1 commit into
XCTestHTMLReport:mainfrom
floze-the-genius:fix/364-device-os-name

Conversation

@floze-the-genius

@floze-the-genius floze-the-genius commented Aug 11, 2026 •

Copy link
Copy Markdown

Summary

  • derive the destination platform name from ActionSDKRecord.name instead of hardcoding iOS
  • strip the simulator prefix and SDK version before rendering it beside the actual device OS version
  • generate a real macOS .xcresult alongside the existing iOS fixtures and assert both rendered platform names

Validation

  • hosted macOS/Xcode validation: real iOS and macOS fixture generation, then 24 tests with 1 expected skip and 0 failures
  • the same hosted run passes SwiftFormat, SwiftLint, and ShellCheck
  • local swift build --target XCTestHTMLReportCore passes
  • exported macOS metadata confirms targetSDKRecord.name = macOS 15.5 and operatingSystemVersion = 15.5

My local machine only has Command Line Tools, so the full Xcode-only fixture and test pipeline was run on the linked hosted macOS runner before opening this PR.

Fixes #364

AI assistance: Codex helped with implementation and validation; I reviewed the diff and verified every result reported above.

Summary by CodeRabbit

  • New Features

    • Reports now identify the device operating system dynamically, including macOS and iOS.
    • Device details display the correct platform name alongside the operating-system version.
  • Bug Fixes

    • Corrected device labels that previously displayed “iOS” for non-iOS test results.
    • Improved handling of simulator and platform names in generated HTML reports.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.gitignore:
- Line 4: Update the MacOSResults ignore rule to target only the generated
source path, while allowing
Tests/XCTestHTMLReportTests/Resources/MacOSResults.xcresult to remain tracked
for Package.swift and CoreTests.swift.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c491afe-3289-47a5-8de5-1b954d732de0

📥 Commits

Reviewing files that changed from the base of the PR and between 822129f and dc77ec6.

📒 Files selected for processing (10)
  • .gitignore
  • Package.swift
  • Sources/XCTestHTMLReportCore/Classes/HTMLTemplates.swift
  • Sources/XCTestHTMLReportCore/Classes/Models/RunDestination.swift
  • Sources/XCTestHTMLReportCore/HTML/device.html
  • Tests/XCTestHTMLReportTests/CoreTests.swift
  • XCTestHTMLReportSampleApp/MacOSResultFixture/Package.swift
  • XCTestHTMLReportSampleApp/MacOSResultFixture/Sources/Fixture/Fixture.swift
  • XCTestHTMLReportSampleApp/MacOSResultFixture/Tests/FixtureTests/FixtureTests.swift
  • prepareTestResults.sh

Comment thread .gitignore

This branch has not been deployed

No deployments
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.

Device OS name is not correct

1 participant