Skip to content

fix(project): wire DayflowUITests target to its own source folder#313

Open
praxstack wants to merge 1 commit into
JerryZLiu:mainfrom
praxstack:pr4-fix-dayflowuitests-not-built
Open

fix(project): wire DayflowUITests target to its own source folder#313
praxstack wants to merge 1 commit into
JerryZLiu:mainfrom
praxstack:pr4-fix-dayflowuitests-not-built

Conversation

@praxstack

@praxstack praxstack commented Jul 7, 2026

Copy link
Copy Markdown

what

DayflowUITests never actually built or ran. Every attempt (xcodebuild ... -only-testing:DayflowUITests test) failed with:

Failed to load the test bundle. (Underlying Error: The bundle "DayflowUITests"
couldn't be loaded because its executable couldn't be located.)

root cause

DayflowUITests had no PBXFileSystemSynchronizedRootGroup entry at all — unlike its siblings Dayflow and DayflowTests, which each have one. Xcode 16+'s synced-group mechanism is how a target's source folder gets auto-discovered without listing every file explicitly; without that entry, Xcode had literally no path to Dayflow/DayflowUITests/. Build logs confirmed it: an empty-DayflowUITests.plist gets generated, and the .xctest bundle ships with zero compiled executable.

fix

Mirrors the existing DayflowTests wiring exactly: a new synced-group entry pointing at the DayflowUITests folder, referenced from the target's fileSystemSynchronizedGroups and the top-level group's children. 3 lines total, same shape as the working DayflowTests entry.

verification

# before
$ xcodebuild -scheme Dayflow -only-testing:DayflowUITests test
Failed to load the test bundle... couldn't be located
** TEST FAILED **

# after
$ file .../DayflowUITests.xctest/Contents/MacOS/DayflowUITests
Mach-O 64-bit bundle arm64

$ xcodebuild -scheme Dayflow -only-testing:DayflowUITests test
** TEST SUCCEEDED **
Test case 'DayflowUITests.testExample()' passed (4.704 seconds)
Test case 'DayflowUITests.testLaunchPerformance()' passed (16.034 seconds)
Test case 'DayflowUITestsLaunchTests.testLaunch()' passed (3.554 seconds)
Test case 'DayflowUITestsLaunchTests.testLaunch()' passed (3.254 seconds)

the launch tests drive a real XCUIApplication launch — not stubs. re-ran -only-testing:DayflowTests afterward to confirm no regression: 6/6 still pass.



Follow-up hardening pass (2026-07-08)

Re-verified end-to-end: xcodebuild ... -only-testing:DayflowUITests test -> TEST SUCCEEDED, 4/4 tests pass (testExample, testLaunchPerformance, testLaunch x2 -- all driving a real XCUIApplication launch). Also confirmed the structural fix independently: build-for-testing produces a real Mach-O executable at DayflowUITests.xctest/Contents/MacOS/DayflowUITests (pre-fix, that bundle had no executable at all).

(One re-run mid-session hit a transient "Timed out while enabling automation mode" -- isolated to UI-automation initialization under accumulated load from repeated test invocations, not a code defect: plain unit tests kept passing throughout, and re-running with a normal automation-timeout allowance passed cleanly 4/4. Not app-instance-related -- the tests pass with or without a production app running.)

The DayflowUITests target had no PBXFileSystemSynchronizedRootGroup entry
at all — unlike its siblings Dayflow and DayflowTests, which each have
one. This meant Xcode had no path to discover DayflowUITests.swift or
DayflowUITestsLaunchTests.swift: builds silently produced an
"empty-DayflowUITests.plist" and the .xctest bundle never got a compiled
executable, so any attempt to run it failed with "the bundle's executable
couldn't be located."

Fix mirrors the existing DayflowTests wiring exactly: a new synced-group
entry for the DayflowUITests folder, referenced from the target's
fileSystemSynchronizedGroups and the top-level group's children.

Verified end-to-end, not just theorized:
- Before: xcodebuild ... -only-testing:DayflowUITests test ->
  "Failed to load the test bundle... couldn't be located"
- After: clean rebuild produces a real Mach-O executable at
  .../DayflowUITests.xctest/Contents/MacOS/DayflowUITests
- xcodebuild ... -only-testing:DayflowUITests test -> ** TEST SUCCEEDED **
  (4/4 tests pass, including two that drive a real XCUIApplication launch)
- Re-ran -only-testing:DayflowTests afterward: 6/6 still pass, no regression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant