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