installationservices/swi/test/tbackuprestore/scripts/tbackuptrestore_exploratory.script
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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 the License "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 Backup and restore tests...
       
    18  
       
    19 LOAD_SUITE tuiscriptadaptors
       
    20 LOAD_SUITE tbackuprestore
       
    21 
       
    22 //! @file
       
    23 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0001
       
    24 //! @SYMTestCaseDesc 		Sets up the environment for the remaining tests
       
    25 //! @SYMTestPriority 		Low
       
    26 //! @SYMTestActions 		Installs test certificates, uninstalls applications
       
    27 //! @SYMTestExpectedResults 	Clean environment.
       
    28 //! @SYMREQ 			REQ3469
       
    29 //! @SYMTestType 		UT
       
    30 
       
    31 START_TESTCASE API-SEC-SWI-NQPET-BR-0001
       
    32 
       
    33  //Setup Certstore
       
    34 RUN_UTILS MkDir c:\tmp\
       
    35 RUN_UTILS MkDir c:\tmp\tsis\
       
    36 RUN_UTILS MkDir c:\private\101f72a6\
       
    37 RUN_UTILS CopyFile c:\private\101f72a6\cacerts.dat c:\tmp\tsis\cacerts.dat
       
    38 RUN_UTILS CopyFile c:\private\101f72a6\certclients.dat c:\tmp\tsis\certclients.dat
       
    39 RUN_UTILS CopyFile z:\tswi\tsis\data\certstore\cacerts.dat c:\private\101f72a6\cacerts.dat
       
    40 RUN_UTILS CopyFile z:\tswi\tsis\data\certstore\certclients.dat c:\private\101f72a6\certclients.dat
       
    41  //Make sure the test directory exists
       
    42 RUN_UTILS MkDir c:\tswi\
       
    43 RUN_UTILS MkDir c:\tswi\tbackuprestore\
       
    44 
       
    45 // Clean up
       
    46 RUN_TEST_STEP	100	tbackuprestore	CLEAN		z:\tswi\tbackuprestore\scripts\ini	A
       
    47 RUN_TEST_STEP	100	tbackuprestore	ABSENT		z:\tswi\tbackuprestore\scripts\ini	A
       
    48 
       
    49 END_TESTCASE API-SEC-SWI-NQPET-BR-0001
       
    50 
       
    51 
       
    52 //! @file
       
    53 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0002
       
    54 //! @SYMTestCaseDesc 		Check install when the sisregistry folder having package uid name is deleted. DEF099689-This defect has been fixed and found to be working fine.
       
    55 //! @SYMTestPriority 		Medium
       
    56 //! @SYMTestActions 		1)Install a sis file
       
    57 //!		    		2)delete the sis registry folder having the package uid
       
    58 //!		    		3)Install Again
       
    59 //!		    		4)Uninstall
       
    60 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry.Install again should pass.
       
    61 //! @SYMDEF 			DEF099689
       
    62 //! @SYMTestType 		CIT
       
    63 
       
    64 START_TESTCASE API-SEC-SWI-NQPET-BR-0002
       
    65 
       
    66 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	A	  
       
    67 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini	A
       
    68 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   z:\tswi\tbackuprestore\scripts\ini      removeregistryfolder
       
    69 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
    70 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini	A
       
    71 RUN_TEST_STEP	100	tbackuprestore	ABSENT		z:\tswi\tbackuprestore\scripts\ini	A
       
    72 
       
    73 END_TESTCASE API-SEC-SWI-NQPET-BR-0002
       
    74 
       
    75 
       
    76 //! @file
       
    77 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0003
       
    78 //! @SYMTestCaseDesc 		Check install and uinstall when the sisregistry folder having packageuid name and backup.lst file is deleted
       
    79 //! @SYMTestPriority 		Medium
       
    80 //! @SYMTestActions 		1)Install a sis file
       
    81 //!		    		2)delete the sis registry folder having the package uid name and the backuplst file
       
    82 //!		    		3)Install Again
       
    83 //!		    		4)Uninstall
       
    84 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry and the backup.lst.Install again should pass.
       
    85 //! @SYMTestType		CIT
       
    86 
       
    87 START_TESTCASE API-SEC-SWI-NQPET-BR-0003
       
    88 
       
    89 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	A	  
       
    90 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini	A
       
    91 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   z:\tswi\tbackuprestore\scripts\ini      removeregistryfolder
       
    92 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   z:\tswi\tbackuprestore\scripts\ini      removebackuplstfile
       
    93 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
    94 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini	A
       
    95 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini	A
       
    96 RUN_TEST_STEP	100	tbackuprestore	ABSENT		z:\tswi\tbackuprestore\scripts\ini	A
       
    97 
       
    98 END_TESTCASE API-SEC-SWI-NQPET-BR-0003
       
    99 
       
   100 
       
   101 //! @file
       
   102 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0004
       
   103 //! @SYMTestCaseDesc 		Check install and uinstall when the backup.lst file is deleted
       
   104 //! @SYMTestPriority 		Medium
       
   105 //! @SYMTestActions 		1)Install a sis file
       
   106 //!		    		2)delete the backuplst file
       
   107 //!		    		3)Install Again
       
   108 //!		    		4)Uninstall
       
   109 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry.Install again should pass.
       
   110 //! @SYMTestType 		CIT
       
   111 
       
   112 START_TESTCASE API-SEC-SWI-NQPET-BR-0004
       
   113 
       
   114 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	A	  
       
   115 RUN_TEST_STEP	100	tbackuprestore	PRESENT		z:\tswi\tbackuprestore\scripts\ini	A
       
   116 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   z:\tswi\tbackuprestore\scripts\ini      removebackuplstfile
       
   117 RUN_TEST_STEP	100	tbackuprestore	INSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   118 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL	z:\tswi\tbackuprestore\scripts\ini	A
       
   119 RUN_TEST_STEP	100	tbackuprestore	ABSENT		z:\tswi\tbackuprestore\scripts\ini	A
       
   120 
       
   121 END_TESTCASE API-SEC-SWI-NQPET-BR-0004
       
   122 
       
   123 
       
   124 //! @file
       
   125 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0005
       
   126 //! @SYMTestCaseDesc 		Check install and uinstall when the sisregistry is corrupted.
       
   127 //! 				Defect DEF099688-This test case is failing and a defect has been raised on the same.It has got rejected as a Not a Defect.
       
   128 //!				Reject Report-We wanted to reject as "Not going to fix" but the process did not allow this (no MCL DRB at this time).
       
   129 //!		       		WE decided not to fix as this is a fairly remote use case and we have integrity services to protect the registry. 
       
   130 //! @SYMTestPriority 		Medium
       
   131 //! @SYMTestActions 		1)Install a sis file
       
   132 //!		    		2)copy a corrupted sis registry(adding characters to the middle of the file) to the c:\sys\install\sisregistry\81113001 folder
       
   133 //!		    		3)Install Again
       
   134 //!		    		4)Uninstall
       
   135 //!		    		5)Delete the sisregistry folder and the backup.lst file	
       
   136 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry.Install again should pass.
       
   137 //! @SYMDEF			DEF099688
       
   138 //! @SYMTestType 		CIT
       
   139 
       
   140 //!START_TESTCASE API-SEC-SWI-NQPET-BR-0005
       
   141 //!RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A	  
       
   142 //RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   143 //!RUN_TEST_STEP   100     tuiscriptadaptors MmcCopyFilesStep	z:\tswi\tbackuprestore\scripts\ini      copycorruptreg
       
   144 //!RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A
       
   145 //RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   146 //!RUN_TEST_STEP	100	tbackuprestore	UNINSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   147 //!RUN_TEST_STEP	100	tbackuprestore	ABSENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   148 //!END_TESTCASE API-SEC-SWI-NQPET-BR-0005
       
   149 
       
   150 
       
   151 //! @file
       
   152 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0006
       
   153 //! @SYMTestCaseDesc 		Check install and uinstall when the sisregistry is corrupted
       
   154 //! 				Defect DEF099688-This test case is failing and a defect has been raised on the same.It has got rejected as a Not a Defect.
       
   155 //!				Reject Report-We wanted to reject as "Not going to fix" but the process did not allow this (no MCL DRB at this time).
       
   156 //!		       		WE decided not to fix as this is a fairly remote use case and we have integrity services to protect the registry. 
       
   157 //! @SYMTestPriority 		Medium
       
   158 //! @SYMTestActions 		1)Install a sis file
       
   159 //!		    		2)Backup a sis file
       
   160 //!		    		3)copy a corrupted sis registry (adding characters to the middle of the file) to the c:\sys\install\sisregistry\81113001 folder
       
   161 //!		    		4)Restore the sis file
       
   162 //!		    		5)Uninstall
       
   163 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry.Restore should pass.
       
   164 //! @SYMDEF 			DEF099688
       
   165 //! @SYMTestType 		CIT
       
   166 
       
   167 //START_TESTCASE API-SEC-SWI-NQPET-BR-0006
       
   168 //RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A	  
       
   169 //RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   170 //RUN_TEST_STEP	100	tbackuprestore	BACKUP			z:\tswi\tbackuprestore\scripts\ini	A
       
   171 //RUN_TEST_STEP   100     tuiscriptadaptors MmcCopyFilesStep	z:\tswi\tbackuprestore\scripts\ini      copycorruptreg
       
   172 //RUN_TEST_STEP	100	tbackuprestore	RESTORE			z:\tswi\tbackuprestore\scripts\ini	A
       
   173 //RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   174 //RUN_TEST_STEP	100	tbackuprestore	UNINSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   175 //RUN_TEST_STEP	100	tbackuprestore	ABSENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   176 //END_TESTCASE API-SEC-SWI-NQPET-BR-0006
       
   177 
       
   178 
       
   179 //! @file
       
   180 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0007
       
   181 //! @SYMTestCaseDesc 		Check install and uinstall when the sisregistry is deleted.
       
   182 //! 				Defect DEF099689-This test case has been fixed and submitted abd found to be working fine.
       
   183 //! @SYMTestPriority 		Medium
       
   184 //! @SYMTestActions 		1)Install a sis file
       
   185 //!		    		2)Backup a sis file
       
   186 //!		    		3)Delete the sisregistry folder having the package uid name
       
   187 //!		    		4)Restore the sis file
       
   188 //!		    		5)Uninstall
       
   189 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry.Restore should pass.
       
   190 //! @SYMDEF 			DEF099689
       
   191 //! @SYMTestType 		CIT
       
   192 
       
   193 START_TESTCASE API-SEC-SWI-NQPET-BR-0007
       
   194 
       
   195 RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A	  
       
   196 RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   197 RUN_TEST_STEP	100	tbackuprestore	BACKUP			z:\tswi\tbackuprestore\scripts\ini	A
       
   198 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove		z:\tswi\tbackuprestore\scripts\ini      removeregistryfolder
       
   199 RUN_TEST_STEP	100	tbackuprestore	RESTORE			z:\tswi\tbackuprestore\scripts\ini	A
       
   200 RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   201 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   202 RUN_TEST_STEP	100	tbackuprestore	ABSENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   203 
       
   204 END_TESTCASE API-SEC-SWI-NQPET-BR-0007
       
   205 
       
   206 
       
   207 //! @file
       
   208 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0008
       
   209 //! @SYMTestCaseDesc 		Check restore and uninstall when the sisregsitry and the backup.lst files are removed
       
   210 //! @SYMTestPriority 		Medium
       
   211 //! @SYMTestActions 		1)Install a sis file
       
   212 //!		    		2)Backup a sis file
       
   213 //!		    		3)Delete the sisregistry folder having the package uid name	and the backup.lst file
       
   214 //!		    		4)Restore the sis file
       
   215 //!		    		5)Uninstall
       
   216 //!		    		6)Delete the sisregistry folder and the backup.lst file	
       
   217 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry.Install again should pass.
       
   218 //! @SYMTestType 		CIT
       
   219 
       
   220 START_TESTCASE API-SEC-SWI-NQPET-BR-0008
       
   221 
       
   222 RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A	  
       
   223 RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   224 RUN_TEST_STEP	100	tbackuprestore	BACKUP			z:\tswi\tbackuprestore\scripts\ini	A
       
   225 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove		z:\tswi\tbackuprestore\scripts\ini      removeregistryfolder
       
   226 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove		z:\tswi\tbackuprestore\scripts\ini      removebackuplstfile
       
   227 RUN_TEST_STEP	100	tbackuprestore	RESTORE			z:\tswi\tbackuprestore\scripts\ini	A
       
   228 RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   229 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove		z:\tswi\tbackuprestore\scripts\ini      removeregistryfolder
       
   230 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove		z:\tswi\tbackuprestore\scripts\ini      removebackuplstfile
       
   231 RUN_TEST_STEP  !Error=-1 	100	tbackuprestore	UNINSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   232 RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A
       
   233 RUN_TEST_STEP	100	tbackuprestore	UNINSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   234 RUN_TEST_STEP	100	tbackuprestore	ABSENT			z:\tswi\tbackuprestore\scripts\ini	A	
       
   235 
       
   236 END_TESTCASE API-SEC-SWI-NQPET-BR-0008
       
   237 
       
   238 
       
   239 //! @file
       
   240 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0009
       
   241 //! @SYMTestCaseDesc 		Check restore when only the contents of the sisregistry are removed
       
   242 //! @SYMTestPriority 		Medium
       
   243 //! @SYMTestActions 		1)Install a sis file
       
   244 //!		    		2)Backup a sis file
       
   245 //!		    		3)Delete the sisregistry folder files
       
   246 //!		    		4)Restore the sis file
       
   247 //!		    		5)Uninstall
       
   248 //! @SYMTestExpectedResults 	Successful install, successful Backup, delete the sis registry folder files.Restore should pass.
       
   249 //! 				A similar defect has been raised..And a decision was taken that all defects under sisregistry are going to be rejected as NGTF..As aresult this is failing
       
   250 //! @SYMTestType 		CIT
       
   251 
       
   252 //START_TESTCASE API-SEC-SWI-NQPET-BR-0009
       
   253 //RUN_TEST_STEP	100	tbackuprestore	INSTALL			z:\tswi\tbackuprestore\scripts\ini	A	  
       
   254 //RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   255 //RUN_TEST_STEP	100	tbackuprestore	BACKUP			z:\tswi\tbackuprestore\scripts\ini	A
       
   256 //RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove		z:\tswi\tbackuprestore\scripts\ini      removeregistryfolderfiles
       
   257 //RUN_TEST_STEP	100	tbackuprestore	RESTORE			z:\tswi\tbackuprestore\scripts\ini	A
       
   258 //RUN_TEST_STEP	100	tbackuprestore	PRESENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   259 //RUN_TEST_STEP	100	tbackuprestore	UNINSTALL		z:\tswi\tbackuprestore\scripts\ini	A
       
   260 //RUN_TEST_STEP	100	tbackuprestore	ABSENT			z:\tswi\tbackuprestore\scripts\ini	A
       
   261 //END_TESTCASE API-SEC-SWI-NQPET-BR-0009
       
   262 
       
   263 
       
   264 //! @file
       
   265 //! @SYMTestCaseID 		API-SEC-SWI-NQPET-BR-0010
       
   266 //! @SYMTestCaseDesc 		Check restore when an application is running
       
   267 //! @SYMTestPriority 		Medium
       
   268 //! @SYMTestActions 		1)Install a sis file(having an exe)
       
   269 //!		    		2)Backup a sis file
       
   270 //!		    		3)Run the exe
       
   271 //!		    		4)check whether the exe is running		
       
   272 //!		    		5)Remove the registry folder	
       
   273 //!		    		6)Restore the sis file
       
   274 //!	        		7)check whether the exe is running
       
   275 //!			    	8)Uninstall
       
   276 //! @SYMTestExpectedResults 	Restore should pass even when the application is running
       
   277 //! @SYMTestType 		CIT
       
   278 
       
   279 START_TESTCASE API-SEC-SWI-NQPET-BR-0010
       
   280 
       
   281 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tbackuprestore\scripts\ini appusingdll
       
   282 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tbackuprestore\scripts\ini large_array_dll
       
   283 RUN_TEST_STEP 100 tbackuprestore BACKUP z:\tswi\tbackuprestore\scripts\ini appusingdll
       
   284 RUN_PROGRAM 5 AppUsingDLL.exe
       
   285 RUN_TEST_STEP 5 tuiscriptadaptors FindRunningExe z:\tswi\tbackuprestore\scripts\ini appusingdll_running
       
   286 RUN_TEST_STEP   100     tuiscriptadaptors ForceRemove   z:\tswi\tbackuprestore\scripts\ini  removeappregistryfolder
       
   287 RUN_TEST_STEP 5 tuiscriptadaptors FindRunningExe z:\tswi\tbackuprestore\scripts\ini appusingdll_running
       
   288 RUN_TEST_STEP	100	tbackuprestore	RESTORE z:\tswi\tbackuprestore\scripts\ini	appusingdll
       
   289 RUN_TEST_STEP 5 tuiscriptadaptors FindRunningExe z:\tswi\tbackuprestore\scripts\ini appusingdll_running
       
   290 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tbackuprestore\scripts\ini u_large_array_dll
       
   291 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tbackuprestore\scripts\ini u_appusingdll
       
   292 // Cleanup
       
   293 RUN_UTILS DeleteDirectory c:\preq1110
       
   294 
       
   295 END_TESTCASE API-SEC-SWI-NQPET-BR-0010
       
   296 
       
   297 
       
   298 // Reinstate certstore
       
   299 RUN_UTILS CopyFile c:\tmp\tsis\cacerts.dat c:\private\101f72a6\cacerts.dat
       
   300 RUN_UTILS CopyFile c:\tmp\tsis\certclients.dat c:\private\101f72a6\certclients.dat
       
   301 
       
   302 RUN_UTILS DeleteFile c:\tmp\tsis\cacerts.dat
       
   303 RUN_UTILS DeleteFile c:\tmp\tsis\certclients.dat