VPLAY-12242: create l1 or l2 tests reflecting app expectations#1189
VPLAY-12242: create l1 or l2 tests reflecting app expectations#1189psiva01 wants to merge 18 commits intodev_sprint_25_2from
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves an existing unit test for the PrivateInstanceAAMP::Stop() method, replacing a legacy test (stopTest_11) with a more focused, descriptive test (Stop_ActualImplementation_SetsPlayerStateToIdle) that validates the expected player state transition from eSTATE_PLAYING to eSTATE_IDLE after calling Stop().
Changes:
- Replaced the old
stopTest_11withStop_ActualImplementation_SetsPlayerStateToIdle, which explicitly sets the player toeSTATE_PLAYING, callsStop(false), and asserts the final state iseSTATE_IDLE.
There was a problem hiding this comment.
Pull request overview
This PR replaces a legacy, poorly-named unit test (stopTest_11) in PrivAampTests with a clear, intent-driven test (Stop_ActualImplementation_SetsPlayerStateToIdle) that verifies the player transitions from eSTATE_PLAYING to eSTATE_IDLE upon calling Stop(false). This aligns with the goal of creating L1/L2 tests that reflect app expectations around player state changes.
Changes:
- Replaced
stopTest_11(which tested unrelated Fog TSB behavior) withStop_ActualImplementation_SetsPlayerStateToIdle, a focused test verifying the PLAYING → IDLE state transition onStop().
related to player state changes Signed-off-by: psiva01 <sivasubramanian.patchaiperumal@ltts.com>
c57f6b1 to
32df1a9
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds new unit tests intended to validate player state transitions for both the internal PrivateInstanceAAMP and the public PlayerInstanceAAMP surfaces, and wires them into the corresponding utest targets.
Changes:
- Add
PrivateInstanceAAMPstate transition tests covering tune lifecycle, buffering, EOS, and error paths. - Add a
PlayerInstanceAAMPstate test focused onSeek()-driven state transitions. - Extend stream-abstraction test infrastructure to mock
IsInitialCachingSupported()and route the fake implementation through the mock.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utests/tests/PrivateInstanceAAMP/PlayerStateTests.cpp | New state transition tests for PrivateInstanceAAMP using mocks/fakes. |
| test/utests/tests/PrivateInstanceAAMP/CMakeLists.txt | Adds the new PlayerStateTests.cpp to the PrivateInstanceAAMP test target. |
| test/utests/tests/PrivAampTests/PrivAampTests.cpp | Updates a Stop-related test to explicitly assert state transition to IDLE. |
| test/utests/tests/PlayerInstanceAAMP/PlayerStateTests.cpp | New player-facing state transition test (Tune + Seek). |
| test/utests/tests/PlayerInstanceAAMP/CMakeLists.txt | Adds the new PlayerStateTests.cpp to the PlayerInstanceAAMP test target. |
| test/utests/mocks/MockStreamAbstractionAAMP.h | Adds a mock method for IsInitialCachingSupported(). |
| test/utests/fakes/FakeStreamAbstractionAamp.cpp | Routes StreamAbstractionAAMP::IsInitialCachingSupported() through the mock when present. |
Reason for change: Addressed co-pilot review comments Signed-off-by: psiva01 <sivasubramanian.patchaiperumal@ltts.com>
There was a problem hiding this comment.
Pull request overview
This PR adds/updates unit tests to validate AAMP player state transitions (notably tune lifecycle, buffering, error handling, and seek behavior) to better reflect application expectations around state changes.
Changes:
- Add new
PlayerStateTests.cppsuites for bothPrivateInstanceAAMPandPlayerInstanceAAMP. - Extend mocks/fakes to support initial caching and first-frame/first-video-frame-displayed driven state transitions.
- Update existing
PrivAampTestsstop-state test naming and assertions; wire new tests into CMake targets.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utests/tests/PrivateInstanceAAMP/PlayerStateTests.cpp | New unit tests covering end-to-end state transitions for PrivateInstanceAAMP (tune → playing/paused/buffering/complete/error → idle). |
| test/utests/tests/PrivateInstanceAAMP/CMakeLists.txt | Adds the new PrivateInstanceAAMP state test source to the build. |
| test/utests/tests/PrivAampTests/PrivAampTests.cpp | Renames/updates a Stop() test to assert PLAYING → IDLE via Stop(false). |
| test/utests/tests/PlayerInstanceAAMP/PlayerStateTests.cpp | New unit tests for PlayerInstanceAAMP seek flows, including “seek while paused” behavior. |
| test/utests/tests/PlayerInstanceAAMP/CMakeLists.txt | Adds the new PlayerInstanceAAMP state test source to the build. |
| test/utests/mocks/MockStreamAbstractionAAMP.h | Adds IsInitialCachingSupported() to the stream abstraction mock. |
| test/utests/mocks/MockPrivateInstanceAAMP.h | Adds mock declarations needed by updated fakes/state tests (first-frame callbacks + pause pipeline). |
| test/utests/fakes/FakeStreamAbstractionAamp.cpp | Routes IsInitialCachingSupported() through g_mockStreamAbstractionAAMP. |
| test/utests/fakes/FakePrivateInstanceAAMP.cpp | Updates fake state-gating logic for first-frame/first-video-frame-displayed and seek-while-paused; delegates PausePipeline to mock. |
related to player state change Reason for change: Addressed co-piolt review comments Signed-off-by: psiva01 <sivasubramanian.patchaiperumal@ltts.com>
There was a problem hiding this comment.
Pull request overview
Adds new L1/L2-style unit tests to validate AAMP player state transitions (both PrivateInstanceAAMP internals and the PlayerInstanceAAMP public wrapper), aligned to application-observed state changes.
Changes:
- Add new
PlayerStateTests.cpptest suites forPrivateInstanceAAMPandPlayerInstanceAAMP, covering tune/seek/buffering/error flows. - Wire the new test sources into the relevant test targets’
CMakeLists.txt. - Extend/adjust unit-test mocks and fakes to support initial caching and first-frame/first-video-frame-displayed state behaviors.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/utests/tests/PrivateInstanceAAMP/PlayerStateTests.cpp |
New state-transition tests for PrivateInstanceAAMP (tune lifecycle, buffering, error). |
test/utests/tests/PrivateInstanceAAMP/CMakeLists.txt |
Adds PlayerStateTests.cpp to the PrivateInstanceAAMP test target. |
test/utests/tests/PrivAampTests/PrivAampTests.cpp |
Reworks one stop-related test to assert Stop(false) moves state to IDLE. |
test/utests/tests/PlayerInstanceAAMP/PlayerStateTests.cpp |
New state-transition tests for PlayerInstanceAAMP seek flows (including seek-while-paused). |
test/utests/tests/PlayerInstanceAAMP/CMakeLists.txt |
Adds PlayerStateTests.cpp to the PlayerInstanceAAMP test target. |
test/utests/mocks/MockStreamAbstractionAAMP.h |
Adds IsInitialCachingSupported() mock to support buffering/initial caching logic. |
test/utests/mocks/MockPrivateInstanceAAMP.h |
Adds missing mocked methods used by fakes/tests (NotifyFirstFrameReceived, NotifyFirstVideoFrameDisplayed, PausePipeline). |
test/utests/fakes/FakeStreamAbstractionAamp.cpp |
Routes IsInitialCachingSupported() through the global mock when present. |
test/utests/fakes/FakePrivateInstanceAAMP.cpp |
Updates fake state gating for seek-while-paused + first-frame notifications; delegates PausePipeline() to mock. |
There was a problem hiding this comment.
Pull request overview
Adds new unit tests to validate AAMP player state transitions (both PrivateInstanceAAMP and PlayerInstanceAAMP) and extends the existing fake/mock layer to support the new state-related behaviors.
Changes:
- Add
PlayerStateTests.cppsuites forPrivateInstanceAAMPandPlayerInstanceAAMPstate transition expectations. - Update test CMakeLists to compile the new test sources.
- Extend fakes/mocks to support initial caching checks and seek-while-paused “first video frame displayed” behaviors.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utests/tests/PrivateInstanceAAMP/PlayerStateTests.cpp | New lifecycle/buffering/error state transition tests using Tune + notifications |
| test/utests/tests/PrivateInstanceAAMP/CMakeLists.txt | Adds new PrivateInstance state test source to build |
| test/utests/tests/PrivAampTests/PrivAampTests.cpp | Renames/updates a Stop() state transition test |
| test/utests/tests/PlayerInstanceAAMP/PlayerStateTests.cpp | New seek-related state transition tests at PlayerInstance layer |
| test/utests/tests/PlayerInstanceAAMP/CMakeLists.txt | Adds new PlayerInstance state test source to build |
| test/utests/mocks/MockStreamAbstractionAAMP.h | Adds mockable IsInitialCachingSupported() |
| test/utests/mocks/MockPrivateInstanceAAMP.h | Adds additional mocked methods used by new seek/pause behavior |
| test/utests/fakes/FakeStreamAbstractionAamp.cpp | Forwards IsInitialCachingSupported() to the mock when present |
| test/utests/fakes/FakePrivateInstanceAAMP.cpp | Implements seek-while-paused/first-frame state behavior in the fake |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: psiva01 <214551386+psiva01@users.noreply.github.com>
VPLAY-12242: Fix reviewer feedback on player state test infrastructure
|
@copilot open a new pull request to apply changes based on the comments in this thread |
- Create g_mockAampConfig before PrivateInstanceAAMP in SetUp() with safe ON_CALL defaults - Use NotifyFirstVideoFrameDisplayed() in buffering test (real app trigger path) - Align FakePrivateInstanceAAMP::TuneHelper with real gating: gate pause-on-first-frame flags on seekWhilePaused && mSeekOperationInProgress Co-authored-by: psiva01 <214551386+psiva01@users.noreply.github.com> Agent-Logs-Url: https://github.com/rdkcentral/aamp/sessions/d1a46d63-4799-427a-b437-e895b6646cef
…d to player state changes Signed-off-by: psiva01 <sivasubramanian.patchaiperumal@ltts.com>
VPLAY-12242: Fix player state test fixture ordering and fake TuneHelper flag gating
related to player state changes