Add realtime voice agent WebSocket tests - #50409
Open
Mike Guo (guotuofeng) wants to merge 2 commits into
Open
Conversation
Mike Guo (guotuofeng)
added this pull request to stack #50411
September 11, 2026 00:50
This was referenced Sep 11, 2026
Mike Guo (guotuofeng)
marked this pull request as ready for review
September 11, 2026 00:51
Mike Guo (guotuofeng)
requested review from
a team,
Darren Cohen (dargilco),
Gerardo Lecaros (glecaros),
Glenn Harper (glharper),
Jose Alvarez (jpalvarezl),
Kaylie (kaylieee) and
Ryan Hurey (rhurey)
as code owners
September 11, 2026 00:51
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Moderate WebSocket coverage and voice-definition round-trip assertion gaps remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds deterministic WebSocket/WSS loopback tests and voice-agent serialization coverage for Azure AI Agents.
Changes:
- Tests protocol, authentication, headers, options, events, operations, errors, and close behavior.
- Adds voice-definition round-trip tests and local TLS fixtures.
- Updates conversation and memory-store playback tests.
File summaries
| File | Summary |
|---|---|
sdk/ai/azure-ai-agents/src/test/resources/websocket-localhost-key.pem |
Test TLS private-key fixture. |
sdk/ai/azure-ai-agents/src/test/resources/websocket-localhost-cert.pem |
Test TLS certificate fixture. |
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/VoiceAgentWebSocketSessionTests.java |
WebSocket and loopback tests. Moderate findings: missing custom-header assertion (3 votes), missing sync function-call response/order assertions (3 votes), and missing bounded-queue/outstanding-send coverage (2 votes). |
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentDefinitionSerializationTests.java |
Voice-definition serialization tests. Moderate findings: incomplete nested round-trip assertions (2 votes) and insufficient end_conversation subtype verification (1 vote). |
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresTests.java |
Updated memory-store names. |
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/MemoryStoresAsyncTests.java |
Updated asynchronous memory-store names. |
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsTests.java |
More robust message selection. |
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/ConversationsAsyncTests.java |
More robust asynchronous message selection. |
Review details
Suppressed comments (1)
sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/models/VoiceAgentDefinitionSerializationTests.java:76
- The serialized value is
VoiceAgentEndConversationSystemTool, but this assertion accepts anyVoiceAgentSystemTool. SinceVoiceAgentTool.fromJsondispatches the system subtype by name, checking only the base class will miss a broken discriminator and fail to verify thatend_conversationsurvives the round trip.
assertInstanceOf(VoiceAgentSystemTool.class, voice.getTools().get(1));
- Files reviewed: 8/8 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Mike Guo (guotuofeng)
removed this pull request from stack #50411
September 11, 2026 01:13
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 01:13
3cada78 to
a6e41f8
Compare
Mike Guo (guotuofeng)
added this pull request to stack #50413
September 11, 2026 01:13
6 tasks
|
Azure Pipelines: Successfully started running 278 pipeline(s). 36 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
1 similar comment
|
Azure Pipelines: Successfully started running 278 pipeline(s). 36 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 02:18
774d47a to
cd722d1
Compare
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 02:25
cd722d1 to
851cc37
Compare
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 02:29
851cc37 to
af75818
Compare
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 03:48
af75818 to
5917165
Compare
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 05:48
5917165 to
dddbe02
Compare
Mike Guo (guotuofeng)
force-pushed
the
myguo/voice-websocket-tests
branch
from
September 11, 2026 06:07
dddbe02 to
686d222
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fourth PR in stack #50413, based on #50408. Adds deterministic protocol/model tests and local WS/WSS loopback coverage for the production implementation below it.
Coverage includes authentication, headers, query options, typed events, text/audio/tool operations, ordering, buffering, malformed frames, close behavior, rejected handshakes, voice-definition serialization, and updated conversation/memory playback tests. Local TLS certificate fixtures are test-only.
Stack:
Validation: Maven passed all six changed test classes:
ConversationsAsyncTests,ConversationsTests,MemoryStoresAsyncTests,MemoryStoresTests,VoiceAgentWebSocketSessionTests, andVoiceAgentDefinitionSerializationTests.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines