messagingfw/msgtestproduct/media/scripts/msg-dynamicview-ops.script
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 //
       
     2 // Copyright (c) 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 LOAD_SERVER t_media  -SharedData
       
    18 
       
    19 //! @file			
       
    20 //! @SYMTestSuiteName		MSG-DYNAMICVIEW-OPS
       
    21 //! @SYMScriptTestEnvironment   Details as in below:-
       
    22 //!				1. nt-ras connection or winpcap
       
    23 //!				2. email servers ( communigatePro or ms exchange)
       
    24 //!				3. test driver
       
    25 //!				4. testexecute framework(TEF3.0)
       
    26 //!				
       
    27 //! @SYMScriptPurpose		Integration testing of PREQ557-"Improved support in Messaging for removable media"
       
    28 //! @SYMScriptCreationDate	04/04/2008
       
    29 
       
    30 
       
    31 START_TESTCASE	MSG-DYNAMICVIEW-OPS-0001
       
    32 //! 	@SYMTestCaseID		MSG-DYNAMICVIEW-OPS-0001
       
    33 //! 	@SYMTestCaseDesc	View messages across multiple drives 
       
    34 //!				
       
    35 //!	@SYMREQ			REQ9045, REQ9166 and REQ9047
       
    36 //!	@SYMPREQ 		PREQ557
       
    37 //!	@SYMAPI			void CMsvSession::DriveListL(RArray<TDriveNumber>& aDriveList)
       
    38 //!				void CMsvSession::AvailableDriveListL(RArray<TDriveNumber>& aDriveList)
       
    39 //!				void CMsvSession::CurrentDriveInfo (TDriveNumber& aDrive, Tint& aPriority)
       
    40 //!				
       
    41 //!				void CMsvSession::UpdateDrivePriorityL (TDriveNumber aDrive, TInt& aPriority)
       
    42 //!				CMsvEntrySelection* CMsvEntry::ChildrenOfAvailableDrivesL()
       
    43 //!				void GetChildIdsAllL (TMsvId aId, const CMsvEntryFilter &aFilter, CMsvEntrySelection& aSelection);
       
    44 //!				
       
    45 //!				
       
    46 //!	@SYMTestCaseDependencies msg-sms-message.script
       
    47 //!				
       
    48 //! 	@SYMTestPriority	High
       
    49 //! 	@SYMTestActions		1. Intialize the preferred drives with accounts and messages (run the msg-sms-message.script)
       
    50 //!				2. Check standard folders and sms messages of all drive are visible
       
    51 //!				
       
    52 //! 	@SYMTestExpectedResults 1. Accounts and messages should be created in all drives
       
    53 //!				2. All standard folders should be visible
       
    54 //!				
       
    55 //!	@SYMAuthor		Rajat Bal
       
    56 //!				
       
    57 //! 	@SYMTestType		CIT
       
    58 //! 	@SYMTestStatus 		Defined
       
    59 
       
    60 
       
    61 START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
    62 	CREATE_OBJECT	CenRepTestWrapper	0100_obj
       
    63 	COMMAND		0100_obj		ResetCentralRepository	0100_ResetCentralRepository
       
    64 END_TEST_BLOCK
       
    65 
       
    66 
       
    67 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.ini	c:\private\1000484b\msgprioritydrivelist.bak
       
    68 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
    69 RUN_UTILS  CopyFile   		c:\msgtest\media\msg-dynamicview-0001.ini	c:\private\1000484b\msgprioritydrivelist.ini
       
    70 
       
    71 	START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
    72 		CREATE_OBJECT	MediaTestWrapper	0001_obj_1
       
    73 		COMMAND		0001_obj_1		New		0001_obj_1
       
    74 		COMMAND		0001_obj_1		GetDrivelist	0001_GetDrivelist_1
       
    75 		COMMAND		0001_obj_1		GetAvailableDriveList	0001_GetAvailableDriveList_1
       
    76 		STORE		0001_obj_1		
       
    77 		COMMAND		0001_obj_1		GetCurrentDrive	0001_GetCurrentDrive_1
       
    78 	END_TEST_BLOCK	
       
    79 
       
    80 RUN_UTILS DeleteFile c:\messaging.db
       
    81 RUN_SCRIPT c:\msgtest\media\msg-sms-message.script
       
    82 
       
    83 	START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
    84 		RESTORE_OBJECT	MediaTestWrapper	0001_obj_1
       
    85 		COMMAND		0001_obj_1		UpdateDrive	0001_UpdateDrive_high
       
    86 		STORE		0001_obj_1		
       
    87 		COMMAND		0001_obj_1		GetCurrentDrive	0001_GetCurrentDrive_2
       
    88 	END_TEST_BLOCK
       
    89 
       
    90 RUN_UTILS DeleteFile d:\messaging.db
       
    91 RUN_SCRIPT c:\msgtest\media\msg-sms-message.script
       
    92 	
       
    93 	START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
    94 		RESTORE_OBJECT	MediaTestWrapper	0001_obj_1
       
    95 		COMMAND		0001_obj_1		ChildrenOfAvailableDrives	0001_ChildrenOfAvailableDrives_1
       
    96 		COMMAND		0001_obj_1		GetChildIdsAll		0001_GetChildIdsAll_1
       
    97 	END_TEST_BLOCK
       
    98 
       
    99 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
   100 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.bak	c:\private\1000484b\msgprioritydrivelist.ini
       
   101 RUN_UTILS  DeleteFile		c:\private\1000484b\msgprioritydrivelist.bak
       
   102 
       
   103 END_TESTCASE	MSG-DYNAMICVIEW-OPS-0001
       
   104 
       
   105 
       
   106 START_TESTCASE	MSG-DYNAMICVIEW-OPS-0002
       
   107 //! 	@SYMTestCaseID		MSG-DYNAMICVIEW-OPS-0002
       
   108 //! 	@SYMTestCaseDesc	View messages when there is no drive in the preferred drive list
       
   109 //!				
       
   110 //!	@SYMREQ			REQ9045 and REQ9047
       
   111 //!	@SYMPREQ 		PREQ557
       
   112 //!	@SYMAPI			void CMsvSession::DriveListL(RArray<TDriveNumber>& aDriveList)
       
   113 //!				void CMsvSession::AvailableDriveListL(RArray<TDriveNumber>& aDriveList)
       
   114 //!				void CMsvSession::CurrentDriveInfo (TDriveNumber& aDrive, Tint& aPriority)
       
   115 //!				
       
   116 //!				void CMsvSession::UpdateDrivePriorityL (TDriveNumber aDrive, TInt& aPriority)
       
   117 //!				CMsvEntrySelection* CMsvEntry::ChildrenOfAvailableDrivesL()
       
   118 //!				void GetChildIdsAllL (TMsvId aId, const CMsvEntryFilter &aFilter, CMsvEntrySelection& aSelection);
       
   119 //!				
       
   120 //!	@SYMTestCaseDependencies Set preferred drive configuration file(msgprioritydrivelist.ini) is empty
       
   121 //!				
       
   122 //! 	@SYMTestPriority	High
       
   123 //! 	@SYMTestActions		1. Copy the existing preferred drive configuration file 
       
   124 //!				   Z:\private\1000484b\msgPriorityDriveList.ini to Z:\private\1000484b\msgPriorityDriveList.bak
       
   125 //!				2. Copy an empty configuration file 
       
   126 //!				   C:\msgtest\media\msgPriorityDriveList_empty.ini to Z:\private\1000484b\msgPriorityDriveList.ini
       
   127 //!				3. Start message server
       
   128 //!				4. Check the drive list
       
   129 //!				5. Check the available drive list
       
   130 //!				6. Get the current drive
       
   131 //!				Note: which will return the system drive(C:) as the current drive
       
   132 //!				7. Cleanup all messages(C: drive)
       
   133 //!				8. Create a sms account
       
   134 //!				9. Create and send an sms message of body text size of 10kb
       
   135 //!				10. Download the sms message to current drive
       
   136 //!				11. Check there is a sms message in inbox of sms account(standard folder)
       
   137 //!				
       
   138 //!				12. Copy the backup preferred drive configuration file 
       
   139 //!				    Z:\private\1000484b\msgPriorityDriveList.bak to Z:\private\1000484b\msgPriorityDriveList.ini
       
   140 //!				
       
   141 //! 	@SYMTestExpectedResults 1. Backup the existing configuration file 
       
   142 //!				2. Replaced the existing file with a empty one
       
   143 //!				3. Message server should start
       
   144 //!				4. Only system drive is present
       
   145 //!				5. Only system drive is present
       
   146 //!				6. Current drive should be the C: drive
       
   147 //!				7. Deleted all messages
       
   148 //!				8. Created a sms account
       
   149 //!				9. Created and sent a sms 
       
   150 //!				10. Download completed
       
   151 //!				11. One sms is there
       
   152 //!				12. Rollback to old configuration file
       
   153 //!				
       
   154 //!	@SYMAuthor		Rajat Bal
       
   155 //!				
       
   156 //! 	@SYMTestType		CIT
       
   157 //! 	@SYMTestStatus 		Defined
       
   158 
       
   159 START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
   160 	CREATE_OBJECT	CenRepTestWrapper	0100_obj
       
   161 	COMMAND		0100_obj		ResetCentralRepository	0100_ResetCentralRepository
       
   162 END_TEST_BLOCK
       
   163 
       
   164 
       
   165 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.ini	c:\private\1000484b\msgprioritydrivelist.bak
       
   166 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
   167 RUN_UTILS  CopyFile   		c:\msgtest\media\msg-dynamicview-0002.ini	c:\private\1000484b\msgprioritydrivelist.ini
       
   168 
       
   169 	START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
   170 		CREATE_OBJECT	MediaTestWrapper	0002_obj_1
       
   171 		COMMAND		0002_obj_1		New		0002_obj_1
       
   172 		COMMAND		0002_obj_1		GetDrivelist	0002_GetDrivelist_1
       
   173 		COMMAND		0002_obj_1		GetAvailableDriveList	0002_GetAvailableDriveList_1
       
   174 		STORE		0002_obj_1		
       
   175 		COMMAND		0002_obj_1		GetCurrentDrive	0002_GetCurrentDrive_1
       
   176 	END_TEST_BLOCK	
       
   177 
       
   178 RUN_UTILS DeleteFile c:\messaging.db
       
   179 RUN_SCRIPT c:\msgtest\media\msg-sms-message.script
       
   180 	
       
   181 	START_TEST_BLOCK	100	t_media		c:\msgtest\media\msg-dynamicview-ops.ini
       
   182 		RESTORE_OBJECT	MediaTestWrapper	0002_obj_1
       
   183 		COMMAND		0002_obj_1		ChildrenOfAvailableDrives	0002_ChildrenOfAvailableDrives_Sent
       
   184 		COMMAND !Error=-6 0002_obj_1		GetChildIdsAll			0002_GetChildIdsAll_Root
       
   185 		COMMAND !Error=-6 0002_obj_1		GetChildIdsAll			0002_GetChildIdsAll_LocalService
       
   186 		COMMAND		0002_obj_1		GetChildIdsAll			0002_GetChildIdsAll_Sent
       
   187 	END_TEST_BLOCK
       
   188 
       
   189 RUN_UTILS  MakeReadWrite  	c:\private\1000484b\msgprioritydrivelist.ini
       
   190 RUN_UTILS  CopyFile   		c:\private\1000484b\msgprioritydrivelist.bak	c:\private\1000484b\msgprioritydrivelist.ini
       
   191 RUN_UTILS  DeleteFile		c:\private\1000484b\msgprioritydrivelist.bak
       
   192 
       
   193 END_TESTCASE	MSG-DYNAMICVIEW-OPS-0002
       
   194