-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[WEBRTCR] Send command to DUT via websocket in CI #41486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR automates manual steps in WEBRTCR certification tests by sending commands to the DUT over a WebSocket during CI.
- Add a WebSocket client (websockets) and helper method to send DUT commands in CI paths.
- Replace manual prompts with automated pairing and session-establishment commands; add log-based waits for expected DUT output.
- Update CI test-runner hints to run the camera controller in interactive server mode.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
src/python_testing/TC_WEBRTCR_2_1.py | Adds WebSocket-based CI automation for pairing and establishing a session (with offer-type). |
src/python_testing/TC_WEBRTCR_2_2.py | Adds WebSocket CI automation; waits for NOT_FOUND; contains unconditional resp assignment bug. |
src/python_testing/TC_WEBRTCR_2_5.py | Adds WebSocket CI automation; waits for PeerConnection Connected. |
src/python_testing/TC_WEBRTCR_2_6.py | Adds WebSocket CI automation; waits for NOT_FOUND; contains unconditional resp assignment bug. |
src/python_testing/TC_WEBRTCR_2_7.py | Adds WebSocket CI automation; waits for CONSTRAINT_ERROR; contains unconditional resp assignment bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request automates manual steps in WebRTC CI tests by sending commands via WebSocket, which is a great improvement. My review focuses on improving code maintainability and fixing a few issues. There is significant code duplication with the send_command
method and related constants across five test files, which I recommend refactoring into a shared base class. I've also identified a recurring issue where a blocking wait()
call is used in an async
context, which can freeze the event loop. More critically, three of the test files contain a logical bug that unconditionally overwrites a response variable, likely causing tests to pass incorrectly. Addressing these points will make the new test automation more robust and maintainable.
PR #41486: Size comparison from 6487f90 to 2dd4cf2 Full report (10 builds for cc13x4_26x4, cc32xx, nrfconnect, realtek, stm32)
|
2dd4cf2
to
5ef2682
Compare
PR #41486: Size comparison from e28044e to 594e597 Full report (34 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41486 +/- ##
==========================================
+ Coverage 51.02% 51.03% +0.01%
==========================================
Files 1386 1385 -1
Lines 100982 100943 -39
Branches 13077 13059 -18
==========================================
- Hits 51526 51520 -6
+ Misses 49456 49423 -33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
453393f
to
9e081a1
Compare
PR #41486: Size comparison from 69f67fb to 3a860ea Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3a860ea
to
44499af
Compare
PR #41486: Size comparison from c15b122 to 44499af Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41486: Size comparison from c15b122 to 03a3998 Increases above 0.2%:
Full report (34 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
|
03a3998
to
2eee249
Compare
PR #41486: Size comparison from 6c3dd11 to 2eee249 Full report (36 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
Currently, we skips certain manual steps in CI for WEBRTCR test cases.
Send command to DUT via websocket to simulate those manual steps in CI
Related issues
N/A
Testing
Validate by CI
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines