os/boardsupport/haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-manual.script
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-manual.script Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,348 @@
1.4 +//
1.5 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +//! @file
1.20 +//! @SYMTestSuiteName BASE-BSP-SOUND
1.21 +//! @SYMScriptTestEnvironment This test script requires a base rom image
1.22 +
1.23 +/////////////////////////////////////////////////////////////////////
1.24 +// BASE-BSP-SOUND-DRIVER-manual.script
1.25 +//
1.26 +//
1.27 +// Tests all the PublishedPartner APIs of the RMdaDevSound
1.28 +// class as a means of confidence that the APIs work as expected.
1.29 +// All test cases will keep the sound system state and
1.30 +// restore that to initial state when test case finished
1.31 +// Platform dependent configuration is picked up from the global environment files
1.32 +//
1.33 +/////////////////////////////////////////////////////////////////////
1.34 +
1.35 +RUN_UTILS MkDir ${SYSDRIVE}\base\
1.36 +RUN_UTILS MkDir ${SYSDRIVE}\base\sound\
1.37 +RUN_UTILS MkDir ${SYSDRIVE}\base\sound\validation
1.38 +
1.39 +
1.40 +LOAD_SUITE t_sound
1.41 +DELAY 5000
1.42 +
1.43 +///////////////////////////////////////////
1.44 +// Manual testing
1.45 +///////////////////////////////////////////
1.46 +
1.47 +START_TESTCASE BASE-BSP-SOUND-DRIVER-6001
1.48 +//! @SYMTestCaseID BASE-BSP-SOUND-DRIVER-6001
1.49 +//! @SYMAPI RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
1.50 +//! RMdaDevSound::SetPlayVolume(TInt)
1.51 +//! @SYMAuthor Vassili Tsvetkov
1.52 +//! @SYMCreationDate 15/06/2008
1.53 +//! @SYMTestCaseDesc Manual test. Play sound with volume level 50%, then set max volume level
1.54 +//! and play again. User will verify the volume change manually and give feedback
1.55 +//!
1.56 +//! @SYMTestActions 1. Call Open() with unit [UnitEnum]
1.57 +//! 2. Call GetPlayFormat() and verify it from [default_play_format]
1.58 +//! 3. Show message "Press affirmative key to start playback with half volume"
1.59 +//! 4. Call PlayData() with valid sound data from [default_file]
1.60 +//! 5. Call SetPlayVolume() with max volume from [max_play_volume]
1.61 +//! 6. Show message "Press affirmative key to start playback with max volume"
1.62 +//! 7. Call PlayData() with valid sound data from [default_file]
1.63 +//! 8. Call PlayVolume(), where expected result is equal with max volume from [max_play_volume]
1.64 +//! 9. Request user feedback "Did it sound louder? Press affirmative key if Yes and any other key otherwise"
1.65 +//! and store user's feedback in the log file
1.66 +//! 10. Restore default playback sound volume
1.67 +//! 11. Call Close().
1.68 +//!
1.69 +//! @SYMTestStatus Implemented
1.70 +//! @SYMTestPriority Critical
1.71 +//! @SYMTestExpectedResults Playback finished w/o errors, sound became louder
1.72 +//! @SYMTestType CIT
1.73 + START_TEST_BLOCK 100 t_sound \base\sound\base-bsp-sound-driver.ini
1.74 + CREATE_OBJECT RMdaDevSound devsound
1.75 + COMMAND devsound new
1.76 + COMMAND devsound Open UnitEnum
1.77 + CREATE_OBJECT TCurrentSoundFormat t_format
1.78 + COMMAND t_format new
1.79 + COMMAND devsound GetPlayFormat BSP-SOUND-DRIVER-GetPlayFormat
1.80 + //!verify default play configuration
1.81 + COMMAND t_format irate_get default_play_format
1.82 + COMMAND t_format iencoding_get default_play_format
1.83 + COMMAND t_format ichannels_get default_play_format
1.84 + COMMAND t_format ibuffer_size_get default_play_format
1.85 + COMMAND devsound SetPlayVolume play_volume_quater
1.86 + COMMAND devsound utilityPromptMessage start_playback_half_volume
1.87 + COMMAND devsound PlayData default_file
1.88 + OUTSTANDING
1.89 + COMMAND devsound SetPlayVolume max_play_volume
1.90 + COMMAND devsound utilityPromptMessage start_playback_max_volume
1.91 + COMMAND devsound PlayData default_file
1.92 + OUTSTANDING
1.93 + COMMAND devsound PlayVolume max_play_volume
1.94 + COMMAND devsound utilityPromptMessage ask_did_it_sound_louder
1.95 + //!set back default playback audio level
1.96 + COMMAND devsound SetPlayVolume default_play_volume
1.97 + COMMAND t_format ~
1.98 + COMMAND devsound Close
1.99 + COMMAND devsound ~
1.100 + END_TEST_BLOCK
1.101 +END_TESTCASE BASE-BSP-SOUND-DRIVER-6001
1.102 +
1.103 +START_TESTCASE BASE-BSP-SOUND-DRIVER-6002
1.104 +//! @SYMTestCaseID BASE-BSP-SOUND-DRIVER-6002
1.105 +//! @SYMAPI RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
1.106 +//! RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
1.107 +//! RMdaDevSound::SetPlayVolume(TInt);
1.108 +//! RMdaDevSound::SetRecordLevel(TInt)
1.109 +//! @SYMAuthor Vassili Tsvetkov
1.110 +//! @SYMCreationDate 15/06/2008
1.111 +//! @SYMTestCaseDesc Manual test. Record sound with volume level 50%. Then play it. Set volume level to max and record again.
1.112 +//! Play the last recorded file. User will verify the volume change manually and give feedback
1.113 +//!
1.114 +//! @SYMTestActions 1. Call Open() with unit [UnitEnum]
1.115 +//! 2. Call GetRecordFormat() and verify it from [default_record_format]
1.116 +//! 3. Show message "Press affirmative key to start recording with half volume level"
1.117 +//! 4. Call SetRecordLevel() with values from [half_record_level]
1.118 +//! 5. Call RecordData() with values from [record_32kb_half_volume]
1.119 +//! 6. Call SetPlayVolume() with values from [max_play_volume]
1.120 +//! 7. Call SetPlayFormat() with default value from [default_play_format]
1.121 +//! 8. Call PlayData() with valid sound data from [record_32kb_half_volume]
1.122 +//! 9. Show message "Press affirmative key to start recording with max volume level"
1.123 +//! 10. Call SetRecordLevel() with values from [max_record_level]
1.124 +//! 11. Call RecordData() with values from [record_32kb_max_volume]
1.125 +//! 12. Call PlayData() with valid sound data from [record_32kb_max_volume]
1.126 +//! 13. Request user feedback "Did it sound louder? Press affirmative key if Yes and any other key otherwise"
1.127 +//! and store user's feedback in the log file
1.128 +//! 14. Restore default sound level
1.129 +//! 15. Call Close().
1.130 +//!
1.131 +//! @SYMTestStatus Implemented
1.132 +//! @SYMTestPriority Critical
1.133 +//! @SYMTestExpectedResults Playback finished w/o errors, sound became louder
1.134 +//! @SYMTestType CIT
1.135 + START_TEST_BLOCK 100 t_sound \base\sound\base-bsp-sound-driver.ini
1.136 + CREATE_OBJECT RMdaDevSound devsound
1.137 + COMMAND devsound new
1.138 + COMMAND devsound Open UnitEnum
1.139 + CREATE_OBJECT TCurrentSoundFormat t_format
1.140 + COMMAND t_format new
1.141 + COMMAND devsound GetRecordFormat BSP-SOUND-DRIVER-GetPlayFormat
1.142 + //!verify default record configuration
1.143 + COMMAND t_format irate_get default_record_format
1.144 + COMMAND t_format iencoding_get default_record_format
1.145 + COMMAND t_format ichannels_get default_record_format
1.146 + COMMAND t_format ibuffer_size_get default_record_format
1.147 + COMMAND devsound utilityPromptMessage start_record_half_volume
1.148 + COMMAND devsound SetRecordLevel half_record_level
1.149 + COMMAND devsound RecordData temp_file
1.150 + OUTSTANDING
1.151 + COMMAND devsound FlushRecordBuffer
1.152 + COMMAND devsound utilityPromptMessage start_playing_half_volume
1.153 + COMMAND devsound GetPlayFormat BSP-SOUND-DRIVER-GetPlayFormat
1.154 + //!verify default play configuration
1.155 + COMMAND t_format irate_get default_play_format
1.156 + COMMAND t_format iencoding_get default_play_format
1.157 + COMMAND t_format ichannels_get default_play_format
1.158 + COMMAND t_format ibuffer_size_get default_play_format
1.159 + COMMAND devsound PlayData temp_file
1.160 + OUTSTANDING
1.161 + COMMAND devsound utilityDeleteFile delete_temp_file
1.162 + COMMAND devsound utilityPromptMessage start_record_max_volume
1.163 + COMMAND devsound SetRecordLevel max_record_level
1.164 + COMMAND devsound RecordData temp_file
1.165 + OUTSTANDING
1.166 + COMMAND devsound utilityPromptMessage start_playing_max_volume
1.167 + COMMAND devsound PlayData temp_file
1.168 + OUTSTANDING
1.169 + COMMAND devsound utilityDeleteFile delete_temp_file
1.170 + COMMAND devsound utilityPromptMessage ask_did_it_sound_louder
1.171 + //!set back default recording audio level
1.172 + COMMAND devsound SetRecordLevel default_record_level
1.173 + COMMAND t_format ~
1.174 + COMMAND devsound Close
1.175 + COMMAND devsound ~
1.176 + END_TEST_BLOCK
1.177 +END_TESTCASE BASE-BSP-SOUND-DRIVER-6002
1.178 +
1.179 +START_TESTCASE BASE-BSP-SOUND-DRIVER-7041
1.180 +//! @SYMTestCaseID BASE-BSP-SOUND-DRIVER-7041
1.181 +//! @SYMAPI RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
1.182 +//! RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref})
1.183 +//! @SYMAuthor Vassili Tsvetkov
1.184 +//! @SYMCreationDate 15/06/2008
1.185 +//! @SYMTestCaseDesc Play default audio file with default format and at the same time record audio to different sound file.
1.186 +//! @SYMTestActions 1. Call Open() with unit [UnitEnum]
1.187 +//! 2. Call GetPlayFormat() and verify from [default_play_format]
1.188 +//! 3. Call PlayData() to play [default_audio_file]
1.189 +//! 4. Call SetRecordFormat() with [default_record_format]
1.190 +//! 5. Call RecordData to record audio to [temp_audio_file]
1.191 +//! 6. Call PlayData() to play [temp_audio_file]
1.192 +//! 7. Ask user if recorded audio is what was played
1.193 +//! 8. Call Close()
1.194 +//! @SYMTestStatus Implemented
1.195 +//! @SYMTestPriority Critical
1.196 +//! @SYMTestExpectedResults Playing and recording completes without any errors and recorded audio is what it should supposed to be.
1.197 +//!
1.198 +//! @SYMTestType CIT
1.199 + START_TEST_BLOCK 100 t_sound \base\sound\base-bsp-sound-driver.ini
1.200 + CREATE_OBJECT RMdaDevSound devsound
1.201 + COMMAND devsound new
1.202 + COMMAND devsound Open UnitEnum
1.203 + CREATE_OBJECT TCurrentSoundFormat t_format
1.204 + COMMAND t_format new
1.205 + COMMAND devsound GetPlayFormat BSP-SOUND-DRIVER-GetPlayFormat
1.206 + //!verify default play configuration
1.207 + COMMAND t_format irate_get default_play_format
1.208 + COMMAND t_format iencoding_get default_play_format
1.209 + COMMAND t_format ichannels_get default_play_format
1.210 + COMMAND t_format ibuffer_size_get default_play_format
1.211 + COMMAND devsound GetRecordFormat BSP-SOUND-DRIVER-GetRecordFormat
1.212 + //!verify default record configuration
1.213 + COMMAND t_format irate_get default_record_format
1.214 + COMMAND t_format iencoding_get default_record_format
1.215 + COMMAND t_format ichannels_get default_record_format
1.216 + COMMAND t_format ibuffer_size_get default_record_format
1.217 + COMMAND devsound utilityPromptMessage start_record_and_playing_simultaneously
1.218 + COMMAND devsound PlayData default_file
1.219 + COMMAND devsound RecordData temp_file
1.220 + OUTSTANDING
1.221 + COMMAND devsound utilityPromptMessage start_playing_audio_recorded_in_previous_step
1.222 + COMMAND devsound PlayData temp_file
1.223 + OUTSTANDING
1.224 + COMMAND devsound utilityDeleteFile delete_temp_file
1.225 + COMMAND devsound utilityPromptMessage was_recorded_audio_correct
1.226 + COMMAND t_format ~
1.227 + COMMAND devsound Close
1.228 + COMMAND devsound ~
1.229 + END_TEST_BLOCK
1.230 +END_TESTCASE BASE-BSP-SOUND-DRIVER-7041
1.231 +
1.232 +START_TESTCASE BASE-BSP-SOUND-DRIVER-7042
1.233 +//! @SYMTestCaseID BASE-BSP-SOUND-DRIVER-7042
1.234 +//! @SYMAPI RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
1.235 +//! RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
1.236 +//! RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
1.237 +//! RMdaDevSound::CancelNotifyPlayError()
1.238 +//! @SYMAuthor Vassili Tsvetkov
1.239 +//! @SYMCreationDate 15/06/2008
1.240 +//! @SYMTestCaseDesc Call NotifyPlayError before playing file. Play default audio file with default format and at the same time record audio
1.241 +//! to different sound file. Call CancelNotifyPlayError before playing recorded audio.
1.242 +//! @SYMTestActions 1. Call Open() with unit [UnitEnum]
1.243 +//! 2. Call GetPlayFormat() and verify from [default_play_format]
1.244 +//! 3. Call GetRecordFormat() and verify from [default_record_format]
1.245 +//! 4. Call NotifyPlayError()
1.246 +//! 5. Call PlayData() to play [default_audio_file]
1.247 +//! 6. Call RecordData to record audio to [temp_audio_file]
1.248 +//! 7. Call CancelNotifyPlayError()
1.249 +//! 8. Call PlayData() to play [temp_audio_file]
1.250 +//! 9. Call Close()
1.251 +//! @SYMTestStatus Implemented
1.252 +//! @SYMTestPriority Critical
1.253 +//! @SYMTestExpectedResults NotifyPlayError() in step 3 completes with KErrUnderflow. Recording completes without any errors and recorded audio
1.254 +//! can be played. Playdata in step 4 completes with KErrNone. CancelNotifyPlayError completes with KErrNone.
1.255 +//!
1.256 +//! @SYMTestType CIT
1.257 + START_TEST_BLOCK 100 t_sound \base\sound\base-bsp-sound-driver.ini
1.258 + CREATE_OBJECT RMdaDevSound devsound
1.259 + COMMAND devsound new
1.260 + COMMAND devsound Open UnitEnum
1.261 + COMMAND devsound CancelRecordData
1.262 + CREATE_OBJECT TCurrentSoundFormat t_format
1.263 + COMMAND t_format new
1.264 + COMMAND devsound GetPlayFormat BSP-SOUND-DRIVER-GetPlayFormat
1.265 + //!verify default play configuration
1.266 + COMMAND t_format irate_get default_play_format
1.267 + COMMAND t_format iencoding_get default_play_format
1.268 + COMMAND t_format ichannels_get default_play_format
1.269 + COMMAND t_format ibuffer_size_get default_play_format
1.270 + COMMAND devsound GetRecordFormat BSP-SOUND-DRIVER-GetRecordFormat
1.271 + //!verify default record configuration
1.272 + COMMAND t_format irate_get default_record_format
1.273 + COMMAND t_format iencoding_get default_record_format
1.274 + COMMAND t_format ichannels_get default_record_format
1.275 + COMMAND t_format ibuffer_size_get default_record_format
1.276 + COMMAND devsound utilityPromptMessage start_record_and_playing_simultaneously
1.277 + COMMAND !AsyncError=-10 devsound NotifyPlayError
1.278 + COMMAND devsound PlayData default_file
1.279 + COMMAND devsound RecordData temp_file
1.280 + OUTSTANDING
1.281 + COMMAND devsound CancelNotifyPlayError
1.282 + COMMAND devsound utilityPromptMessage start_playing_audio_recorded_in_previous_step
1.283 + COMMAND devsound PlayData temp_file
1.284 + OUTSTANDING
1.285 + COMMAND devsound utilityDeleteFile delete_temp_file
1.286 + COMMAND devsound utilityPromptMessage was_recorded_audio_correct
1.287 + COMMAND t_format ~
1.288 + COMMAND devsound Close
1.289 + COMMAND devsound ~
1.290 + END_TEST_BLOCK
1.291 +END_TESTCASE BASE-BSP-SOUND-DRIVER-7042
1.292 +
1.293 +START_TESTCASE BASE-BSP-SOUND-DRIVER-7043
1.294 +//! @SYMTestCaseID BASE-BSP-SOUND-DRIVER-7043
1.295 +//! @SYMAPI RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
1.296 +//! RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
1.297 +//! RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
1.298 +//! RMdaDevSound::CancelNotifyRecordError()
1.299 +//! @SYMAuthor Vassili Tsvetkov
1.300 +//! @SYMCreationDate 15/06/2008
1.301 +//! @SYMTestCaseDesc Call NotifyRecordError before recording file. Play default audio file with default format and at the same time
1.302 +//! record audio to different sound file. Call CancelNotifyRecordError after recording.
1.303 +//! @SYMTestActions 1. Call Open() with unit [UnitEnum]
1.304 +//! 2. Call GetPlayFormat() and verify from [default_play_format]
1.305 +//! 3. Call GetRecordFormat() and verify from [default_record_format]
1.306 +//! 4. Call NotifyRecordError()
1.307 +//! 5. Call PlayData() to play [default_audio_file]
1.308 +//! 6. Call RecordData to record audio to [temp_audio_file]
1.309 +//! 7. Call CancelNotifyRecordError()
1.310 +//! 8. Call Close()
1.311 +//! @SYMTestStatus Implemented
1.312 +//! @SYMTestPriority Critical
1.313 +//! @SYMTestExpectedResults NotifyRecordError() in step 5 completes with KErrOverflow. Recording in step 6 completes with KErrNone.
1.314 +//! Playing in step 3 completes with KErrNone. CancelNotifyRecordError completes with KErrNone.
1.315 +//! @SYMTestType CIT
1.316 + START_TEST_BLOCK 100 t_sound \base\sound\base-bsp-sound-driver.ini
1.317 + CREATE_OBJECT RMdaDevSound devsound
1.318 + COMMAND devsound new
1.319 + COMMAND devsound Open UnitEnum
1.320 + COMMAND devsound CancelRecordData
1.321 + CREATE_OBJECT TCurrentSoundFormat t_format
1.322 + COMMAND t_format new
1.323 + COMMAND devsound GetPlayFormat BSP-SOUND-DRIVER-GetPlayFormat
1.324 + //!verify default play configuration
1.325 + COMMAND t_format irate_get default_play_format
1.326 + COMMAND t_format iencoding_get default_play_format
1.327 + COMMAND t_format ichannels_get default_play_format
1.328 + COMMAND t_format ibuffer_size_get default_play_format
1.329 + COMMAND devsound GetRecordFormat BSP-SOUND-DRIVER-GetRecordFormat
1.330 + //!verify default record configuration
1.331 + COMMAND t_format irate_get default_record_format
1.332 + COMMAND t_format iencoding_get default_record_format
1.333 + COMMAND t_format ichannels_get default_record_format
1.334 + COMMAND t_format ibuffer_size_get default_record_format
1.335 + COMMAND devsound utilityPromptMessage start_record_and_playing_simultaneously
1.336 + COMMAND !AsyncError=-9 devsound NotifyRecordError
1.337 + COMMAND devsound PlayData default_file
1.338 + COMMAND devsound RecordData temp_file
1.339 + OUTSTANDING
1.340 + COMMAND devsound CancelNotifyRecordError
1.341 + COMMAND devsound utilityPromptMessage start_playing_audio_recorded_in_previous_step
1.342 + COMMAND devsound PlayData temp_file
1.343 + OUTSTANDING
1.344 + COMMAND devsound utilityDeleteFile delete_temp_file
1.345 + COMMAND devsound utilityPromptMessage was_recorded_audio_correct
1.346 + COMMAND t_format ~
1.347 + COMMAND devsound Close
1.348 + COMMAND devsound ~
1.349 + END_TEST_BLOCK
1.350 +END_TESTCASE BASE-BSP-SOUND-DRIVER-7043
1.351 +