Skip to content

Add an Android audio end-to-end test without the native playout probe - #253

Open
sierpinskid wants to merge 1 commit into
mainfrom
feature/uni-228-android-e2e-audio-test
Open

sierpinskid wants to merge 1 commit into
mainfrom
feature/uni-228-android-e2e-audio-test

Conversation

@sierpinskid

Copy link
Copy Markdown
Member

Summary

  • Adds CallAudioTests and PlayerTestResultLogger so a player can check signaling, capture, send, receive, and playback. Editor CI never compiles the native audio path (STREAM_NATIVE_AUDIO is player-only).
  • Adds an internal GetAudioPlayoutStats binding and InternalsVisibleTo("StreamVideo.Tests.Runtime"). The test does not call the binding. STREAM_NATIVE_PLAYOUT_PROBE is not defined, because main's libwebrtc.aar does not export that symbol.
  • Leaves RTCIceCandidate.cs, the Editor test asmdef, DeviceFarmTestPlayerBuild, and both Firebase scripts out of this diff. Unity floor stays 2021.3.

Phone run

Phone run not done. No Android device was attached (adb devices was empty on this machine), so there is no [Audio E2E] line from this tree.

When a phone is available, the run still has these limits:

  • Editor playback does not fail this test. totalSamplesReceived can advance in the Editor even when the AudioSource is disabled.
  • OS routing (earpiece versus speaker) is not covered.
  • GetAudioPlayoutStats is not called.

Test plan

  • Existing CI EditMode and PlayMode jobs, including the 2021.3 rows. If Linux PlayMode actually runs CallAudioTests and fails on a silent microphone, ignore the test under UNITY_EDITOR. Do not weaken the device energy assertions.
  • Android IL2CPP sample build still succeeds.
  • Do not merge without an approving review.
  • With a USB phone, STREAM_TESTS_ENABLED and IL2CPP on the Android target only, record the [Audio E2E] Measured audio flow: line.

Made with Cursor

The native playout probe stays off until the vendored binary exports GetAudioPlayoutStats.

Co-authored-by: Cursor <cursoragent@cursor.com>
@getstream-metis

Copy link
Copy Markdown

👋 Hi Daniel, want a second pair of eyes on this?

I'm Jeffery, Stream's review agent. I look for bugs, regressions, missing tests and slow paths, and I only post findings I've checked against the code.

  • Review this PR

Or comment /jeffery review. I'll stay quiet unless you ask.

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