bluepill icon indicating copy to clipboard operation
bluepill copied to clipboard

Gather attachments from test run

Open dostrander opened this issue 2 years ago • 3 comments

Apple created the XCTAttachment in Xcode 9. This allows for attaching data to a test method execution, things like an image, file, data blob, etc...

Currently there is no way to gather these XCTAttachments from a test run. There are many scenarios where having attachments for post processing or debugging are useful. Specifically around snapshot tests and UI tests.

dostrander avatar Feb 10 '23 14:02 dostrander

@dostrander internally we set the frameworks to write files to output-dir for post-processing. I think by test_env.

Would this be a sufficient workaround?

chenxiao0228 avatar Feb 10 '23 17:02 chenxiao0228

@chenxiao0228 I've been doing that, but it doesn't seem to output any of the XCTAttachments

dostrander avatar Feb 10 '23 17:02 dostrander

Any update on this? Would like to know if there's a work around for XCTAttachements / XCResult file output.

PushpakNarasimhan avatar Aug 17 '23 19:08 PushpakNarasimhan