|
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-MEDIA-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-MEDIA-OPS-0001 |
|
32 //! @SYMTestCaseID MSG-MEDIA-OPS-0001 |
|
33 //! @SYMTestCaseDesc Remove the media from current drive and insert it again |
|
34 //! |
|
35 //! @SYMREQ REQ9166 |
|
36 //! @SYMPREQ PREQ557 |
|
37 //! @SYMAPI void CMsvSession::CurrentDriveInfo (TDriveNumber& aDrive, Tint& aPriority) |
|
38 //! void CMsvSession::DriveListL(RArray<TDriveNumber>& aDriveList) |
|
39 //! void CMsvSession::AvailableDriveListL(RArray<TDriveNumber>& aDriveList) |
|
40 //! CMsvEntrySelection* CMsvEntry::ChildrenOfAvailableDrivesL() |
|
41 //! TBool MessageServer::IsMessageStoreSupported(TDriveNumber aDrive) |
|
42 //! |
|
43 //! @SYMTestCaseDependencies ms-presetup-0001.script |
|
44 //! |
|
45 //! @SYMTestPriority High |
|
46 //! @SYMTestActions 1. Intialize the preferred drives with accounts and messages (run the ms-presetup-0001.script) |
|
47 //! 2. Get the current drive(C: drive) |
|
48 //! 3. Update the drive(E: drive) with highest priority |
|
49 //! 4. Get the current drive(E: drive) |
|
50 //! 5. Unmount the drive(E: drive) |
|
51 //! 6. Check the drive(E: drive) is present in preferred drive list |
|
52 //! 7. Check the drive(E: drive) is unavailable |
|
53 //! 8. Get the current drive(C: drive) |
|
54 //! Note: next higher priority drive is C: drive |
|
55 //! |
|
56 //! 9. Mount the higher priority drive(E: drive) |
|
57 //! 10. Get the current drive(E: drive) |
|
58 //! 11. Check the drive(E: drive) is available |
|
59 //! 12. Check message store in the drive(E: drive) is readable |
|
60 //! |
|
61 //! @SYMTestExpectedResults 1. Accounts and messages should be created in all drives |
|
62 //! 2. C: drive should be the current drive |
|
63 //! 3. Should be updated with the high priority |
|
64 //! 4. Notify with EMsvCurrentDriveChanged |
|
65 //! 5. E: drive should be the current drive |
|
66 //! 6. E: drive should be present in preferred drive list |
|
67 //! 7. E: drive should be unavailable |
|
68 //! 8. C: drive should be the current drive |
|
69 //! 9. Notify with EMsvCurrentDriveChanged |
|
70 //! 10. E: drive should be the current drive |
|
71 //! 11. E: drive should be available |
|
72 //! 12. E: drive should be readable |
|
73 //! |
|
74 //! @SYMAuthor Rajat Bal |
|
75 //! |
|
76 //! @SYMTestType CIT |
|
77 //! @SYMTestStatus Defined |
|
78 |
|
79 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
80 CREATE_OBJECT CenRepTestWrapper 0100_obj |
|
81 COMMAND 0100_obj ResetCentralRepository 0100_ResetCentralRepository |
|
82 END_TEST_BLOCK |
|
83 |
|
84 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.ini c:\private\1000484b\msgprioritydrivelist.bak |
|
85 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
86 RUN_UTILS CopyFile c:\msgtest\media\msg-media-0001.ini c:\private\1000484b\msgprioritydrivelist.ini |
|
87 |
|
88 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
89 CREATE_OBJECT MediaTestWrapper 0001_obj_1 |
|
90 COMMAND 0001_obj_1 New 0001_obj_1 |
|
91 COMMAND 0001_obj_1 GetCurrentDrive 0001_GetCurrentDrive_1 |
|
92 COMMAND 0001_obj_1 UpdateDrive 0001_UpdateDrive_1 |
|
93 COMMAND 0001_obj_1 GetCurrentDrive 0001_GetCurrentDrive_2 |
|
94 COMMAND 0001_obj_1 DisMountDrive 0001_DisMountDrive_1 |
|
95 COMMAND 0001_obj_1 GetDrivelist 0001_GetDrivelist_1 |
|
96 COMMAND 0001_obj_1 GetAvailableDriveList 0001_GetAvailableDriveList_1 |
|
97 COMMAND 0001_obj_1 GetCurrentDrive 0001_GetCurrentDrive_3 |
|
98 COMMAND 0001_obj_1 MountDrive 0001_MountDrive_1 |
|
99 COMMAND 0001_obj_1 GetAvailableDriveList 0001_GetAvailableDriveList_2 |
|
100 COMMAND 0001_obj_1 MessageStoreSupported 0001_MessageStoreSupported_1 |
|
101 END_TEST_BLOCK |
|
102 |
|
103 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
104 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.bak c:\private\1000484b\msgprioritydrivelist.ini |
|
105 RUN_UTILS DeleteFile c:\private\1000484b\msgprioritydrivelist.bak |
|
106 |
|
107 END_TESTCASE MSG-MEDIA-OPS-0001 |
|
108 |
|
109 |
|
110 START_TESTCASE MSG-MEDIA-OPS-0002 |
|
111 //! @SYMTestCaseID MSG-MEDIA-OPS-0002 |
|
112 //! @SYMTestCaseDesc Remove a lesser priority media and insert it again |
|
113 //! |
|
114 //! @SYMREQ REQ9166 |
|
115 //! @SYMPREQ PREQ557 |
|
116 //! @SYMAPI void CMsvSession::CurrentDriveInfo (TDriveNumber& aDrive, Tint& aPriority) |
|
117 //! void CMsvSession::DriveListL(RArray<TDriveNumber>& aDriveList) |
|
118 //! void CMsvSession::AvailableDriveListL(RArray<TDriveNumber>& aDriveList) |
|
119 //! CMsvEntrySelection* CMsvEntry::ChildrenOfAvailableDrivesL() |
|
120 //! TBool MessageServer::IsMessageStoreSupported(TDriveNumber aDrive) |
|
121 //! |
|
122 //! @SYMTestCaseDependencies ms-presetup-0001.script |
|
123 //! |
|
124 //! @SYMTestPriority High |
|
125 //! @SYMTestActions 1. Intialize the preferred drives with accounts and messages (run the ms-presetup-0001.script) |
|
126 //! 2. Get the current drive(C: drive) |
|
127 //! 3. Get the lesser priority drive (let D: drive is the lesser priority drive) |
|
128 //! 4. Unmount the drive(D: drive) |
|
129 //! 5. Check the drive(D: drive) is present in preferred drive list |
|
130 //! 6. Check the drive(D: drive) is unavilable |
|
131 //! 7. Get the current drive(C: drive) |
|
132 //! 8. Mount the drive(D: drive) |
|
133 //! 9. Check the drive(D: drive) is available |
|
134 //! 10. Check message store in the drive(D: drive) is readable |
|
135 //! |
|
136 //! @SYMTestExpectedResults 1. Accounts and messages should be created in all drives |
|
137 //! 2. E: drive should be the current drive |
|
138 //! 3. Returned D: drive |
|
139 //! 4. Notify with EMsvRefreshMessageView |
|
140 //! 5. D: drive should present in preferred drive list |
|
141 //! 6. D: drive should be available |
|
142 //! 7. E: drive should be remain as current drive |
|
143 //! 8. Notify with EMsvRefreshMessageView |
|
144 //! 9. D: drive should be available |
|
145 //! 10. D: drive should be readable |
|
146 //! |
|
147 //! @SYMAuthor Rajat Bal |
|
148 //! |
|
149 //! @SYMTestType CIT |
|
150 //! @SYMTestStatus Defined |
|
151 |
|
152 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
153 CREATE_OBJECT CenRepTestWrapper 0100_obj |
|
154 COMMAND 0100_obj ResetCentralRepository 0100_ResetCentralRepository |
|
155 END_TEST_BLOCK |
|
156 |
|
157 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.ini c:\private\1000484b\msgprioritydrivelist.bak |
|
158 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
159 RUN_UTILS CopyFile c:\msgtest\media\msg-media-0002.ini c:\private\1000484b\msgprioritydrivelist.ini |
|
160 |
|
161 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
162 CREATE_OBJECT MediaTestWrapper 0002_obj_1 |
|
163 COMMAND 0002_obj_1 New 0002_obj_1 |
|
164 COMMAND 0002_obj_1 GetCurrentDrive 0002_GetCurrentDrive_1 |
|
165 COMMAND 0002_obj_1 DisMountDrive 0002_DisMountDrive_1 |
|
166 COMMAND 0002_obj_1 GetDrivelist 0002_GetDrivelist_1 |
|
167 COMMAND 0002_obj_1 GetAvailableDriveList 0002_GetAvailableDriveList_1 |
|
168 COMMAND 0002_obj_1 GetCurrentDrive 0002_GetCurrentDrive_3 |
|
169 COMMAND 0002_obj_1 MountDrive 0002_MountDrive_1 |
|
170 COMMAND 0002_obj_1 GetAvailableDriveList 0002_GetAvailableDriveList_2 |
|
171 COMMAND 0002_obj_1 MessageStoreSupported 0002_MessageStoreSupported_1 |
|
172 END_TEST_BLOCK |
|
173 |
|
174 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
175 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.bak c:\private\1000484b\msgprioritydrivelist.ini |
|
176 RUN_UTILS DeleteFile c:\private\1000484b\msgprioritydrivelist.bak |
|
177 |
|
178 END_TESTCASE MSG-MEDIA-OPS-0002 |
|
179 |
|
180 START_TESTCASE MSG-MEDIA-OPS-0003 |
|
181 //! @SYMTestCaseID MSG-MEDIA-OPS-0003 |
|
182 //! @SYMTestCaseDesc Remove media while downloading the message |
|
183 //! |
|
184 //! @SYMREQ REQ9166 |
|
185 //! @SYMPREQ PREQ557 |
|
186 //! @SYMAPI void CMsvSession::CurrentDriveInfo (TDriveNumber& aDrive, Tint& aPriority) |
|
187 //! void CMsvSession::DriveListL(RArray<TDriveNumber>& aDriveList) |
|
188 //! void CMsvSession::AvailableDriveListL(RArray<TDriveNumber>& aDriveList) |
|
189 //! CMsvEntrySelection* CMsvEntry::ChildrenOfAvailableDrivesL() |
|
190 //! TBool MessageServer::IsMessageStoreSupported(TDriveNumber aDrive) |
|
191 //! |
|
192 //! @SYMTestCaseDependencies ms-presetup-0001.script |
|
193 //! |
|
194 //! @SYMTestPriority High |
|
195 //! @SYMTestActions 1. Intialize the preferred drives with accounts and messages (run the ms-presetup-0001.script) |
|
196 //! 2. Get the current drive(C: drive) |
|
197 //! 3. Update the drive(E: drive)with high priority |
|
198 //! 4. Get the current drive(E: drive) |
|
199 //! 5. Unmount the drive(E: drive) while downloading ten messages |
|
200 //! 6. Check the drive(E: drive) is present in preferred drive list |
|
201 //! 7. Check the drive(E: drive) is unavailable |
|
202 //! 8. Get the current drive |
|
203 //! |
|
204 //! 9. Mount the drive(E: drive) |
|
205 //! 10. Check the drive(E: drive) is available |
|
206 //! 11. Check message store in the drive(E: drive) is readable |
|
207 //! 12. Change the drive(E: drive) is the current drive |
|
208 //! |
|
209 //! @SYMTestExpectedResults 1. Accounts and messages should be created in all drives |
|
210 //! 2. C: drive should be the current drive |
|
211 //! 3. Should updated with high priority |
|
212 //! 4. E: drive should be the current drive |
|
213 //! 5. Should capture EMsvCurrentDriveChanged notification |
|
214 //! 6. E: drive should be present in preferred drive list |
|
215 //! 7. E: drive should be unavailable |
|
216 //! 8. D: drive should be the current drive(which is next higer priority drive) |
|
217 //! 9. Captured EMsvCurrentDriveChanged notification |
|
218 //! 10. E: drive should be available |
|
219 //! 11. E: drive should be readable |
|
220 //! 12. E: drive should be the current drive |
|
221 //! |
|
222 //! @SYMAuthor Rajat Bal |
|
223 //! |
|
224 //! @SYMTestType CIT |
|
225 //! @SYMTestStatus Defined |
|
226 |
|
227 |
|
228 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
229 CREATE_OBJECT CenRepTestWrapper 0100_obj |
|
230 COMMAND 0100_obj ResetCentralRepository 0100_ResetCentralRepository |
|
231 END_TEST_BLOCK |
|
232 |
|
233 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.ini c:\private\1000484b\msgprioritydrivelist.bak |
|
234 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
235 RUN_UTILS CopyFile c:\msgtest\media\msg-media-0003.ini c:\private\1000484b\msgprioritydrivelist.ini |
|
236 |
|
237 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
238 CREATE_OBJECT MediaTestWrapper 0003_obj_1 |
|
239 COMMAND 0003_obj_1 New 0003_obj_1 |
|
240 COMMAND 0003_obj_1 GetCurrentDrive 0003_GetCurrentDrive_1 |
|
241 COMMAND 0003_obj_1 UpdateDrive 0003_UpdateDrive_1 |
|
242 COMMAND 0003_obj_1 GetCurrentDrive 0003_GetCurrentDrive_2 |
|
243 COMMAND 0003_obj_1 DisMountDrive 0003_DisMountDrive_1 |
|
244 COMMAND 0003_obj_1 GetDrivelist 0003_GetDrivelist_1 |
|
245 COMMAND 0003_obj_1 GetAvailableDriveList 0003_GetAvailableDriveList_1 |
|
246 COMMAND 0003_obj_1 GetCurrentDrive 0003_GetCurrentDrive_3 |
|
247 COMMAND 0003_obj_1 MountDrive 0003_MountDrive_1 |
|
248 COMMAND 0003_obj_1 GetAvailableDriveList 0003_GetAvailableDriveList_2 |
|
249 COMMAND 0003_obj_1 MessageStoreSupported 0003_MessageStoreSupported_1 |
|
250 END_TEST_BLOCK |
|
251 |
|
252 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
253 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.bak c:\private\1000484b\msgprioritydrivelist.ini |
|
254 RUN_UTILS DeleteFile c:\private\1000484b\msgprioritydrivelist.bak |
|
255 |
|
256 END_TESTCASE MSG-MEDIA-OPS-0003 |
|
257 |
|
258 |
|
259 START_TESTCASE MSG-MEDIA-OPS-0004 |
|
260 //! @SYMTestCaseID MSG-MEDIA-OPS-0004 |
|
261 //! @SYMTestCaseDesc Remove a media which is not in the preferred drive list and insert it again |
|
262 //! |
|
263 //! @SYMREQ REQ9166 |
|
264 //! @SYMPREQ PREQ557 |
|
265 //! @SYMAPI void CMsvSession::DriveListL(RArray<TDriveNumber>& aDriveList) |
|
266 //! |
|
267 //! @SYMTestCaseDependencies Ensure a drive(K:) is present in epoc.ini but not in preferred drive list |
|
268 //! |
|
269 //! @SYMTestPriority High |
|
270 //! @SYMTestActions 1. Unmount the drive(K: drive) |
|
271 //! 2. Check the drive(K: drive) is not present in preferred drive list |
|
272 //! |
|
273 //! 3. Mount the drive(K: drive) |
|
274 //! 4. Check the drive(K: drive) is not present in preferred drive list |
|
275 //! |
|
276 //! @SYMTestExpectedResults 1. No notification |
|
277 //! 2. K: drive is not present in preferred drive list |
|
278 //! 3. No notification |
|
279 //! 4. K: drive is not present in preferred drive list |
|
280 //! |
|
281 //! @SYMAuthor Rajat Bal |
|
282 //! |
|
283 //! @SYMTestType CIT |
|
284 //! @SYMTestStatus Defined |
|
285 |
|
286 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
287 CREATE_OBJECT CenRepTestWrapper 0100_obj |
|
288 COMMAND 0100_obj ResetCentralRepository 0100_ResetCentralRepository |
|
289 END_TEST_BLOCK |
|
290 |
|
291 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.ini c:\private\1000484b\msgprioritydrivelist.bak |
|
292 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
293 RUN_UTILS CopyFile c:\msgtest\media\msg-media-0004.ini c:\private\1000484b\msgprioritydrivelist.ini |
|
294 |
|
295 START_TEST_BLOCK 100 t_media c:\msgtest\media\msg-media-ops.ini |
|
296 CREATE_OBJECT MediaTestWrapper 0004_obj_1 |
|
297 COMMAND 0004_obj_1 New 0004_obj_1 |
|
298 COMMAND 0004_obj_1 DisMountDrive 0004_DisMountDrive_1 |
|
299 COMMAND 0004_obj_1 GetDrivelist 0004_GetDrivelist_1 |
|
300 COMMAND 0004_obj_1 MountDrive 0004_MountDrive_1 |
|
301 COMMAND 0004_obj_1 GetDrivelist 0004_GetDrivelist_2 |
|
302 END_TEST_BLOCK |
|
303 |
|
304 RUN_UTILS MakeReadWrite c:\private\1000484b\msgprioritydrivelist.ini |
|
305 RUN_UTILS CopyFile c:\private\1000484b\msgprioritydrivelist.bak c:\private\1000484b\msgprioritydrivelist.ini |
|
306 RUN_UTILS DeleteFile c:\private\1000484b\msgprioritydrivelist.bak |
|
307 |
|
308 END_TESTCASE MSG-MEDIA-OPS-0004 |
|
309 |