Skip to content
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

Provide tools to test a player #388

Closed
wants to merge 1 commit into from
Closed

Provide tools to test a player #388

wants to merge 1 commit into from

Conversation

MGaetan89
Copy link
Member

@MGaetan89 MGaetan89 commented Jan 5, 2024

Pull request

Description

This PR aims to provide some tools to be able to easily test a player.

Changes made

  • Created a PlayerIdlingResource to wait until the player under test reaches a specific state
  • Created an ExoPlayerRule that setup the player
  • Created TestSimpleProgressTrackerState to show how to use these two new classes

Warning

This PR is in draft because for the moment the player under test remains in the buffering state. Once this is fixed (and probably TestSimpleProgressTrackerState too), PlayerIdlingResource and ExoPlayerRule can be moved to pillarbox-player-testutils.

Note

These new classes are only necessary when we need to directly access the player. Otherwise, ExoPlayerTestRunner from media3-test-utils is probably a better solution, as it already takes care of setting up the player, handling state change, and providing various assertions. ExoPlayerTest shows various examples of how to use that class (look for ExoPlayerTestRunner.Builder).

Checklist

  • Your branch has been rebased onto the main branch.
  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).
  • All pull request status checks pass.

@MGaetan89 MGaetan89 self-assigned this Jan 5, 2024
@MGaetan89 MGaetan89 linked an issue Jan 5, 2024 that may be closed by this pull request
1 task
@StaehliJ StaehliJ removed a link to an issue Jan 8, 2024
1 task
@MGaetan89 MGaetan89 closed this Jan 17, 2024
@MGaetan89 MGaetan89 deleted the player-test branch January 17, 2024 07:48
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