Can't export Test artifacts


We’ve not had any issues using the xcode-test step, as it works like a charm :+1:

However, we have found an inconsistency in the way it exports the Test artifacts. We’re currently using the Snapshot-Testing library from Pointfreeco, that exports some XCTAttachments when there’s a diff between a reference and a failed screenshot test.

Thanks to your Test Addon, we’re able to see these attachments in the Test Artifacts tab and check what has happened, but we cannot export them out from a Script step as these attachments are not available neither in the $BITRISE_XCRESULT_PATH nor in the $BITRISE_TEST_DEPLOY_DIR .

Being more specific, when we join remotely we can see those attachments here:


but once we download the zip after the Deploy step, it does not contain the Staging and subsequent folders (it’s just /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput538637142/Test.xcresult/).

Could you help us here?

Hi @enrique.delpozo,

Thank you for reaching out.

Can you provide a link to a build that reproduces this behaviour please?


Sure, this one should reflect the issue

Hi @enrique.delpozo,

I was on sick leave this past little while (bad flu!) so I’m very sorry for the delay in getting back to you. With that said, I am back on the saddle and I hope to check this out shortly. Either me or another person on our team will get back to you soon.


No worries at all, and I hope you are better now :pray:

Alright, we’re looking forward to hearing from you :+1:


FIrst, I’m glad to hear Xcode-test is working like a charm!

To be honest, I’m not exactly sure how the test artifacts are collected/deployed/etc. I suspect the following lines in your build log may be part of what is going on:

Export UITest Artifacts (export_uitest_artifacts) turned on, but Xcode version >= 11. The test result bundle structure changed in Xcode 11 it does not contain TestSummaries.plist and Attachments directly, nothing to export.

I will check and try to get more specifics on what is going on and if there is a possible solution.

Since you know the path of these attachments, I wonder if a script test before deploy to to copy the contents of that directory to $BITRISE_XCRESULT_PATH or $BITRISE_TEST_DEPLOY_DIR would work?

Yeah, Xcode 11 is supposed to not export those attachments anymore but that’s why it’s a bit weird to me that Bitrise manages to display them in the Test Addon.

We’re currently running a script to export all the paths right after the xcode-test step, but all of them are empty. :frowning:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.