An addition to the audio systemtests Change-Id: I5b0625e25b4e11c6971eb8bc5bd09c2d0597c5cb Reviewed-by: Daron Andrew Edie <daron.edie@nokia.com>
449 lines
23 KiB
Plaintext
449 lines
23 KiB
Plaintext
/****************************************************************************
|
|
**
|
|
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
|
** Contact: http://www.qt-project.org/
|
|
**
|
|
** This file is part of the Qt Mobility Components.
|
|
**
|
|
** $QT_BEGIN_LICENSE:LGPL$
|
|
** GNU Lesser General Public License Usage
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this
|
|
** file. Please review the following information to ensure the GNU Lesser
|
|
** General Public License version 2.1 requirements will be met:
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
**
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
**
|
|
** GNU General Public License Usage
|
|
** Alternatively, this file may be used under the terms of the GNU General
|
|
** Public License version 3.0 as published by the Free Software Foundation
|
|
** and appearing in the file LICENSE.GPL included in the packaging of this
|
|
** file. Please review the following information to ensure the GNU General
|
|
** Public License version 3.0 requirements will be met:
|
|
** http://www.gnu.org/copyleft/gpl.html.
|
|
**
|
|
** Other Usage
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
**
|
|
**
|
|
**
|
|
**
|
|
**
|
|
**
|
|
** $QT_END_LICENSE$
|
|
**
|
|
****************************************************************************/
|
|
|
|
//TESTED_COMPONENT=src/multimedia
|
|
|
|
testcase = {
|
|
|
|
/* Notes
|
|
Ensure various mp3, wav, ogg, oga, spx and flac audio files available for playback
|
|
Ensure a valid m3u file referring to locations where indicated media is available on the device
|
|
Ensure the device can ping destinations on the network (if applicable)
|
|
Have an audio stream url available (e.g. http://202.6.74.107:8060/triplej.mp3 for example)
|
|
Ensure access to Internet available to device either via 3G and WiFi
|
|
SIM cards from Vodafone and Testra (Australia) needed for 3G streaming testing
|
|
*/
|
|
initTestCase: function()
|
|
{
|
|
},
|
|
|
|
play_an_audio_file_data: {
|
|
// mp3:[".mp3", "filename", "mpeg audio layer 3"],
|
|
// wav:[".wav", "filename", "waveform audio"],
|
|
ogg:[".ogg", "filename", "container format"],
|
|
// virbis:[".oga", "filename", "audio compression format"],
|
|
// speex:[".spx", "filename", "speech audio format"],
|
|
// flac:[".flac", "filename", "audio file format"]
|
|
},
|
|
|
|
play_an_audio_file: function(extension, filename, format)
|
|
{
|
|
// Test meta data
|
|
testApplication = "Multimedia - Play Audio File";
|
|
testBinary = "BGMPTest01";
|
|
testGoal = "Verify that various Audio files can be played.";
|
|
testPreconditions = "Audio files in " + extension + " format are available on device. Launch the native Music player to populate the playlist before opening BGMPTest.";
|
|
testGroups = "BAT";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | App launches normally |
|
|
| Verify that the playlist has populated the application | |
|
|
| Select the desired "+filename+extension+" and press play | Verify that the " + format + " file is audible on device |
|
|
|
|
"));
|
|
},
|
|
|
|
basic_player_controls_for_audio_data: {
|
|
// mp3:[".mp3", "filename", "mpeg audio layer 3"],
|
|
// wav:[".wav", "filename", "waveform audio"],
|
|
ogg:[".ogg", "filename", "container format"],
|
|
// virbis:[".oga", "filename", "audio compression format"],
|
|
// speex:[".spx", "filename", "speech audio format"],
|
|
//flac:[".flac", "filename", "audio file format"]
|
|
},
|
|
|
|
basic_player_controls_for_audio: function(extension, filename, format)
|
|
{
|
|
// Test meta data
|
|
testApplication = "Multimedia - Audio Player Controls";
|
|
testBinary = "BGMPTest01";
|
|
testGoal = "Verify basic API for controlling audio playback ";
|
|
testPreconditions = "a test "+extension+" file is available on device";
|
|
testGroups = "BAT";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | App launches normally |
|
|
| Select the desired "+filename+extension+" in playlist and press [Play] | Verify that file plays properly from the start |
|
|
| | Verify that the correct track details are displayed in the playlist |
|
|
| Select [Pause] | Verify that file has paused |
|
|
| Select [Play] | Verify that file continues to play properly from where previously paused. |
|
|
| | Verify that the progress bar tracks the progression of the file playback |
|
|
| Select [Next] control | Verify that next file in playlist is playing from start |
|
|
| | Verify that the correct playlist title is highlighted and that the details are correct to reflect the selected audio track |
|
|
| Select [Stop] control | Verify that file has stopped playing |
|
|
| Select [Play] | Verify that file continues to play from start of file. |
|
|
| With file playing, verify that UI volume control slider can change volume up and down | |
|
|
| Select volume at 50% (or thereabout) | |
|
|
| Select [Mute] | Verify that sound is muted while file is playing |
|
|
| | Verify that [Mute] control is displaying the Muted icon |
|
|
| Select [Mute] control again | Verify that sound has reverted back to level selected prior to muting |
|
|
"));
|
|
},
|
|
|
|
hardware_volume_controls_for_audio_data: {
|
|
// mp3:[".mp3", "filename", "mpeg audio layer 3"],
|
|
// wav:[".wav", "filename", "waveform audio"],
|
|
ogg:[".ogg", "filename", "container format"],
|
|
// virbis:[".oga", "filename", "audio compression format"],
|
|
// speex:[".spx", "filename", "speech audio format"],
|
|
//flac:[".flac", "filename", "audio file format"]
|
|
},
|
|
|
|
hardware_volume_controls_for_audio: function(extension, filename, format)
|
|
{
|
|
// Test meta data
|
|
testApplication = "Multimedia - Audio Player Controls";
|
|
testBinary = "BGMPTest01";
|
|
testGoal = "Verify hardware volume control of audio playback ";
|
|
testPreconditions = "a test "+extension+" file is available on device";
|
|
testGroups = "BAT";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | App launches normally |
|
|
| Select the desired "+filename+extension+" in playlist and press [Play] | Verify that file plays properly from the start |
|
|
| Press the hardware volume keys to increase the volume to the maximum | Verify that the device now plays at maximum volume |
|
|
| Using hardware volume keys, select volume at about 50% | Verify that the device is now playing at about 50% volume |
|
|
| Using hardware keys, take volume down to 0% | Verify that sound is muted while file is playing |
|
|
| Using hardware keys, increase volume | Verify that sound is once again playing from device |
|
|
"));
|
|
},
|
|
|
|
|
|
basic_playlist_controls_for_audio_data: {
|
|
// mp3:[".mp3", "filename", "mpeg audio layer 3"],
|
|
// wav:[".wav", "filename", "waveform audio"],
|
|
ogg:[".ogg", "filename", "container format"],
|
|
// virbis:[".oga", "filename", "audio compression format"],
|
|
// speex:[".spx", "filename", "speech audio format"],
|
|
//flac:[".flac", "filename", "audio file format"]
|
|
},
|
|
|
|
basic_playlist_controls_for_audio: function(extension, filename, format)
|
|
{
|
|
// Test meta data
|
|
testApplication = "Multimedia - Audio Player Controls";
|
|
testBinary = "BGMPTest01";
|
|
testGoal = "Verify basic API for controlling playlist playback ";
|
|
testPreconditions = "a test "+extension+" file is available on device";
|
|
testGroups = "BAT";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | App launches normally |
|
|
| Select 'Sequential' as the Play Mode | |
|
|
| Select the desired "+filename+extension+" in playlist and press [Play] | Verify that file plays properly from the start |
|
|
| | Verify that the correct track details are displayed in the playlist |
|
|
| Select [Next] | Verify that the next file in the playlist is highlighted |
|
|
| | Verify that the correct audio file is being played from the beginning of the track |
|
|
| | Verify that there are no audible artifacts or undue lag during this change of track |
|
|
| After some time (10-20 sec), select [Prev] icon | Verify that the previous file in the playlist is being played from start |
|
|
| Let file play till end | Verify player continues playing the next file in the playlist window |
|
|
| After some arbitrary time, Select [Stop] | |
|
|
| Select [Next File] control | Verify that next file in playlist is highlighted |
|
|
| | Verify that file is not automatically playing |
|
|
| Select [Prev] control | Verify that previous file in playlist is highlighted |
|
|
| Select file in playlist | Verify that file plays in player. |
|
|
| Select number of files greater than can be displayed without scrolling in to playlist | Verify that list can be scrolled through |
|
|
| Navigate to the last file in the playlist and select [Next] | Verify that no other track is played |
|
|
| Select 'Loop' as the Play Mode | |
|
|
| Select [Next] | Verify that the next song played is the first song in the playlist |
|
|
| While first song is playing select [Prev] | Verify that the last song in the playlist is now playing |
|
|
| Select [current Loop] from Play Mode | Verify that the same song now plays in a loop |
|
|
| | Verify that selecting [Prev] or [Next] has no effect on the tune played |
|
|
| Select [Current Only] in the Play Mode | Verify that only the selected song plays and stops at the end |
|
|
| Select [Shuffle] | Verify that the playlist is now shuffled in a random fashion |
|
|
| Select [Shuffle] again | Verify that the playlist is again shuffled in a random fashion |
|
|
| Select [Reset] | Verify that the playlist is now back to its original order |
|
|
"));
|
|
|
|
},
|
|
|
|
seek_controls_for_audio_data: {
|
|
//mp3:[".mp3", "filename", "mpeg audio layer 3"],
|
|
//wav:[".wav", "filename", "waveform audio"],
|
|
ogg:[".ogg", "filename", "container format"],
|
|
//virbis:[".oga", "filename", "audio compression format"],
|
|
//speex:[".spx", "filename", "speech audio format"],
|
|
//flac:[".flac", "filename", "audio file format"]
|
|
},
|
|
|
|
seek_controls_for_audio: function(extension, filename, format)
|
|
{
|
|
// Test meta data
|
|
testApplication = "Multimedia - Audio Seek Controls";
|
|
testBinary = "AudioPlayer";
|
|
testGoal = "Verify FastForward and Rewind functionality of the API";
|
|
testPreconditions = "a test "+extension+" file is available on device";
|
|
testGroups = "BAT";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | App launches normally |
|
|
| Select [Play] to play the file | |
|
|
| Click on the [Move Forward] control | Verify that file playback has moved forward 5 seconds |
|
|
| Select [Pause] | Verify that the file has paused the playback |
|
|
| Click on the [Move Forward] control | Verify that the file has moved 5 seconds forward, but is still paused |
|
|
| Select [Play] | Verify that file is now playing from new position |
|
|
| Click on the [Move Backwards] control | Verify that file playback has moved back 5 seconds |
|
|
| Select [Pause] | Verify that the file has paused the playback |
|
|
| Click on the [Move Backwards] control | Verify that the file has moved 5 seconds backwards, but is still paused |
|
|
| Select [Play] | Verify that file is now playing from new position |
|
|
"));
|
|
},
|
|
|
|
|
|
|
|
basic_controls_for_streamed_audio_content: function()
|
|
{
|
|
|
|
//*Note* For this test you need a playlist of streaming media urls. Suggest: http://202.6.74.107:8060/triplej.mp3 ; http://www.abc.net.au/streaming/triplej.asx ; rtsp://media1.abc.net.au/broadcast/triplej.rm ; mms://media3.abc.net.au/triplej ; depending on your platform and backend support.
|
|
|
|
// Test meta data
|
|
testApplication = "Multimedia - Content Streaming";
|
|
testBinary = "player";
|
|
testGoal = "Verify playback of streaming audio media";
|
|
testPreconditions = "";
|
|
testGroups = "BAT";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | App launches normally |
|
|
| In player application, Select or Tap [Open] | |
|
|
| In [Open File] navigate and highlight test (streaming) playlist file | |
|
|
| Select or Tap on selected file to return to player UI | Verify selected file has populated playlist |
|
|
| Highlight file in playlist by selecting or clicking it | |
|
|
| Select [Play] | Verify that stream is playing on device |
|
|
| Select [Pause] | Verify that stream is paused on device |
|
|
| | Verify that the [Pause] button has changed to a [Play] button |
|
|
| Select [Play] again | Verify that stream is playing on device |
|
|
| Select [Stop] | |
|
|
| Open local mp3 file in to play list and select it to play | Verify that the mp3 plays while the stream name is still present in the playlist |
|
|
| Re-select the stream in the playlist | Verify that the stream starts playing again |
|
|
| Select [Next File] | Verify that the player started playing the next file in the playlist |
|
|
| Select [Previous File] | Verify that the original stream is playing again |
|
|
| During stream playback, have headphones connected to device | Verify that the sound is now playing through the headphones |
|
|
| Invoke a system notification on the device (such as an incoming SMS) | Verify that the device correctly transmits the audible system notification through the devices speakers and then returns to playing the stream through the headphones |
|
|
"));
|
|
},
|
|
|
|
lock_screen_controls_for_audio: function()
|
|
{
|
|
|
|
// Test meta data
|
|
testApplication = "Multimedia - Background Audio";
|
|
testBinary = "BGPlayback";
|
|
testGoal = "Verify LockScreen controls for Background Audio Playback.";
|
|
testPreconditions = "";
|
|
testGroups = "BAT, 1.2";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | Verify app launches normally |
|
|
| Swipe application off screen | Verify that audio is still playing |
|
|
| Hit hardware Home key | Verify that the screen has locked |
|
|
| Double tap or hit the hardware Home key | Verify that you are now presented with the lock screen |
|
|
| | Verify that player controls are present on the lock screen: Back, Play and Next |
|
|
| | Verify that the currently playing track is displayed as well as artist |
|
|
| Tap the Pause button | Verify that the track has paused |
|
|
| | Verify that the Pause control has changed in to a Play control |
|
|
| Tap the Play control | Verify that the track has continued playing from the previous position |
|
|
| Tap the Next control | Verify that the next track is now playing from the start |
|
|
| Tap the Previous control | Verify that the original track is playing once again |
|
|
| Tap Pause and then Next | Verify that the next tracks details are displayed, but that the track is still paused and remains so |
|
|
| Reopen the BGPlayback app | Verify that the same track is selected as in the previous step |
|
|
| Return to lock screen and continue background playback | Verify that audio is playing |
|
|
| Interrupt playback with a phone call to the device | Verify that the audio pauses and that the ringtone is played |
|
|
| Stop the phone call | Verify that the background audio is now paused |
|
|
| Tap Play | Verify that the audio continues playing from the previously paused position |
|
|
|
|
"));
|
|
},
|
|
|
|
headset_removal: function()
|
|
{
|
|
|
|
// Test meta data
|
|
testApplication = "Multimedia - Removal of headset";
|
|
testBinary = "Audio Player";
|
|
testGoal = "Verify correct handling of headset removal.";
|
|
testPreconditions = "";
|
|
testGroups = "BAT, 1.2";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | Verify app launches normally |
|
|
| Select Play on the application UI | Verify that audio is audible |
|
|
| Insert headset in to device | Verify that audio is no longer heard through the speakers, but is routed to the headset |
|
|
| Remove headset | Verify that playback has paused |
|
|
| Select Play on the application UI | Verify that audio is hears once again through the speakers |
|
|
| Turn volume down and then insert headset | Verify that sound is once again routed through headset, and that new volume setting is preserved |
|
|
| Close application | Verify that the application closes without issues |
|
|
"));
|
|
},
|
|
|
|
|
|
play_sound_effects: function()
|
|
{
|
|
|
|
// Test meta data
|
|
testApplication = "Multimedia - SoundEffects Playback";
|
|
testBinary = "BeatBox";
|
|
testGoal = "Verify playback of sound effects.";
|
|
testPreconditions = "";
|
|
testGroups = "BAT, 1.2";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | Verify app launches normally |
|
|
| Touch red rectangle | Verify that a sound effect is audible |
|
|
| Touch blue rectangle | Verify that a sound effect is audible |
|
|
| Touch green rectangle | Verify that a sound effect is audible |
|
|
| Touch yellow rectangle | Verify that a sound effect is audible |
|
|
| Touch a combination of rectangles in quick succession | Verify that sound effects trigger on each touch |
|
|
| Close application | Verify that the application closes without issues |
|
|
"));
|
|
},
|
|
|
|
change_volume_of_sound_effects: function()
|
|
{
|
|
|
|
// Test meta data
|
|
testApplication = "Multimedia - SoundEffects Playback";
|
|
testBinary = "BeatBox";
|
|
testGoal = "Change volume of sound effects.";
|
|
testPreconditions = "";
|
|
testGroups = "BAT, 1.2";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch " + testBinary + " | Verify app launches normally |
|
|
| Set volume of device to maximum | Verify that sound effect now plays at maximum volume |
|
|
| Set volume of device to about 50% volume | Verify that the sound effect now plays at half volume |
|
|
| Set volume of device to minimum | Verify that there is now no audio from device when sound effect is played |
|
|
| Close application | Verify that the application closes without issues |
|
|
"));
|
|
},
|
|
|
|
|
|
play_sound_effects_over_compressed_audio: function()
|
|
{
|
|
|
|
// Test meta data
|
|
testApplication = "Multimedia - SoundEffects Playback";
|
|
testBinary = "BeatBox";
|
|
testGoal = "Verify playback of sound effects over audio track.";
|
|
testPreconditions = "BGMPTest01 application to provide background playback";
|
|
testGroups = "BAT, 1.2";
|
|
|
|
// Test steps
|
|
prompt(twiki("---+++ " + testApplication + "<br><br>
|
|
*Goal:* " + testGoal + "<br>
|
|
*Pre-Requisites:* " + testPreconditions + "<br>
|
|
*Tested Binary:* " + testBinary + "<br>
|
|
|
|
| *Step* | *Verification* |
|
|
| Launch BGMPTest01, start playback of playlist | Audio should be heard from the device |
|
|
| Swipe to background BGMPTest01 | Audio should still be heard from BGMPTest01 |
|
|
| Launch " + testBinary + " | Verify app launches normally |
|
|
| Touch red rectangle | Verify that a sound effect is audible together with the background track |
|
|
| Touch blue rectangle | Verify that a sound effect is audible together with the background track |
|
|
| Touch green rectangle | Verify that a sound effect is audible together with the background track |
|
|
| Touch yellow rectangle | Verify that a sound effect is audible together with the background track |
|
|
| Touch a combination of rectangles in quick succession | Verify that sound effects trigger on each touch and that the background track can still be heard |
|
|
| Close application | Verify that the application closes without issues |
|
|
| | Verify that BGMPTest01 is still playing audio tracks |
|
|
"));
|
|
}
|
|
}
|