Skip to main content

About test attachments

Many tests generate image files: screenshot tests, XCUITests, and so on. Bitrise can show these attachments under their associated test cases, so you can view them on the Tests tab of your build page. How to collate the test attachments with test results depends on your test tool and whether it generates an xcresult file.

Supported file formats

Currently, we support the following file formats for attachments:

.jpg, .jpeg, .png, .txt, .log, .mp4, .webm, .ogg

Collating attachments with test resultsClick to copy link​

If your tests generate an xcresult file, Bitrise automatically collates the attachments with their test cases. This requires no further configuration.

If your tests don't generate an xcresult file, you have two options:

Naming attachments after their test caseClick to copy link​

Name a screenshot, recording, or log after the test case that produced it, using the <classname>__<name>[__run<k>]__<label>.<ext> structure, and Bitrise shows it under that test. This requires the Deploy to Bitrise.io Step version 2.26.0 or newer.

For the full instructions, see:

Referencing attachments in the JUnit XMLClick to copy link​

If you can't name the files after their test cases, add a <properties> element to each testcase in your JUnit XML that lists the attachment files, then export the JUnit XML with the Export test results to Test Reports Step. This requires the Step version 1.1.0 or newer.

For the full instructions, see Referencing attachments in the JUnit XML.