`tuist test` not showing failure information

I had a test failure on a project I just started, which uses Tuist. In Xcode, this information is in the failure log:

Issue recorded: Snapshot "light" does not match reference.

@−
"file:///Users/connorneville/Documents/Development/CleanFoundry/cf-dev-agent/Worktrees/CFS-40/Targets/AppRootFeatureUITests/Sources/__Snapshots__/AppRootFeatureViewTests/AppRootFeatureView.light.png"
@+
"file:///Users/connorneville/Library/Developer/CoreSimulator/Devices/373C14AE-E256-429D-A562-6CAFFA74EEAA/data/tmp/AppRootFeatureViewTests/AppRootFeatureView.light.png"

To configure output for a custom diff tool, use 'withSnapshotTesting'. For example:

    withSnapshotTesting(diffTool: .ksdiff) {
      // ...
    }

Newly-taken snapshot does not match reference.

However, when I tuist test, all I see is:

Test Suite 'All tests' passed at 2025-06-19 18:59:53.122.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test run started.
Suite "AppRootFeatureView Tests" started
    ⚠️  Test "Snapshot test for AppRootFeatureView" recorded an issue with 2 argument(s)
Suite "AppRootFeatureView Tests" failed after 0.274 seconds with 1 issue(s)

(notably, the tuist test output doesn’t say what the recorded issue is). The log in /Users/connorneville/.local/state/tuist/logs/ shows the specific issue being recorded, though. tuist test --verbose also doesn’t include the specific failure reason. I’m curious what it is about these “recorded issues” - which swift-snapshot-testing seems to use this framework for, that results in this output not being surfaced.

I’m on Tuist 4.53.4.

Hey!

tuist test pipes the output the output through xcbeautify whereas tuist test --verbose shows directly the xcodebuild output. This just might be a foundational difference of how logs are presented in Xcode vs. xcodebuild. I’d suggest using xcodebuild test directly to gather the output and then ask in the swift-issue-reporting if they know why the output is not there. This is not really a Tuist specific issue.

Note that we soon plan to bring Test Insights, similar to Build Insights, so you can:

  • see the failure directly in the run detail in the Tuist dashboard
  • we will even show you the snapshot directly

For now, you can rely on tuist test uploading the .xcresult bundle, so you can inspect the failure from the CI there. What we’ve typically seen is tuist test being used primarily on the CI over local environments.

1 Like

Makes sense on all counts, thank you Marek! This project is being built primarily by an LLM agent I’m building, so my primary concern is establishing a workflow where failures are visible/actionable. Using xcodebuild test locally seems like a fine path forward, and I’ll dig a bit more into why IssueReporting seems at odds with xcbeautify.

A bit more digging: the core issue seems to be this; that xcbeautify is suppressing the details of any swift-testing tests that use arguments.

1 Like