test(uitests): write failure diagnostics to a file, not print()
Confirmed (pasted full CI log around a timeout, searched for the print()'d marker string, found nothing) that plain print() from inside a UI test never reaches fastlane's xcodebuild log output on this runner - its formatter only relays lines matching its own known patterns and drops everything else. CartCheckoutFlowTests now writes app.debugDescription to NSTemporaryDirectory()+'pedifoods_uitest_diag.log' on each of its three failure points (shared dumpDiagnostics helper, appending), clearing any stale copy in class setUp(). test.yml gained a step after 'Run tests with coverage' (if: always()) that cats that file when present - TMPDIR is stable for the whole CI job, unlike the per-run-hashed workspace path that broke the original screenshot attempt. See decisions/2026-09-11-ui-test-shared-login-session.md follow-up.
This commit is contained in:
@@ -24,3 +24,12 @@ jobs:
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: fastlane tests
|
||||
|
||||
- name: Show UI test failure diagnostics (if any)
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f "$TMPDIR/pedifoods_uitest_diag.log" ]; then
|
||||
cat "$TMPDIR/pedifoods_uitest_diag.log"
|
||||
else
|
||||
echo "No UI test diagnostic log was written."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user