os/boardsupport/haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-manual.script
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 //
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // All rights reserved.
     4 // This component and the accompanying materials are made available
     5 // under the terms of "Eclipse Public License v1.0"
     6 // which accompanies this distribution, and is available
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 //
     9 // Initial Contributors:
    10 // Nokia Corporation - initial contribution.
    11 //
    12 // Contributors:
    13 //
    14 // Description:
    15 //
    16 //! @file
    17 //! @SYMTestSuiteName  BASE-BSP-SOUND
    18 //! @SYMScriptTestEnvironment This test script requires a base rom image
    19 
    20 /////////////////////////////////////////////////////////////////////
    21 // BASE-BSP-SOUND-DRIVER-manual.script
    22 //
    23 //
    24 // Tests all the PublishedPartner APIs of the RMdaDevSound
    25 // class as a means of confidence that the APIs work as expected.
    26 // All test cases will keep the sound system state and 
    27 // restore that to initial state when test case finished
    28 // Platform dependent configuration is picked up from the global environment files
    29 //
    30 /////////////////////////////////////////////////////////////////////
    31 
    32 RUN_UTILS MkDir		${SYSDRIVE}\base\
    33 RUN_UTILS MkDir		${SYSDRIVE}\base\sound\
    34 RUN_UTILS MkDir		${SYSDRIVE}\base\sound\validation
    35 
    36 
    37 LOAD_SUITE	t_sound
    38 DELAY		5000
    39 
    40 ///////////////////////////////////////////
    41 // Manual testing
    42 ///////////////////////////////////////////
    43 
    44 START_TESTCASE 			BASE-BSP-SOUND-DRIVER-6001
    45 //! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-6001
    46 //! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
    47 //!				RMdaDevSound::SetPlayVolume(TInt)
    48 //! @SYMAuthor			Vassili Tsvetkov
    49 //! @SYMCreationDate		15/06/2008
    50 //! @SYMTestCaseDesc		Manual test. Play sound with volume level 50%, then set max volume level 
    51 //!				and play again. User will verify the volume change manually and give feedback
    52 //!				
    53 //! @SYMTestActions		1. Call Open() with unit [UnitEnum]
    54 //!				2. Call GetPlayFormat() and verify it from [default_play_format]
    55 //!				3. Show message "Press affirmative key to start playback with half volume"
    56 //!				4. Call PlayData() with valid sound data from [default_file]
    57 //!				5. Call SetPlayVolume() with max volume from [max_play_volume]
    58 //!				6. Show message "Press affirmative key to start playback with max volume"
    59 //!				7. Call PlayData() with valid sound data from [default_file]
    60 //!				8. Call PlayVolume(), where expected result is equal with max volume from [max_play_volume]
    61 //!				9. Request user feedback "Did it sound louder? Press affirmative key if Yes and any other key otherwise"
    62 //!				and store user's feedback in the log file
    63 //!				10. Restore default playback sound volume
    64 //!				11. Call Close().
    65 //!
    66 //! @SYMTestStatus		Implemented
    67 //! @SYMTestPriority		Critical
    68 //! @SYMTestExpectedResults	Playback finished w/o errors, sound became louder
    69 //! @SYMTestType		CIT
    70 	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
    71 		CREATE_OBJECT		RMdaDevSound			devsound  
    72 		COMMAND			devsound			new
    73 		COMMAND			devsound			Open			UnitEnum
    74 		CREATE_OBJECT		TCurrentSoundFormat		t_format		
    75 		COMMAND			t_format			new
    76 		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
    77 		//!verify default play configuration			
    78 		COMMAND			t_format			irate_get		default_play_format
    79 		COMMAND			t_format			iencoding_get		default_play_format
    80 		COMMAND			t_format			ichannels_get		default_play_format
    81 		COMMAND			t_format			ibuffer_size_get	default_play_format
    82 		COMMAND			devsound			SetPlayVolume		play_volume_quater
    83 		COMMAND			devsound			utilityPromptMessage	start_playback_half_volume
    84 		COMMAND			devsound			PlayData		default_file
    85 		OUTSTANDING
    86 		COMMAND			devsound			SetPlayVolume		max_play_volume
    87 		COMMAND			devsound			utilityPromptMessage	start_playback_max_volume
    88 		COMMAND			devsound			PlayData		default_file
    89 		OUTSTANDING
    90 		COMMAND			devsound			PlayVolume		max_play_volume
    91 		COMMAND			devsound			utilityPromptMessage	ask_did_it_sound_louder
    92 		//!set back default playback audio level
    93 		COMMAND			devsound			SetPlayVolume		default_play_volume
    94 		COMMAND			t_format			~
    95 		COMMAND			devsound  			Close
    96 		COMMAND			devsound  			~
    97 	END_TEST_BLOCK
    98 END_TESTCASE			BASE-BSP-SOUND-DRIVER-6001
    99 
   100 START_TESTCASE 			BASE-BSP-SOUND-DRIVER-6002
   101 //! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-6002
   102 //! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
   103 //!				RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
   104 //!				RMdaDevSound::SetPlayVolume(TInt);
   105 //!				RMdaDevSound::SetRecordLevel(TInt)
   106 //! @SYMAuthor			Vassili Tsvetkov
   107 //! @SYMCreationDate		15/06/2008
   108 //! @SYMTestCaseDesc		Manual test. Record sound with volume level 50%. Then play it. Set volume level to max and record again.
   109 //!				Play the last recorded file. User will verify the volume change manually and give feedback
   110 //!				
   111 //! @SYMTestActions		1. Call Open() with unit [UnitEnum]
   112 //!				2. Call GetRecordFormat() and verify it from [default_record_format]
   113 //!				3. Show message "Press affirmative key to start recording with half volume level"
   114 //!				4. Call SetRecordLevel() with values from [half_record_level]	
   115 //!				5. Call RecordData() with values from [record_32kb_half_volume]
   116 //!				6. Call SetPlayVolume() with values from [max_play_volume]
   117 //!				7. Call SetPlayFormat() with default value from [default_play_format]
   118 //!				8. Call PlayData() with valid sound data from [record_32kb_half_volume]
   119 //!				9. Show message "Press affirmative key to start recording with max volume level"
   120 //!				10. Call SetRecordLevel() with values from [max_record_level]
   121 //!				11. Call RecordData() with values from [record_32kb_max_volume]
   122 //!				12. Call PlayData() with valid sound data from [record_32kb_max_volume]
   123 //!				13. Request user feedback "Did it sound louder? Press affirmative key if Yes and any other key otherwise"
   124 //!				and store user's feedback in the log file
   125 //!				14. Restore default sound level
   126 //!				15. Call Close().
   127 //!
   128 //! @SYMTestStatus		Implemented
   129 //! @SYMTestPriority		Critical
   130 //! @SYMTestExpectedResults	Playback finished w/o errors, sound became louder
   131 //! @SYMTestType		CIT
   132 	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
   133 		CREATE_OBJECT		RMdaDevSound			devsound  
   134 		COMMAND			devsound			new
   135 		COMMAND			devsound			Open			UnitEnum
   136 		CREATE_OBJECT		TCurrentSoundFormat		t_format		
   137 		COMMAND			t_format			new
   138 		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetPlayFormat
   139 		//!verify default record configuration			
   140 		COMMAND			t_format			irate_get		default_record_format
   141 		COMMAND			t_format			iencoding_get		default_record_format
   142 		COMMAND			t_format			ichannels_get		default_record_format
   143 		COMMAND			t_format			ibuffer_size_get	default_record_format
   144 		COMMAND			devsound			utilityPromptMessage	start_record_half_volume
   145 		COMMAND			devsound			SetRecordLevel		half_record_level
   146 		COMMAND			devsound			RecordData		temp_file
   147 		OUTSTANDING
   148 		COMMAND			devsound			FlushRecordBuffer
   149 		COMMAND			devsound			utilityPromptMessage	start_playing_half_volume
   150 		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
   151 		//!verify default play configuration			
   152 		COMMAND			t_format			irate_get		default_play_format
   153 		COMMAND			t_format			iencoding_get		default_play_format
   154 		COMMAND			t_format			ichannels_get		default_play_format
   155 		COMMAND			t_format			ibuffer_size_get	default_play_format
   156 		COMMAND			devsound			PlayData		temp_file
   157 		OUTSTANDING
   158 		COMMAND			devsound			utilityDeleteFile	delete_temp_file
   159 		COMMAND			devsound			utilityPromptMessage	start_record_max_volume
   160 		COMMAND			devsound			SetRecordLevel		max_record_level
   161 		COMMAND			devsound			RecordData		temp_file
   162 		OUTSTANDING
   163 		COMMAND			devsound			utilityPromptMessage	start_playing_max_volume
   164 		COMMAND			devsound			PlayData		temp_file
   165 		OUTSTANDING
   166 		COMMAND			devsound			utilityDeleteFile	delete_temp_file
   167 		COMMAND			devsound			utilityPromptMessage	ask_did_it_sound_louder
   168 		//!set back default recording audio level
   169 		COMMAND			devsound			SetRecordLevel		default_record_level
   170 		COMMAND			t_format			~
   171 		COMMAND			devsound  			Close
   172 		COMMAND			devsound  			~
   173 	END_TEST_BLOCK
   174 END_TESTCASE			BASE-BSP-SOUND-DRIVER-6002
   175 
   176 START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7041
   177 //! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7041
   178 //! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
   179 //!				RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref})
   180 //! @SYMAuthor			Vassili Tsvetkov
   181 //! @SYMCreationDate		15/06/2008
   182 //! @SYMTestCaseDesc		Play default audio file with default format and at the same time record audio to different sound file.
   183 //! @SYMTestActions		1. Call Open() with unit [UnitEnum]
   184 //!				2. Call GetPlayFormat() and verify from [default_play_format]
   185 //!				3. Call PlayData() to play [default_audio_file]
   186 //!				4. Call SetRecordFormat() with [default_record_format]
   187 //!				5. Call RecordData to record audio to [temp_audio_file]
   188 //!				6. Call PlayData() to play [temp_audio_file]
   189 //!				7. Ask user if recorded audio is what was played
   190 //!				8. Call Close()
   191 //! @SYMTestStatus		Implemented
   192 //! @SYMTestPriority		Critical
   193 //! @SYMTestExpectedResults	Playing and recording completes without any errors and recorded audio is what it should supposed to be.
   194 //!
   195 //! @SYMTestType		CIT
   196 	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
   197 		CREATE_OBJECT	RMdaDevSound			devsound  
   198 		COMMAND		devsound			new
   199 		COMMAND		devsound			Open			UnitEnum
   200 		CREATE_OBJECT	TCurrentSoundFormat		t_format		
   201 		COMMAND		t_format			new
   202 		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
   203 		//!verify default play configuration			
   204 		COMMAND		t_format			irate_get		default_play_format
   205 		COMMAND		t_format			iencoding_get		default_play_format
   206 		COMMAND		t_format			ichannels_get		default_play_format
   207 		COMMAND		t_format			ibuffer_size_get	default_play_format
   208 		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
   209 		//!verify default record configuration			
   210 		COMMAND		t_format			irate_get		default_record_format
   211 		COMMAND		t_format			iencoding_get		default_record_format
   212 		COMMAND		t_format			ichannels_get		default_record_format
   213 		COMMAND		t_format			ibuffer_size_get	default_record_format
   214 		COMMAND		devsound			utilityPromptMessage	start_record_and_playing_simultaneously
   215 		COMMAND		devsound			PlayData		default_file
   216 		COMMAND		devsound			RecordData		temp_file
   217 		OUTSTANDING
   218 		COMMAND		devsound			utilityPromptMessage	start_playing_audio_recorded_in_previous_step
   219 		COMMAND		devsound			PlayData		temp_file
   220 		OUTSTANDING
   221 		COMMAND		devsound			utilityDeleteFile	delete_temp_file
   222 		COMMAND		devsound			utilityPromptMessage	was_recorded_audio_correct
   223 		COMMAND		t_format			~
   224 		COMMAND		devsound  			Close
   225 		COMMAND		devsound  			~
   226 	END_TEST_BLOCK	 
   227 END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7041
   228 
   229 START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7042
   230 //! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7042
   231 //! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
   232 //!				RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
   233 //!				RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
   234 //!				RMdaDevSound::CancelNotifyPlayError()
   235 //! @SYMAuthor			Vassili Tsvetkov
   236 //! @SYMCreationDate		15/06/2008
   237 //! @SYMTestCaseDesc		Call NotifyPlayError before playing file. Play default audio file with default format and at the same time record audio 
   238 //!				to different sound file. Call CancelNotifyPlayError before playing recorded audio.
   239 //! @SYMTestActions		1. Call Open() with unit [UnitEnum]
   240 //!				2. Call GetPlayFormat() and verify from [default_play_format]
   241 //!				3. Call GetRecordFormat() and verify from [default_record_format]
   242 //!				4. Call NotifyPlayError()
   243 //!				5. Call PlayData() to play [default_audio_file]
   244 //!				6. Call RecordData to record audio to [temp_audio_file]
   245 //!				7. Call CancelNotifyPlayError()
   246 //!				8. Call PlayData() to play [temp_audio_file]
   247 //!				9. Call Close()
   248 //! @SYMTestStatus		Implemented
   249 //! @SYMTestPriority		Critical
   250 //! @SYMTestExpectedResults	NotifyPlayError() in step 3 completes with KErrUnderflow. Recording completes without any errors and recorded audio 
   251 //!				can be played. Playdata in step 4 completes with KErrNone. CancelNotifyPlayError completes with KErrNone.
   252 //!
   253 //! @SYMTestType		CIT
   254 	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
   255 		CREATE_OBJECT	RMdaDevSound			devsound  
   256 		COMMAND		devsound			new
   257 		COMMAND		devsound			Open			UnitEnum
   258 		COMMAND		devsound			CancelRecordData
   259 		CREATE_OBJECT	TCurrentSoundFormat		t_format		
   260 		COMMAND		t_format			new
   261 		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
   262 		//!verify default play configuration			
   263 		COMMAND		t_format			irate_get		default_play_format
   264 		COMMAND		t_format			iencoding_get		default_play_format
   265 		COMMAND		t_format			ichannels_get		default_play_format
   266 		COMMAND		t_format			ibuffer_size_get	default_play_format
   267 		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
   268 		//!verify default record configuration			
   269 		COMMAND		t_format			irate_get		default_record_format
   270 		COMMAND		t_format			iencoding_get		default_record_format
   271 		COMMAND		t_format			ichannels_get		default_record_format
   272 		COMMAND		t_format			ibuffer_size_get	default_record_format
   273 		COMMAND		devsound			utilityPromptMessage	start_record_and_playing_simultaneously
   274 		COMMAND	!AsyncError=-10	devsound			NotifyPlayError
   275 		COMMAND		devsound			PlayData		default_file		
   276 		COMMAND		devsound			RecordData		temp_file
   277 		OUTSTANDING
   278 		COMMAND		devsound			CancelNotifyPlayError
   279 		COMMAND		devsound			utilityPromptMessage	start_playing_audio_recorded_in_previous_step
   280 		COMMAND		devsound			PlayData		temp_file
   281 		OUTSTANDING
   282 		COMMAND		devsound			utilityDeleteFile	delete_temp_file
   283 		COMMAND		devsound			utilityPromptMessage	was_recorded_audio_correct
   284 		COMMAND		t_format			~
   285 		COMMAND		devsound  			Close
   286 		COMMAND		devsound  			~
   287 	END_TEST_BLOCK		 
   288 END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7042
   289 
   290 START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7043
   291 //! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7043
   292 //! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
   293 //!				RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
   294 //!				RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
   295 //!				RMdaDevSound::CancelNotifyRecordError()
   296 //! @SYMAuthor			Vassili Tsvetkov
   297 //! @SYMCreationDate		15/06/2008
   298 //! @SYMTestCaseDesc		Call NotifyRecordError before recording file. Play default audio file with default format and at the same time 
   299 //!				record audio to different sound file. Call CancelNotifyRecordError after recording.
   300 //! @SYMTestActions		1. Call Open() with unit [UnitEnum]
   301 //!				2. Call GetPlayFormat() and verify from [default_play_format]
   302 //!				3. Call GetRecordFormat() and verify from [default_record_format]
   303 //!				4. Call NotifyRecordError()
   304 //!				5. Call PlayData() to play [default_audio_file]
   305 //!				6. Call RecordData to record audio to [temp_audio_file]
   306 //!				7. Call CancelNotifyRecordError()
   307 //!				8. Call Close()
   308 //! @SYMTestStatus		Implemented
   309 //! @SYMTestPriority		Critical
   310 //! @SYMTestExpectedResults	NotifyRecordError() in step 5 completes with KErrOverflow. Recording in step 6 completes with KErrNone. 
   311 //!				Playing in step 3 completes with KErrNone. CancelNotifyRecordError completes with KErrNone.
   312 //! @SYMTestType		CIT
   313 	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
   314 		CREATE_OBJECT	RMdaDevSound			devsound  
   315 		COMMAND		devsound			new
   316 		COMMAND		devsound			Open			UnitEnum
   317 		COMMAND		devsound			CancelRecordData
   318 		CREATE_OBJECT	TCurrentSoundFormat		t_format		
   319 		COMMAND		t_format			new
   320 		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
   321 		//!verify default play configuration			
   322 		COMMAND		t_format			irate_get		default_play_format
   323 		COMMAND		t_format			iencoding_get		default_play_format
   324 		COMMAND		t_format			ichannels_get		default_play_format
   325 		COMMAND		t_format			ibuffer_size_get	default_play_format
   326 		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
   327 		//!verify default record configuration			
   328 		COMMAND		t_format			irate_get		default_record_format
   329 		COMMAND		t_format			iencoding_get		default_record_format
   330 		COMMAND		t_format			ichannels_get		default_record_format
   331 		COMMAND		t_format			ibuffer_size_get	default_record_format
   332 		COMMAND		devsound			utilityPromptMessage	start_record_and_playing_simultaneously
   333 		COMMAND	!AsyncError=-9	devsound			NotifyRecordError
   334 		COMMAND		devsound			PlayData		default_file		
   335 		COMMAND		devsound			RecordData		temp_file
   336 		OUTSTANDING
   337 		COMMAND		devsound			CancelNotifyRecordError
   338 		COMMAND		devsound			utilityPromptMessage	start_playing_audio_recorded_in_previous_step
   339 		COMMAND		devsound			PlayData		temp_file
   340 		OUTSTANDING
   341 		COMMAND		devsound			utilityDeleteFile	delete_temp_file
   342 		COMMAND		devsound			utilityPromptMessage	was_recorded_audio_correct
   343 		COMMAND		t_format			~
   344 		COMMAND		devsound  			Close
   345 		COMMAND		devsound  			~
   346 	END_TEST_BLOCK	 
   347 END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7043
   348