Hive
feat: Upload and visualize test attachments (e.g. snapshot diff images)
GitHub issue · Open
Summary
Support uploading and displaying test attachments — such as screenshot diffs from failed snapshot tests — directly in Tuist’s test results UI.
Motivation
Many teams use snapshot testing (e.g. with swift-snapshot-testing) and when a test fails, developers need to compare the reference image, the actual image, and the diff. Currently, building infrastructure to store and visualize these failing snapshot test artifacts is a hassle for users, requiring custom tooling and separate storage solutions.
This came up from a user request:
Is it possible to add uploading diff images by failed test? It will be more convenient to check my test failed.
This is a common need across teams using snapshot testing, and having first-class support in Tuist would significantly improve the developer experience for diagnosing test failures.
Proposed Solution
- Allow test attachments (images, files) to be uploaded alongside test results
- Display attachments (especially images) in the test results dashboard
- Support common snapshot testing patterns: reference image, actual image, and diff image
- Consider integration with
xcresultbundles which already contain test attachments
Use Cases
- Snapshot testing: View reference vs. actual vs. diff images for failed visual regression tests
- UI testing: View screenshots captured during XCUITest runs
- General test artifacts: Attach any file generated during test execution for later inspection