XCode15 and iOS 17.2 reports are not including screenshots · Issue #357 · XCTestHTMLReport/XCTestHTMLReport · GitHub
Skip to content

XCode15 and iOS 17.2 reports are not including screenshots #357

Open

Description

@Jagadeeshwar-Reddy

the .xcresult file includes the screenshots and they are shown when opened up in Xcode. But when the screenshots weren't included in the generated HTML report.

Below is what we see when we have selected the attachment
kXCTAttachmentLegacySynthesizedEvent Download SynthesizedEvent_1_CB96CA19-EDB1-44EE-A591-2AA34822F1E7

Screenshot 2024-06-01 at 8 12 23 PM

Is there a way i can fix this ?

Activity

  1. piofusco commented on Jan 7, 2025

    @piofusco

    Hey there, I am also experiencing this with Xcode 15.2 and 15.4. I'm using iOS 16.0. Is this repository still being maintained? There's a lot of opened issues and little response from any of the maintainers. Curious if this issue is something a OS contributor could fix. Please advise.

  2. tylervick commented on Aug 11, 2026

    @tylervick
    Member

    I cannot confirm or refute this yet, and the reason is worth stating plainly: the image-attachment path has no test coverage at all.

    Generating a report from the project's own fixture on main (822129f) and counting what lands in the HTML:

    count
    .mp4 references 16
    .png / .jpeg references 0
    rendered img class="screenshot" 0

    The templates for screenshots exist (HTML/screenshot.html), but nothing in the fixture suite exercises them — since Xcode 15 the sample tests produce screen recordings rather than screenshots. Tests/XCTestHTMLReportTests/CliTests.swift even carries a commented-out image assertion with a note saying a separate fixture with screenshots enabled is needed. That was never added.

    So the honest position is: the screenshot rendering path could be entirely broken and every test here would still pass. Your report may well be a real bug; I have no evidence either way, which is itself the problem.

    Tracked as a coverage gap in #393. A fixture that attaches real screenshots is the prerequisite for investigating this, so #393 blocks this issue rather than merely relating to it.

    One detail from your screenshot that may matter: the attachment shown is kXCTAttachmentLegacySynthesizedEvent, which is a synthesized UI event rather than a screenshot attachment. If your report contains those but no kXCTAttachmentScreenshot entries, the missing images may be an artifact of how the run captured attachments rather than of rendering. If you can share the output of xcrun xcresulttool get --format json --legacy --path <your>.xcresult filtered to attachment names, that would settle which of the two it is.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions