Skip to content

Conviva: add a test suite for the connector - #137

Open
ceyhun-o wants to merge 11 commits into
mainfrom
maintenance/conviva-tests
Open

ceyhun-o wants to merge 11 commits into
mainfrom
maintenance/conviva-tests

Conversation

@ceyhun-o

@ceyhun-o ceyhun-o commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the first automated tests for the Conviva connector, in a new THEOplayerConnectorConvivaTests SwiftPM target with a shared scheme. The target is also added to the CI test loop.

The only production change is a test seam. ConvivaEndpoints gets an internal init(analytics: CISAnalytics), so tests can inject a recording fake that captures every call to the Conviva SDK. There is no public API change.

The test target depends on THEOplayerTHEOliveIntegration, THEOplayerTHEOadsIntegration and Google IMA (iOS only, which the OptiView Ads integration's module imports). Only the test target uses them, so SwiftPM consumers of the connector products don't fetch them.

The tests drive a real THEOplayer (most SDK events have no public init) and cover these areas:

  • Session lifecycle: start, end, restart while paused, a new source vs the same source, and metadata cleared or kept between sessions.
  • Player state: PLAYING, PAUSED, BUFFERING and STOPPED.
  • Errors: a fatal error fails the session once and resets it. A network error is reported as a warning and keeps the session. The network-error test uses https://cdn.theoplayer.com/video/elephants-dream/404/index.m3u8, where the 4th video segment returns HTTP 403.
  • Live and VOD detection: infinite vs finite duration, and a customer-provided isLive is not overwritten.
  • Encoding type: HLS and HESP on the public THEOlive demo channel, and a customer-provided value wins.
  • Bitrate: reported in kbps to the content endpoint, during ads to the ad endpoint, and again for a new session.
  • Ad breaks: pod index, position and serialization, ad events forwarded only during an ad break, failed ad breaks, and OptiView Ads interstitials (past/position).

Results

GitHub CI (Xcode 26.3) passes: 32/32 Conviva tests, including the 3 OptiView Ads interstitial tests. The Sideloaded Subtitle (36) and Uplynk (49) suites, which run after Conviva in the CI loop, also pass.

Known gap, not covered by a test: on HESP/THEOlive, Conviva.streamUrl stays "unknown". It is captured on SOURCE_CHANGE, and the later CURRENT_SOURCE_CHANGE only updates encoding_type.

Link to Devin session: https://dolby.devinenterprise.com/sessions/50c8aced921146a9b29941f29ac495cd
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/50c8aced921146a9b29941f29ac495cd?variant=devin
Requested by: @ceyhun-o

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

ceyhun-o and others added 9 commits November 19, 2026 10:23
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…alytics and run it on CI

Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…errors and player state

Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…annel

Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… the session

Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the maintenance/conviva-tests branch from fde7b17 to f86a7b6 Compare November 19, 2026 10:23
@ceyhun-o
ceyhun-o requested a review from therama November 19, 2026 11:25
@ceyhun-o
ceyhun-o marked this pull request as ready for review November 19, 2026 11:25
ceyhun-o and others added 2 commits November 19, 2026 11:26
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.com>
…ration

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Ceyhun Ozgoc <ceyhun.ozgoc@dolby.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.

2 participants