media-hub

* Test plan for component: media-hub

Table of contents:

Dependents/Clients

  • Dash video and music scopes
  • mediaplayer-app
  • music-app
  • webbrowser-app
  • mediascanner
  • gallery-app
  • podbird
  • all other apps that play music or video

Specific Detailed Tests

* You'll want to set the screen auto lock when idle timeout to 30s which will greatly speed up your testing

Test 1

  1. Move to the music scope.
  2. Select a track from the list of "My Music"
  3. On the details page, press the play button beside the track name
  4. Let the phone sleep.
  5. Verify that music playback doesn't stop

Test 2

  1. While the track is playing from the scope and the screen is blank
  2. Press the power button to get back to the scope
  3. Verify that music playback doesn't stop

Test 3

  1. Move to the Music scope.
  2. Select a track from the list of "My Music"
  3. Press the Play in music-app button
  4. Verify that music plays in the music-app

Test 4

  1. Move to the Video scope
  2. Select a video from the grid of the section "My Videos"
  3. Click on Play
  4. Video should play in mediaplayer-app

Test 5

  1. Play a long video in mediaplayer-app
  2. Verify that the screen does not turn off nor dim

Test 6

  1. Play a long video in mediaplayer-app (several minutes)
  2. Verify that the video does not freeze and video/audio playback successfully completes

Test 7

  1. Move to the Video scope
  2. Select a video from the video grid/carousel
  3. Click on Play to play the video from mediaplayer-app
  4. Wait till the video stops (EOS)
  5. Press play button on the mediaplayer-app
  6. Verify that the video plays again, from the beginning, without any issue

Test 8

  1. Move to the Apps Scope
  2. Open the Music app
  3. Select a track play it
  4. Verify that music plays

Test 9

  1. Unplug device
  2. Make sure the device will advance to the next song when the device is not charging

Test 10

  1. Play a video from the grid/carousel
  2. Press the Pause/play button repeatedly (about 15-20 times)
  3. Leave the video in pause state but do not exit the media player app
  4. Ensure the screen still dims and turns off automatically

Test 11

  1. Open camera app
  2. Start video recording
  3. Let it recording for more than 1 minute (or the same amount of time it's set for the screen to be turned off automatically)
  4. Check that the screen doesn't go off automatically

Test 12

  1. Open camera app
  2. Start video recording
  3. While recording, swipe from right->left (dash) and close the camera-app

  4. Check that the device can suspend normally after reaching the screen on/off timeout (default is 1 minute)
  5. Press power to resume the device and try playing the recorded video with gallery or mediaplayer-app/scope
  6. Check that the video was indeed recorded until the point where you closed the camera-app
  7. Open camera-app again and try recording a new video (should work fine as well, without any crash)

Test 13

  1. Start playback of some music using music app
  2. Make sure the device is not in silent mode
  3. Open camera app
  4. Rapid fire snap some images
  5. Verify that the music playback in music continues

Test 14

  1. Start playback of some music using music-app
  2. Do some fast and slow seeking by dragging and tapping along the position bar in music-app
  3. Verify that playback continues from each position as expected
  4. Repeat the same test for video playback from mediaplayer-app

Test Changing Volume Level

  1. Start playback of some music using music app
  2. Make sure the device is not in silent mode
  3. Press volume up & volume down on the device to capture the screen

  4. Verify that the music playback in music continues

Test Telegram Notifications

  1. Start playback of some music using music-app
  2. Make sure the device is not in silent mode
  3. Receive a Telegram notification
  4. Verify that the music playback in music continues

Test 7Digital Playback

  1. Add or navigate to the 7Digital scope
  2. Select any album by tapping on the album artwork
  3. Select a track, within a second or two (depending on your Internet connection speed), playback should begin
  4. Select a different track, make sure that playback switches to playing this new track

Test Playback Without File Extension

  1. Copy a MP3 file with no .mp3 file extension, to /home/phablet/Music on your target device.

  2. Run mediaplayer-app like so from a phone shell:
    • mediaplayer-app /home/phablet/Music/my_music_track --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop

  3. Verify that audio playback begins.

Test Buffering Signal

Optional test until a client takes advantage of this signal

  1. Open https://code.launchpad.net/~lorn-potter/+git/test-buffering in QtCreator and build/run on device

  2. Tap the application button.
  3. Progress bar at bottom should start at 0 and move to 100% and streaming audio should play.
  4. Optional test: Connect to router with QOS (quality of service) and reduce this value to the test device's interface to a low bandwidth and run the test app again.

Test Audio Roles

Music/Video Role

  1. Start music playback from the music-app
  2. Play a video from the video scope
  3. Ensure that music playback in music-app stops and video playback audio is the only audio heard

Alarm Role

  1. Start music playback from the music-app
  2. Open the clock-app and set an alarm for a minute or two from now
  3. Ensure that when the alarm sounds that the music from music-app pauses
  4. Dismiss the alarm and ensure that the music from the music-app resumes playing with previous volume restored correctly

Notification Role

  1. Start music playback from the music-app
  2. Receive an SMS
  3. Ensure that when the message received notification sounds that the volume of the music from music-app is significantly reduced and the primary audio heard is the message received sound
  4. Once the message received sound completes, ensure that the music from the music-app keeps playing with full volume restored

Ringtone Role

  1. Start music playback from music-app
  2. Receive a phone call
  3. Ensure that when the ringtone sounds that the music from music-app pauses
  4. Hang up the call and ensure that the music in music-app resumes playback

Test Low Power Scenario

This test needs replacing as indicator-power got rid of indicator-power-service-cmdline-battery

  1. bzr branch lp:indicator-power
  2. sudo apt-get build-dep indicator-power
  3. cd indicator-power; mkdir build; cd build
  4. cmake .. && make -j3

  5. stop indicator-power
  6. tests/indicator-power-service-cmdline-battery
  7. Start music playback and type "10" and press enter (10% battery level)
  8. Make sure that music playback pauses and then resumes when the warning notification clears
  9. Repeat this by typing "5" and press enter (5% battery level)
  10. Repeat this for video playback

Test Display Wakelock

  1. Play a video from the video scope so that it opens in mediaplayer-app
  2. While mediaplayer-app is loading, press the power button so that the screen locks
  3. Unlock the screen, going back to mediaplayer-app
  4. mediaplayer-app should be paused and the video output window should show a still image from the video (if not on a black frame)
  5. Press play and observe that the video plays normally

Test Client Death STOP

  1. Open music app
  2. Play song
  3. Go to dash and then music scope
  4. Enter album view
  5. Focus music-app again and make sure song is playing
  6. Kill music-app from spread view
  7. Make sure that the song from the music-app stops playing
  8. Make sure that upon landing at the music scope, you can press play on any song and it plays

Test A2DP / Headset disconnect

  1. Open music app
  2. Play song
  3. Connect headphones, music should redirect to headphones
  4. Disconnect headphones, music should pause
  5. Press play
  6. Connect A2DP playback device, music should go to A2DP device
  7. Disconnect device, music should pause
  8. Press play, connect headphones and A2DP
  9. Confirm music is in A2DP
  10. Disconnect A2DP, music should continue in headphones
  11. Disconnect headphones, music should pause
  12. Press play, connect A2DP
  13. Connect headphone, music should continue in A2DP
  14. Remove headphone, music should not pause, and continue in A2DP

Repeat for A2DP to 3.5mm headphone bridge and for wired headphones with microphone. From shell, do "kill -9 pidof pulseaudio", wait 3 seconds, then run full test again.

Test On the Desktop

  1. Using either KVM or Virtual Box, install the latest Ubuntu desktop
  2. Install architecture appropriate packages from the active landing silo (media-hub, qtubuntu-media, qtvideo-node, qtubuntu-media-signals)
  3. Install mp3 codecs: sudo apt install gstreamer1.0-fluendo-mp3
  4. Manually install music-app similar to the following guide in the "Essential Core App" section: http://mhall119.com/2016/05/dogfooding-unity-8/

  5. In one tab, start media-hub: CORE_UBUNTU_MEDIA_SERVICE_VIDEO_SINK_NAME=mirsink CORE_UBUNTU_MEDIA_SERVICE_AUDIO_SINK_NAME=pulsesink /usr/bin/media-hub-server
  6. In another tab, start music-app
  7. Verify that music playback works via music-app

Test MPRIS Control

Test Basic TrackList Navigation

Test 1:

  1. After a fresh boot and on the welcome screen, pull down the sound indicator (speaker icon)
  2. Notice the media controls, previous, play, and next
  3. Tapping on any of them should do nothing without a player loaded

Test 2:

  1. Open the music app and start playing a song from an album with multiple tracks
  2. Pull down the sound indicator
  3. There should be album artwork as well as the song title, artist and album title (not presently working for m4a files)
  4. The play button should have changed to a pause button
  5. Press the next button, music app should change to the next song
  6. Press the previous button, music app should change to the previous song
  7. Press the pause button, music app should pause
  8. Press the play button, music app should play

Test 3:

  1. Open the music app and start playing a song from an album with multiple tracks
  2. Pull down the sound indicator
  3. Press the next button, music-app should change to the next song
  4. Press the previous button, music app should change to the previous song
  5. Switch to the video scope and select a video to play
  6. Once the video is playing, pull down the sound indicator
  7. Press the play/pause button in the indicator. Video playback should resume playing.
  8. Switch back to the music app and then pull down the indicator.
  9. Pressing play/pause should resume playback in mediaplayer-app.
  10. Now press play from the actual music-app and then pull down the indicator.
  11. Press the next button, music-app should change to the next song
  12. Press the previous button, music-app should change to the previous song

Test 4:

  1. Repeat test #2 but change the volume using the hardware buttons on the phone during playback. Ensure that the indicator still always controls the music app instead of a different/incorrect player.

Test 5:

  1. Open the music app and start playing a song from an album with multiple tracks
  2. Let the song play for more than 5 seconds
  3. Press previous button and verify the the song starts from the beginning
  4. Press previous again but before the song was played for four seconds. This should go to the previous song in the tracklist

Test 6:

  1. Install another audio only playback app such as Podbird
  2. Begin playback of a podcast (or other audio item if using a different app)
  3. Pull down the sound indicator
  4. Press pause, verify that Podbird playback pauses
  5. Press play, verify that Podbird playback continues playback
  6. Open music-app and begin playback of an album
  7. Pull down the sound indicator
  8. Press pause, verify that music-app playback pauses
  9. Switch back to Podbird
  10. Pull down the sound indicator
  11. Press play, verify that music-app continues playback
  12. From music-app, press play
  13. Pull down the sound indicator
  14. Press pause, verify that music-app playback pauses
  15. Press play, verify that music-app playback continues

Test 7:

  1. Play a video in the mediaplayer-app. Verify that the mediaplayer-app is the active app in the MPRIS controls
  2. Start the music-app (mediaplayer-app will pause)
  3. Enqueue several tracks and start playing. Verify that the music-app is the active app in the MPRIS controls
  4. Reveal the spread and close the mediaplayer-app, then switch to the music-app
  5. Verify that the MPRIS controls still control the music-app

Test Metadata Display

Test 1:

  1. Play an album or specific song in music-app.
  2. Pull down indicator-sound and verify that the expected album name, song title and album artist are shown.
  3. In indicator-sound, press the next button and verify that the album name, song title and album artist change to the correct values expected.
  4. In indicator-sound, press the previous button and verify that the album name, song title and album artist change to the correct values expected.

Test 2:

  1. Play an album or specific song in music-app.
  2. Play a video in mediaplayer-app. Many videos don't have their metadata info filled out but verify that it's correct if your test video has it. If not, it should be empty in indicator-sound where the album name, song title and album artist are normally located.
  3. Switch back to music-app, press play in music-app, and verify that the same album name, song title and album artist show up.

Test 3:

  1. Play an album or specific song in music-app.
  2. Pull down indicator-sound and verify that the expected album name, song title and album artist are shown.
  3. From indicator-sound, toggle play/pause. Make sure that the album name, song title and album artist do not disappear or change.

Test Album Artwork

Test 1:

  1. Play an album or specific song in music-app that you know has embedded album art verified with an external player such as Rhythmbox.
  2. Pull down indicator-sound and verify that you see this album art next to the song title, artist name and album title.
  3. NOTE: There is currently a bug filed where m4a files do not show any of their metadata. This is unrelated to any efforts to enable metadata support in indicator-sound specifically and will be fixed at another time.

Test 2:

  1. Play a podcast using Podbird that you know has embedded album art.
  2. Pull down indicator-sound and verify that you see this album art next to the podcast title, artist name and album title.

NOTE: Currently network streams such as Pandora using Panpipe do not display album art nor do they display anything for song title, album title or artist name. This is a separate bug that will be fixed at another time. We are also checking with the design team to see if we should display the file URI if there is no other metadata. There is also another bug in ubuntu-settings-components where a fallback image cannot be used otherwise no other album art will take effect: https://bugs.launchpad.net/ubuntu/+source/ubuntu-settings-components/+bug/1593356

Test Phone Call Behavior

Test 1:

  1. Play music through the music-app
  2. Place a call to the phone while the music is playing
  3. Music playback should pause when the call starts ringing
  4. Hangup the call and music playback should automatically resume

Test 2:

  1. Play a video from the video scope
  2. Place a call to the phone while the video is playing
  3. Video playback should pause when the call starts ringing
  4. Hangup the call and the video playback should not automatically resume

Test 3:

  1. Play music through the music-app
  2. Plug in a pair of headphones, then unplug - music playback should pause
  3. Make a phone call to the phone, hang up from remote phone and the music playback should not automatically resume

Test 4:

  1. Play a video from the video scope
  2. Plug in a pair of headphones, then unplug - video playback should pause
  3. Make a phone call to the phone, hang up from remote phone and the video playback should not automatically resume

Ringtone Test:

  1. Place a call to the phone
  2. Ensure that the ringtone plays once, pauses, and then plays again

Test Error Reporting Issues (mediaplayer-app)

Test 1 (unsupported format):

  1. Copy over a video file that uses the WMV format (not yet supported on touch)
  2. Play the video using cmdline (as phablet):
    • $ mediaplayer-app ~/Videos/sintel_trailer-1080p.wmv --desktop_file_hint=/usr/share/applications/mediaplayer-app.desktop
  3. See if mediaplayer-app successfully says it's not supported

Test 2 (invalid permission):

  1. Change permission on a known video file (under ~/Videos): $ chmod 000 ~/Videos/sample.mp4
  2. Try playing the video from the Video scopes
  3. See if mediaplayer-app successfully reports that it's unable to play the video

Test Background Playlist Functionality

Basic Navigation

Note: these tests assume the use of music-app unless specified otherwise

Test 1:

  1. From the Songs view tap on any song to begin playback. This will have loaded every song listed in the Songs view into the now playing queue and should begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Press next and verify that the expected next song begins playing
  4. Press previous before 5 seconds of playback and the previous song that was just playing should now be playing
  5. Press next and verify that the same song from step 3 is playing
  6. After 5 or more seconds of playback, press the previous button. Verify that the same track is now playing from the beginning

Test 2:

  1. From the Albums view tap on an album and then press the Play All button

  2. Playback should begin
  3. Make sure that repeat and shuffle modes are both turned off
  4. From the Queue tab verify that only the tracks from this album are shown

  5. Keep pressing next until the very last track, verify that the next button becomes disabled
  6. Keep pressing previous until the very first track, verify that the previous button becomes disabled

Test 3:

  1. From the Albums view tap on an album and then press the Play All button

  2. Playback should begin
  3. Make sure that shuffle mode is turned off
  4. Turn the repeat mode on by tapping on the loop button
  5. From the Queue tab verify that only the tracks from this album are shown

  6. Keep pressing next until the very last track, verify that the next button remains enabled and can advance from the last track to the first track
  7. Keep pressing previous until the very first track, verify that the previous button remains enabled and can advance from the first track to the last track

Shuffle Navigation

Test 1:

  1. Make sure that the play queue is empty, then quit and reload music-app
  2. At the bottom of music-app, tap on the play button to shuffle music
  3. Press next several times and verify that the original order of tracks (should be alphabetical by song name without shuffle on) is random
  4. Press previous and verify that the same order of random tracks that were played while pressing next in step 3

Test 2:

  1. From the Songs view, tap on the first song to begin playback
  2. Turn shuffle mode on
  3. Press next several times and verify that the original order of tracks (should be alphabetical by song name without shuffle on) is random
  4. Press previous and verify that the same order of random tracks that were played while pressing next in step 3
  5. Quit music-app and load it again
  6. At the bottom of the app, you should be able to start playback. This will be the same list of tracks as were last being played
  7. Verify that shuffle mode is still enabled
  8. Verify that pressing next/previous still results in a random progression of tracks being played

Test 3:

  1. From the Album view, tap on an album and then press the Play All button

  2. Turn shuffle mode on
  3. Press next several times and verify that the original order of tracks (should be alphabetical by song name without shuffle on) is random
  4. Press previous and verify that the same order of random tracks that were played while pressing next in step 3
  5. Quit music-app and load it again
  6. At the bottom of the app, you should be able to start playback. This will be the same list of tracks as were last being played
  7. Verify that shuffle mode is still enabled
  8. Verify that pressing next/previous still results in a random progression of tracks being played

Moving Tracks within the Playlist

Test 1:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Move the currently playing track (highlighted in blue) up several spots by first pressing and holding until movement is allowed, then drag the track upward in the list. Verify that it visually ends up where intended
  5. Press next and visually and audibly verify that the track after the currently playing track is played
  6. Press previous twice and visually and audibly verify that the correct previous tracks are played
  7. Repeat this process except drag the currently playing track downward

Test 2:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Move a non-playing track (highlighted in blue) up several spots by first pressing and holding until movement is allowed, then drag the track upward in the list. Verify that it visually ends up where intended
  5. Repeat this process except drag the non-playing track downward

Test 3:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Move a non-playing track (highlighted in blue) upward passing the currently playing track by first pressing and holding until movement is allowed, then drag the track upward in the list. Make sure to select a track that starts in a position after the currently playing track.Verify that it visually ends up where intended
  5. Repeat this process except drag the non-playing track downward passing the currently playing track

Test 4:

  1. Repeat tests 1 to 3 with shuffle mode enabled

Removing Tracks from the Playlist

Test 1:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Swipe from left to right on a non-playing track. Visually verify that it has been removed from the list
  5. Tap on the track before the one that was just removed and verify that playback begins
  6. Press next and verify that the song that was just removed is not being played

Test 2:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Swipe from left to right on the currently playing track. Visually verify that it has been removed from the list and that playback switches to the track just after it
  5. Tap on the track before the one that was just removed and verify that playback begins
  6. Press next and verify that the song that was just removed is not being played

Test 3:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Press and hold on any track until the multi-select mode activates
  5. Check several tracks to the left of the song titles
  6. Press the trash bin icon in the upper right hand corner
  7. Visually verify that all of the tracks have been removed from the list
  8. Tap on the track before one that was just removed and verify that playback begins
  9. Press next and verify that a song that was just removed is not being played

Test 4:

  1. From the Songs view tap on any song to begin playback
  2. Make sure that repeat and shuffle modes are both turned off
  3. Go to the active playing queue
  4. Press and hold on any track until the multi-select mode activates
  5. Check several tracks to the left of the song titles including the currently playing one
  6. Press the trash bin icon in the upper right hand corner
  7. Visually verify that all of the tracks have been removed from the list and that playback continues with the next track immediately following the one that was just removed or the last one that was part of the list of tracks that were just removed
  8. Tap on the track before one that was just removed and verify that playback begins
  9. Press next and verify that a song that was just removed is not being played

Test 5:

  1. Repeat tests 1 to 4 with shuffle mode enabled

Test 6:

  1. From the Songs view, press and hold on a song to enter edit mode. Select the first three songs and press the "+" (add to queue) button
  2. At the very bottom of the Songs view, tap the name of the song. This should have the play icon to the right of it, make sure not to press play
  3. From the Now Playing view, select the "Queue" tab
  4. Select the second track to begin playback
  5. Press and hold on a song to enter edit mode
  6. Select the second and third (last) song and remove them from the list by pressing the trash icon
  7. Verify that playback stops and that the first track is highlighted as the current track
  8. Switch to the "Full view" tab, verify that the current track is the first track and is not playing

Test 7:

  1. From the Songs view, press and hold on a song to enter edit mode. Select the first three songs and press the "+" (add to queue) button
  2. From the Songs view, select a random track to begin playback
  3. From the Now Playing view, select the "Queue" tab
  4. Press and hold on a song to enter edit mode
  5. Select all tracks in the queue and remove them from the list by pressing the trash icon
  6. Verify that playback stops
  7. From the Albums view, select an album and press "Play all" to begin playback
  8. Verify that it begins playing the first song in the chosen album
  9. create a queue 2) select a random track 3) multiselect remove all the tracks 4) then select a track higher than the first in another album...check it plays that

Running the Command Line Test App:

  1. phablet-shell to target device
  2. Build local media-hub source from lp:media-hub (refer to README)
  3. Run test app via: build/tests/test-track-list/test_track_list file://song1.mp3 file://song2.mp3 file://song3.mp3

  4. Make sure that the output doesn't report any errors or failures

Process/Merges/TestPlan/media-hub (last edited 2016-08-19 17:46:08 by jhodapp)