mmapitest/devsoundexthaitest/scripts/multimedia-mmf-devsoundext-validation-automated-r.script
changeset 26 c36d67f77f75
equal deleted inserted replaced
15:c1e808730d6c 26:c36d67f77f75
       
     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 //
       
    17 //! @file
       
    18 //! @SYMTestSuiteName multimedia-mmf-devsoundext-validation-automated-r
       
    19 //! @SYMScriptTestEnvironment This test script requires a basic ROM.
       
    20 //
       
    21 // Tests all public elements of the CMMFDevSound
       
    22 // classes as a means of confidence that the APIs work as expected.
       
    23 // 
       
    24 // The purpose is to provide a regression test suite of PublishedAll
       
    25 // APIs for: CMMFDevSound
       
    26 // The tests are fully automated.
       
    27 //
       
    28 
       
    29 
       
    30 
       
    31 LOAD_SUITE t_devsoundext
       
    32 
       
    33 
       
    34 
       
    35 
       
    36 
       
    37 START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0001
       
    38 
       
    39 //!@SYMTestCaseID		MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0001
       
    40 //!@SYMAPI
       
    41 //!                void InitializeL(MDevSoundObserver {ref}, TFourCC , TMMFState );
       
    42 //!                CMMFAudioInput::SetAudioInputL(TAudioInputArray)
       
    43 //!@SYMAuthor			jpacho
       
    44 //!@SYMCreationDate		8/11/2008 
       
    45 //!@SYMTestCaseDesc		HW limitation - Radio recording without radio playback
       
    46 //!@SYMTestActions
       
    47 //!                1. Create DevSound instance
       
    48 //!                2. Create AudioInput instance (DevSoundInstanceName = devsound1)
       
    49 //!                3. Replace file (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\HwLimitRadioRecWithoutRadioPlay.pcm)      
       
    50 //!                4. Initialize DevSound (Mode = EMMFStateRecording; FourCC ={SpecialFourCC,RAW})                 
       
    51 //!                5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference =                           {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording)    
       
    52 //!                6. Capabilities                                    
       
    53 //!                7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz)                 
       
    54 //!                8. Set audio Input (AudioInput = Input_FMRadio)                                  
       
    55 //!                9.Start record (ExpectedRecordError = -21)                          
       
    56 //!                10.Close file                                 
       
    57 //!                11.Destroy AudioInput instance                 
       
    58 //!                12.Destroy DevSound instance
       
    59 //!@SYMTestStatus		Verified
       
    60 //!@SYMTestPriority		High
       
    61 //!@SYMTestExpectedResults  in step 9, record return the expected error -21.
       
    62 //!@SYMTestType			CIT
       
    63 
       
    64 	START_TEST_BLOCK	90	t_devsoundext	\multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-r.ini
       
    65 		CREATE_OBJECT	CMMFDevSound		devsound1
       
    66 		CREATE_OBJECT	CAudioInput		audioinput1
       
    67 		COMMAND		devsound1		NewL
       
    68 		COMMAND		audioinput1		NewL			MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-NewL_command02
       
    69 		COMMAND		devsound1		ReplaceFile			MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-ReplaceFile_command03
       
    70 		COMMAND		devsound1		InitializeL			MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-InitializeL_command04
       
    71 		OUTSTANDING
       
    72 		COMMAND		devsound1		SetPrioritySettings			MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-SetPrioritySettings_command05
       
    73 		COMMAND		devsound1		Capabilities
       
    74 		COMMAND		devsound1		SetConfigL			MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-SetConfigL_command07
       
    75 		COMMAND		audioinput1		SetAudioInput			MULTIMEDIA-MMF-DevSoundExt-R-0001-0001-SetAudioInput_command08
       
    76 		COMMAND	    !AsyncError=-21	devsound1		RecordInitL
       
    77 		ASYNC_DELAY  10000000 
       
    78 		COMMAND		devsound1		CloseFile
       
    79 		COMMAND		audioinput1		~
       
    80 		COMMAND		devsound1		~
       
    81 	END_TEST_BLOCK
       
    82 END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0001
       
    83 
       
    84 
       
    85 
       
    86 
       
    87 START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0002
       
    88 
       
    89 //!@SYMTestCaseID		MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0002
       
    90 //!@SYMAPI
       
    91 //!                void InitializeL(MDevSoundObserver {ref}, TFourCC , TMMFState );
       
    92 //!                CMMFAudioInput::SetAudioInputL(TAudioInputArray)
       
    93 //!@SYMAuthor			jpacho
       
    94 //!@SYMCreationDate		8/11/2008 
       
    95 //!@SYMTestCaseDesc		HW limitation - Voice call recording without any input source
       
    96 //!@SYMTestActions
       
    97 //!                1. Create DevSound instance
       
    98 //!                2. Create AudioInput instance (DevSoundInstanceName = devsound1)
       
    99 //!                3. Replace file (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\HwLimitRadioRecWithoutRadioPlay.pcm)  
       
   100 //!                4. Initialize DevSound (Mode = EMMFStateRecording; FourCC ={SpecialFourCC,RAW})              
       
   101 //!                5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording)                
       
   102 //!                6. Capabilities                            
       
   103 //!                7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz)               
       
   104 //!                8. Set audio Input (AudioInput = Input_VoiceCall)                             
       
   105 //!                9.Start record (ExpectedRecordError = -21)                       
       
   106 //!                10.Close file                             
       
   107 //!                11.Destroy AudioInput instance                
       
   108 //!                12.Destroy DevSound instance
       
   109 //!@SYMTestStatus		Verified
       
   110 //!@SYMTestPriority		High
       
   111 //!@SYMTestExpectedResults  in step 9, record return the expected error -21.
       
   112 //!@SYMTestType			CIT
       
   113 
       
   114 	START_TEST_BLOCK	90	t_devsoundext	\multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-r.ini
       
   115 		CREATE_OBJECT	CMMFDevSound		devsound1
       
   116 		CREATE_OBJECT	CAudioInput		audioinput1
       
   117 		COMMAND		devsound1		NewL
       
   118 		COMMAND		audioinput1		NewL			MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-NewL_command02
       
   119 		COMMAND		devsound1		ReplaceFile			MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-ReplaceFile_command03
       
   120 		COMMAND		devsound1		InitializeL			MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-InitializeL_command04
       
   121 		OUTSTANDING
       
   122 		COMMAND		devsound1		SetPrioritySettings			MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-SetPrioritySettings_command05
       
   123 		COMMAND		devsound1		Capabilities
       
   124 		COMMAND		devsound1		SetConfigL			MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-SetConfigL_command07
       
   125 		COMMAND		audioinput1		SetAudioInput			MULTIMEDIA-MMF-DevSoundExt-R-0002-0001-SetAudioInput_command08
       
   126 		COMMAND		!AsyncError=-21 devsound1		RecordInitL
       
   127 		ASYNC_DELAY  10000000 
       
   128 		COMMAND		devsound1		CloseFile
       
   129 		COMMAND		audioinput1		~
       
   130 		COMMAND		devsound1		~
       
   131 	END_TEST_BLOCK
       
   132 END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0002
       
   133 
       
   134 
       
   135 
       
   136 
       
   137 START_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0003
       
   138 
       
   139 //!@SYMTestCaseID		MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0003
       
   140 //!@SYMAPI
       
   141 //!                void InitializeL(MDevSoundObserver {ref}, TFourCC , TMMFState );
       
   142 //!                CMMFAudioInput::SetAudioInputL(TAudioInputArray)
       
   143 //!@SYMAuthor			jpacho
       
   144 //!@SYMCreationDate		8/11/2008 
       
   145 //!@SYMTestCaseDesc		Audio routing - 8k mono recording from line in
       
   146 //!@SYMTestActions
       
   147 //!                1. Create DevSound instance     
       
   148 //!                2. Create AudioInput instance (DevSoundInstanceName = devsound1)
       
   149 //!                3. Replace file (Filename = {drive,mmc}\multimedia\mmf\devsound\Recording\RoutingRecLinein.amr)   
       
   150 //!                4. Initialize DevSound (Mode = EMMFStateRecording; FourCC = AMR)          
       
   151 //!                5. Set Priority (Priority = {Priority,PriorityVoiceRecording}; Preference = {PriorityPreference,PriorityPreferenceVoiceRecording};PriorityState=EMMFStateRecording)   
       
   152 //!                6. Capabilities     
       
   153 //!                7. Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz)        
       
   154 //!                8. Set audio Input (AudioInput = Input_LineIn)         
       
   155 //!                9.Start record 10s            
       
   156 //!                10.Stop 5s            
       
   157 //!                11. Initialize DevSound (Mode = EMMFStateRecording; FourCC = AMR)        
       
   158 //!                12.Capabilities          
       
   159 //!                13.Set Configuration (Channels = EMMFMono; Rate = EMMFSampleRate8000Hz)      
       
   160 //!                14. Set Priority (Priority = {Priority,PriorityAudioPlayback}; Preference = {PriorityPreference,PriorityPreferenceAudioPlayback};PriorityState=EMMFStatePlaying)
       
   161 //!                15. FileStartPosition   
       
   162 //!                16.Star play    
       
   163 //!                17.Close file   
       
   164 //!                18.Destroy AudioInput instance   
       
   165 //!                19.Destroy DevSound instance
       
   166 //!@SYMTestStatus		Verified
       
   167 //!@SYMTestPriority		High
       
   168 //!@SYMTestExpectedResults  in step 9, record successfully.
       
   169 //!                         in step 16, play successfully.
       
   170 //!@SYMTestType			CIT
       
   171 
       
   172 	START_TEST_BLOCK	90	t_devsoundext	\multimedia\mmf\devsound\multimedia-mmf-devsoundext-validation-automated-r.ini
       
   173 		CREATE_OBJECT	CMMFDevSound		devsound1
       
   174 		CREATE_OBJECT	CAudioInput		audioinput1
       
   175 		COMMAND		devsound1		NewL
       
   176 		COMMAND		audioinput1		NewL			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-NewL_command02
       
   177 		COMMAND		devsound1		ReplaceFile			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-ReplaceFile_command03
       
   178 		COMMAND		devsound1		InitializeL			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-InitializeL_command04
       
   179 		OUTSTANDING
       
   180 		COMMAND		devsound1		SetPrioritySettings			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetPrioritySettings_command05
       
   181 		COMMAND		devsound1		Capabilities
       
   182 		COMMAND		devsound1		SetConfigL			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetConfigL_command07
       
   183 		COMMAND		audioinput1		SetAudioInput			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetAudioInput_command08
       
   184 		COMMAND		devsound1		RecordInitL
       
   185 		ASYNC_DELAY  10000000 
       
   186 		COMMAND		devsound1		Stop
       
   187 		DELAY  5000000 
       
   188 		COMMAND		devsound1		InitializeL			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-InitializeL_command11
       
   189 		OUTSTANDING
       
   190 		COMMAND		devsound1		Capabilities
       
   191 		COMMAND		devsound1		SetConfigL			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetConfigL_command13
       
   192 		COMMAND		devsound1		SetPrioritySettings			MULTIMEDIA-MMF-DevSoundExt-R-0003-0001-SetPrioritySettings_command14
       
   193 		COMMAND		devsound1		FileStartPosition
       
   194 		COMMAND		devsound1		PlayInitL
       
   195 		ASYNC_DELAY  10000000 
       
   196 		COMMAND		devsound1		CloseFile
       
   197 		COMMAND		audioinput1		~
       
   198 		COMMAND		devsound1		~
       
   199 	END_TEST_BLOCK
       
   200 END_TESTCASE MULTIMEDIA-MMF-DEVSOUNDEXT-VALIDATION-AUTOMATED-RECORDING-0003