XCResultKit
XCResultKit copied to clipboard
When using XCTIssue the detailedDescription becomes and attachment, but xcresulttool does not show it, and as a result the attachment is lost
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:
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