Skip to content

Verify Swift OTLP delivery across XCUITest runner replacement - #68

Draft
pda wants to merge 6 commits into
mainfrom
swift-otel-collector-examples
Draft

Verify Swift OTLP delivery across XCUITest runner replacement#68
pda wants to merge 6 commits into
mainfrom
swift-otel-collector-examples

Conversation

@pda

@pda pda commented Aug 25, 2026

Copy link
Copy Markdown
Member

Why

The XCUITest reproduction in #65 shows that the proprietary Swift collector uploader can lose completed executions when Xcode replaces the test runner mid-suite. buildkite/bktest#12 replaces that uploader with test root spans sent over OTLP, so the examples need to exercise both direct export and the hosted macOS relay path before that change lands.

What

  • point the Swift XCTest and XCUITest examples at the collector branch from buildkite/bktest#12
  • export XCTest executions directly over OTLP and send hosted XCUITest executions through the bktec OTLP relay
  • retain the runner-replacement reproduction and verify that .xcresult contains all five test records while all four completed XCTest callbacks are accepted over OTLP
  • assert and document the remaining active-test limit: the deliberately SIGKILLed test cannot emit a span because XCTest never delivers its completion callback

Related reproduction: #65

pda and others added 5 commits August 25, 2026 17:25
Extend the green XCUITest fixture with a crash-once marker persisted by
the target app. Two tests finish before the UI test runner kills itself;
Xcode then replaces the runner and continues the remaining tests.

Capture collector debug output and compare its unique uploaded test names
with the completed xcresult. The local reproduction retains all five tests
in xcresult but records only the two tests run after replacement. Keep an
intentional post-restart assertion failure to prove execution tags, source
location, and expanded backtrace remain available on delivered traces.

The pipeline step is soft-failed because this branch is intentionally a
failing regression fixture until the collector gains durable delivery.

Amp-Thread-ID: https://ampcode.com/threads/T-01a036f0-4e44-73ab-a085-68af2e00b5cb
Co-authored-by: Amp <amp@ampcode.com>
Run the XCTest example against the OTLP-only collector branch and use the bktec relay for hosted macOS XCUITest. Verify that every completed execution reaches the relay across XCTest runner replacement while documenting the unavoidable active-test SIGKILL gap.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037c7-e3e7-70e4-b18f-a43cec542d56
Co-authored-by: Amp <amp@ampcode.com>
Upgrade the Tests plugin so it can install the bktec relay release candidate, and resolve both Swift examples with Swift 6.0-compatible transitive versions.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037c7-e3e7-70e4-b18f-a43cec542d56
Co-authored-by: Amp <amp@ampcode.com>
Lower the Linux example manifest to Swift tools 5.10 and pin the
transitive collector graph to versions that compile with Swift 5.10/Xcode
15.4.

Teach the XCUITest result verifier to read both the modern test-results
summary and the legacy XCResult action schema. This keeps the hosted macOS
check strict about all five records, including the deliberately killed runner,
without requiring a newer xcresulttool.

Amp-Thread-ID: https://ampcode.com/threads/T-01a037c7-e3e7-70e4-b18f-a43cec542d56
Co-authored-by: Amp <amp@ampcode.com>
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