pimappservices/calendar/tsrc/TestCalIndexFile/scripts/TestCalIndexFileSuite.script
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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 PRINT Run all TestCalIndexFile Tests
       
    18 //
       
    19 RUN_UTILS MkDir C:\private\10003a5b\
       
    20 RUN_UTILS MkDir E:\private\
       
    21 RUN_UTILS MkDir E:\private\10003a5b\
       
    22 
       
    23 LOAD_SUITE TestCalIndexFileSuite
       
    24 //
       
    25 
       
    26 // 
       
    27 START_TESTCASE PIM-CT-PERFIDX-DEV-SC-0001
       
    28 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-SC-0001
       
    29 //! @SYMTestCaseDesc 		Ensure that migration to the index version of the calendar is BC.
       
    30 //!				Ensure that index file is created correctly 
       
    31 //!
       
    32 //! @SYMFssID			<App-Engines><AgnModel>/AFM.1.2
       
    33 //! @SYMFssID			<App-Engines><AgnModel>/File.003
       
    34 //! @SYMFssID			<App-Engines><AgnModel>/File.004
       
    35 //! @SYMREQ			REQ6105
       
    36 //! @SYMREQ			REQ6106
       
    37 //! @SYMTestStatus 		Implemented
       
    38 //! @SYMTestPriority 		High
       
    39 //! @SYMTestActions		1. Ensure that the private data folder used by the calendar does not contain
       
    40 //!				   anindex file and copy a known calendar file to the folder.
       
    41 //!				2. Open the agenda model via the CalInterimApi methods.
       
    42 //!				3. Using a CalInterimApi view check that the entries from the known calendar 
       
    43 //!				   file are present.
       
    44 //!				4.Close the agenda model
       
    45 //!				5.Use the file system to see that index file is present. 
       
    46 //!				6.Open the agenda model again and check that all entries are still present.
       
    47 //!			
       
    48 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
    49 //!				In step 5, a file call CalendarIdx will be present. 
       
    50 //!				In step 6, the entries retrieved will be the same as those retrieved in 
       
    51 //!				step 3 and will match the data know to be in the database.
       
    52 //! @SYMTestType 		CT
       
    53 
       
    54 
       
    55 // The following test steps open the agenda with a pre-indexing version of the calendar database
       
    56 // each with different content
       
    57 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenStep  \CalIndexFileTestData\opentest.ini test1 
       
    58 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenStep  \CalIndexFileTestData\opentest.ini test2 
       
    59 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenStep  \CalIndexFileTestData\opentest.ini test3 
       
    60 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenStep  \CalIndexFileTestData\opentest.ini test5 
       
    61 
       
    62 // The following test steps ensure that the agenda can be opened with the index files from the above steps.
       
    63 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\opentest.ini test1 
       
    64 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\opentest.ini test2 
       
    65 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\opentest.ini test3 
       
    66 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\opentest.ini test5 
       
    67 END_TESTCASE PIM-CT-PERFIDX-DEV-SC-0001
       
    68 
       
    69 
       
    70 START_TESTCASE PIM-CT-PERFIDX-DEV-0011
       
    71 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0011
       
    72 //! @SYMTestCaseDesc 		Ensure that the backward DC after PREQ2049 which changed the format of index file.
       
    73 //!				Ensure that index file is created correctly 
       
    74 //!
       
    75 //! @SYMFssID			<App-Engines><AgnModel>/AFM.1.2
       
    76 //! @SYMFssID			<App-Engines><AgnModel>/File.003
       
    77 //! @SYMFssID			<App-Engines><AgnModel>/File.004
       
    78 //! @SYMREQ			REQ6105
       
    79 //! @SYMREQ			REQ6106
       
    80 //! @SYMTestStatus 		Implemented
       
    81 //! @SYMTestPriority 		High
       
    82 //! @SYMTestActions		1. Ensure that the private data folder used by the calendar does not contain
       
    83 //!				   anindex file and copy a known calendar file to the folder.
       
    84 //!				2. Open the agenda model via the CalInterimApi methods.
       
    85 //!				3. Using a CalInterimApi view check that the entries from the known calendar 
       
    86 //!				   file are present.
       
    87 //!				4.Close the agenda model
       
    88 //!				5.Use the file system to see that index file is present. 
       
    89 //!				6.Open the agenda model again and check that all entries are still present.
       
    90 //!			
       
    91 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
    92 //!				In step 5, a file call CalendarIdx will be present. 
       
    93 //!				In step 6, the entries retrieved will be the same as those retrieved in 
       
    94 //!				step 3 and will match the data know to be in the database.
       
    95 //! @SYMTestType 		CT
       
    96 
       
    97 // The following test step open the agenda with its index file created by Calendar after PREQ2049
       
    98 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenStep  \CalIndexFileTestData\opentest.ini test5 
       
    99 
       
   100 // The following test steps ensure that the agenda can be opened with the index files from the above steps.
       
   101 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\opentest.ini test5 
       
   102 END_TESTCASE PIM-CT-PERFIDX-DEV-0011
       
   103 
       
   104 
       
   105 START_TESTCASE PIM-CT-PERFIDX-DEV-0010
       
   106 // NOTE: This test case requires the presence of a removable drive, specifically E. This must be set up (a) for the H4 board by having an MMC
       
   107 //       card in the proper slot or (b) for WINSCW by having the following line in the epoc.ini "_EPOC_DRIVE_E \\epoc32\\winscw\\e" and having
       
   108 //       the mapped drive created.
       
   109 //       If this is NOT done, then the test will fail with -18 (KErrNotReady)
       
   110 //
       
   111 
       
   112 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0010
       
   113 //! @SYMTestCaseDesc 		Ensure that the index is built and used when the calendar file is stored on a removable medium (i.e. non C:\ drive)
       
   114 //!
       
   115 //! @SYMFssID			<App-Engines><AgnModel>/AFM.1.2
       
   116 //! @SYMFssID			<App-Engines><AgnModel>/File.003
       
   117 //! @SYMFssID			<App-Engines><AgnModel>/File.004
       
   118 //! @SYMREQ			REQ6105
       
   119 //! @SYMTestStatus 		Implemented
       
   120 //! @SYMTestPriority 		Medium
       
   121 //! @SYMTestActions		1. Ensure that the private data folder used by the calendar does not contain
       
   122 //!				   anindex file and copy a known calendar file to the folder. The data folder
       
   123 //!				   should be on a removable drive,
       
   124 //!				2. Open the agenda model via the CalInterimApi methods.
       
   125 //!				3. Using a CalInterimApi view check that the entries from the known calendar 
       
   126 //!				   file are present.
       
   127 //!				4.Close the agenda model
       
   128 //!				5.Use the file system to see that index file is present. 
       
   129 //!				6.Open the agenda model again and check that all entries are still present.
       
   130 //!			
       
   131 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   132 //!				In step 5, a file call CalendarIdx will be present. 
       
   133 //!				In step 6, the entries retrieved will be the same as those retrieved in 
       
   134 //!				step 3 and will match the data know to be in the database.
       
   135 //! @SYMTestType 		CT
       
   136 
       
   137 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenStep  \CalIndexFileTestData\opentest.ini test4 
       
   138 END_TESTCASE PIM-CT-PERFIDX-DEV-0010
       
   139 
       
   140 
       
   141 
       
   142 START_TESTCASE PIM-CT-PERFIDX-DEV-0002
       
   143 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0002
       
   144 //! @SYMTestCaseDesc 		Ensure that a corrupt index file will be ignored and a proper index file 
       
   145 //!				built when the server shuts down
       
   146 //!
       
   147 //! @SYMFssID			<App-Engines><AgnModel>/AFM.1.2
       
   148 //! @SYMFssID			<App-Engines><AgnModel>/File.003
       
   149 //! @SYMFssID			<App-Engines><AgnModel>/File.004
       
   150 //! @SYMREQ			REQ6105
       
   151 //! @SYMREQ			REQ6106
       
   152 //! @SYMREQ			REQ6109
       
   153 //! @SYMTestStatus 		Implemented
       
   154 //! @SYMTestPriority 		High
       
   155 //! @SYMTestActions		1.Ensure that the private data folder used by the calendar contains a known calendar 
       
   156 //!				  and a corresponding index file that is a corrupted version of a valid index file.
       
   157 //!				2.Open the agenda model.
       
   158 //!				3.Check that the entries from the known calendar file are present.
       
   159 //!				4.Close the agenda model
       
   160 //!				5.Use the file system to see that index file is present. 
       
   161 //!				6.Open the agenda model again and check that all entries are still present.
       
   162 //!			
       
   163 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   164 //!				In step 5, a file call CalendarIdx will be present. 
       
   165 //!				In step 6, the entries retrieved will be the same as those retrieved in step 3 and 
       
   166 //!				will match the data know to be in the database.
       
   167 //! @SYMTestType 		CT
       
   168 
       
   169 // The three test cases use a corrupted index file for different versions of calendar database.
       
   170 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\corruptindex.ini test1 
       
   171 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\corruptindex.ini test2 
       
   172 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileOpenwithIndexStep  \CalIndexFileTestData\corruptindex.ini test3 
       
   173 
       
   174 END_TESTCASE PIM-CT-PERFIDX-DEV-0002
       
   175 
       
   176 
       
   177 
       
   178 START_TESTCASE PIM-CT-PERFIDX-DEV-0003
       
   179 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0003
       
   180 //! @SYMTestCaseDesc 		Ensure that adding a calendar entry (an action which changes the internal indexing) results 
       
   181 //!				in the index file being deleted.
       
   182 //!				Ensure that the correct index file is created on shutdown so that the system still knows about the added entry.
       
   183 //!
       
   184 //! @SYMFssID			<App-Engines><AgnModel>/ME.1.1
       
   185 //! @SYMFssID			<App-Engines><AgnModel>/MEF.1.2
       
   186 //! @SYMREQ			REQ6105
       
   187 //! @SYMTestStatus 		Implemented
       
   188 //! @SYMTestPriority 		High
       
   189 //! @SYMTestActions		1.Ensure that the private data folder used by the calendar contains a known calendar 
       
   190 //!				  and a corresponding valid index file.
       
   191 //!				2.Open the agenda model.
       
   192 //!				3.Check that the entries from the known calendar file are present.
       
   193 //!				4.Add an entry
       
   194 //!				5.Use the file system to see that the index file is not present.
       
   195 //!				6.Close the agenda model
       
   196 //!				7.Use the file system to see that index file is present. 
       
   197 //!				8.Open the agenda model again and check that all entries including the one added in step 4 are still present
       
   198 //!			
       
   199 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   200 //!				In step 5, a file call CalendarIdx will not be present. 
       
   201 //!				In step 7, a file call CalendarIdx will be present. 
       
   202 //!				In step 8, the entries retrieved will be the same as those retrieved in step 3 and will match the 
       
   203 //!				data known to be in the database plus the additional entry added in step 4.
       
   204 //! @SYMTestType 		CT
       
   205 
       
   206 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileAddEntryStep  \CalIndexFileTestData\crudentries.ini test1 
       
   207 END_TESTCASE PIM-CT-PERFIDX-DEV-0003
       
   208 
       
   209 
       
   210 START_TESTCASE PIM-CT-PERFIDX-DEV-0004
       
   211 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0004
       
   212 //! @SYMTestCaseDesc 		Ensure that deleting a calendar entry (an action which changes the internal indexing) results 
       
   213 //!				in the index file being deleted.
       
   214 //!				Ensure that the correct index file is created on shutdown so that the system no longer shows
       
   215 //!				the deleted entry
       
   216 //!
       
   217 //! @SYMFssID			<App-Engines><AgnModel>/MEF.1.4
       
   218 //! @SYMREQ			REQ6105
       
   219 //! @SYMTestStatus 		Implemented
       
   220 //! @SYMTestPriority 		High
       
   221 //! @SYMTestActions		1.Ensure that the private data folder used by the calendar contains a known calendar and a corresponding valid index file.
       
   222 //!				2.Open the agenda model.
       
   223 //!				3.Check that the entries from the known calendar file are present.
       
   224 //!				4.Delete an entry
       
   225 //!				5.Use the file system to see that the index file is not present.
       
   226 //!				6.Close the agenda model
       
   227 //!				7.Use the file system to see that index file is present. 
       
   228 //!				8.Open the agenda model again and check that all entries except the one deleted in step 4 are still present
       
   229 
       
   230 //!			
       
   231 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   232 //!				In step 5, a file call CalendarIdx will not be present. 
       
   233 //!				In step 7, a file call CalendarIdx will be present. 
       
   234 //!				In step 8, the entries retrieved will be the same as those retrieved in step 3 and will match the data know to be 
       
   235 //!				in the database minus the entry deleted in step 4.
       
   236 //! @SYMTestType 		CT
       
   237 
       
   238 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileDeleteEntryStep   \CalIndexFileTestData\crudentries.ini test2 
       
   239 END_TESTCASE PIM-CT-PERFIDX-DEV-0004
       
   240 
       
   241 
       
   242 START_TESTCASE PIM-CT-PERFIDX-DEV-0005
       
   243 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0005
       
   244 //! @SYMTestCaseDesc 		Ensure that modifying a calendar entry (an action which changes the internal indexing) results in the 
       
   245 //!				index file being deleted.
       
   246 //!				Ensure that the correct index file is created on shutdown so that the system has the updated version of the entry.
       
   247 //!
       
   248 //! @SYMFssID			<App-Engines><AgnModel>/MEF.1.9
       
   249 //! @SYMREQ			REQ6105
       
   250 //! @SYMTestStatus 		Implemented
       
   251 //! @SYMTestPriority 		High
       
   252 //! @SYMTestActions		1.Ensure that the private data folder used by the calendar contains a known calendar and a corresponding valid index file.
       
   253 //!				2.Open the agenda model.
       
   254 //!				3.Check that the entries from the known calendar file are present.
       
   255 //!				4.Modify an entry
       
   256 //!				5.Use the file system to see that the index file is not present.
       
   257 //!				6.Close the agenda model
       
   258 //!				7.Use the file system to see that index file is present. 
       
   259 //!				8.Open the agenda model again and check that all entries are still present and that the modifications 
       
   260 //!				  made to the entry selected for step 4 are still present.
       
   261 
       
   262 //!			
       
   263 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   264 //!				In step 5, a file call CalendarIdx will not be present. 
       
   265 //!				In step 7, a file call CalendarIdx will be present. 
       
   266 //!				In step 8, the entries retrieved will be the same as those retrieved in step 3 with the exception of the entry 
       
   267 //!				chosen for modification which should still have the modified fields.
       
   268 //! @SYMTestType 		CT
       
   269 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileModifyEntryStep   \CalIndexFileTestData\crudentries.ini test3 
       
   270 END_TESTCASE PIM-CT-PERFIDX-DEV-0005
       
   271 
       
   272 
       
   273 
       
   274 
       
   275 START_TESTCASE PIM-CT-PERFIDX-DEV-0006
       
   276 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0006
       
   277 //! @SYMTestCaseDesc 		Ensure that if all entries in a calendar database are deleted that the index file does not contain any entries
       
   278 //!
       
   279 //! @SYMFssID			<App-Engines><AgnModel>/MEF.1.4
       
   280 //! @SYMREQ			REQ6105
       
   281 //! @SYMTestStatus 		Implemented
       
   282 //! @SYMTestPriority 		Medium
       
   283 //! @SYMTestActions		1.Ensure that the private data folder used by the calendar contains a known calendar and a corresponding valid index file.
       
   284 //!				2.Open the agenda model.
       
   285 //!				3.Check that the entries from the known calendar file are present.
       
   286 //!				4.Delete all entries
       
   287 //!				5.Use the file system to see that the index file has been deleted.
       
   288 //!				6.Close the agenda model
       
   289 //!				7.Use the file system to see that index file is present. (The calendar database may still be present but have no info.)
       
   290 //!				8.Open the agenda model
       
   291 //!				9.Check that it contains no entries
       
   292 //!			
       
   293 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   294 //!				In step 5, a file call CalendarIdx will not be present. 
       
   295 //!				In step 7, a file call CalendarIdx will be present, but will contain no information.
       
   296 //!				In step 9, there should be no entries that can be retrieved.
       
   297 //! @SYMTestType 		CT
       
   298 
       
   299 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileDeleteAllStep    \CalIndexFileTestData\crudentries.ini test4  
       
   300 END_TESTCASE PIM-CT-PERFIDX-DEV-0006
       
   301 
       
   302 
       
   303 
       
   304 
       
   305 START_TESTCASE PIM-CT-PERFIDX-DEV-0008
       
   306 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0008
       
   307 //! @SYMTestCaseDesc 		Ensure that the first addition of an entry to a previously unused calendar database (i.e. the calendar 
       
   308 //!				file does not exist at the start of the test case)  causes both the calendar database and index file to be created.
       
   309 //!
       
   310 //! @SYMFssID			<App-Engines><AgnModel>/AFM.1.1
       
   311 //! @SYMFssID			<App-Engines><AgnModel>/AFM.1.2 
       
   312 //! @SYMFssID			<App-Engines><AgnModel>/ME.1.1
       
   313 //! @SYMFssID			<App-Engines><AgnModel>/MEF.1.2
       
   314 //! @SYMFssID			<App-Engines><AgnModel>/File.002
       
   315 //! @SYMFssID			<App-Engines><AgnModel>/File.003
       
   316 //! @SYMFssID			<App-Engines><AgnModel>/File.004
       
   317 //! @SYMREQ			REQ6105
       
   318 //! @SYMREQ			REQ6109
       
   319 //! @SYMTestStatus 		Implemented
       
   320 //! @SYMTestPriority 		High
       
   321 //! @SYMTestActions		1.Start an agenda session using a calendar file name know to not be on the system
       
   322 //!				2.Add an entry to the database
       
   323 //!				3.Close the agenda session
       
   324 //!				4.Use the file system to look for the calendar file and its associated index.
       
   325 //!			
       
   326 //! @SYMTestExpectedResults	Assuming the calendar file to be named Calendar:
       
   327 //!				In step 4, a file call CalendarIdx will  be present. 
       
   328 //!				In step 4, a file call Calendar will be present.
       
   329 //! @SYMTestType 		CT
       
   330 
       
   331 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileCreateDbStep	\CalIndexFileTestData\crudentries.ini test5 
       
   332 END_TESTCASE PIM-CT-PERFIDX-DEV-0008
       
   333 
       
   334 
       
   335 
       
   336 
       
   337 
       
   338 START_TESTCASE PIM-CT-PERFIDX-DEV-0009
       
   339 //! @SYMTestCaseID		PIM-CT-PERFIDX-DEV-0009
       
   340 //! @SYMTestCaseDesc 		Ensure that when a calendar database is deleted the associated index file is deleted.
       
   341 //!
       
   342 //! @SYMFssID			<App-Engines><AgnModel>/File.005
       
   343 //! @SYMREQ			REQ6105
       
   344 //! @SYMTestStatus 		Implemented
       
   345 //! @SYMTestPriority 		High
       
   346 //! @SYMTestActions		1.Use CalInterimApi to delete a known calendar database file.
       
   347 //!				2.Check the contents of the directory where the calendar file was
       
   348 //! @SYMTestExpectedResults	In step 2, neither the calendar file nor its associated index file are in the directory
       
   349 //! @SYMTestType 		CT
       
   350 
       
   351 RUN_TEST_STEP 100 TestCalIndexFileSuite TestCalIndexFileDeleteDbStep  \CalIndexFileTestData\crudentries.ini test6
       
   352 END_TESTCASE PIM-CT-PERFIDX-DEV-0009
       
   353 
       
   354 
       
   355 
       
   356 PRINT Completed TestCalIndexFile Tests