Skip to content

When using XCTIssue the detailedDescription becomes and attachment, but xcresulttool does not show it, and as a result the attachment is lost #60

@acecilia

Description

@acecilia

Hi 👋

This is not so much of an issue in XCResultKit; it is an issue in xcresulttool - but I believe is worth tracking it here in case is related to the usage of --legacy flag.

When recording an XCTIssue:

let issue = XCTIssue(
    type: .system,
    compactDescription: "Main failure message",
    detailedDescription: error.localizedDescription,
    sourceCodeContext: XCTSourceCodeContext(
        location: .init(
            filePath: file,
            lineNumber: line
        )
    ),
    associatedError: error
)
testRun.record(issue)

The value of property detailedDescription shows in the xcresult as an attachment with name Complete Issue Description.txt:

Image

When invoking xcrun xcresulttool get --path Result.xcresult --format json --legacy, the attachment Complete Issue Description.txt is not present in the resulting json.

As a result, the information propagated via detailedDescription is lost

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions