Skip to content

[Feature Request] Add diffed image attachment support for swift-testing #1009

@Kyle-Ye

Description

@Kyle-Ye

Describe the bug

https://forums.swift.org/t/pitch-image-attachments-in-swift-testing/80867

swift-testing will add image attachment support soon.

Use the issue to track attachment support for swift-testing in this framework

Expected behavior

Show the diffed image attachment in Xcode or diffed image in console.

Additional context

if !attachments.isEmpty {
#if !os(Linux) && !os(Android) && !os(Windows)
if ProcessInfo.processInfo.environment.keys.contains("__XCODE_BUILT_PRODUCTS_DIR_PATHS"),
!isSwiftTesting
{
XCTContext.runActivity(named: "Attached Failure Diff") { activity in
attachments.forEach {
activity.add($0)
}
}
}
#endif
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions