os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BUR.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.
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // @file
    15 // 
    16 //
    17 
    18 //! @SYMTestSuiteName PDS-TEF-SQL-SUITE
    19 //! @SYMScriptTestEnvironment TEF
    20 //! @internalComponent
    21 //! @test
    22 
    23 PRINT Run SQL Tests
    24 
    25 LOAD_SUITE te_SQL_Suite
    26 LOAD_SUITE te_SQL_Suite_cap2
    27 LOAD_SUITE BURTestServer
    28 
    29 RUN_UTILS MkDir c:\private\
    30 RUN_UTILS MkDir c:\private\102827c7\
    31 RUN_UTILS MkDir c:\private\102827c8\
    32 RUN_UTILS CopyFile z:\TEF_SQL\TestData\backup_registration.xml c:\private\102827c7\backup_registration.xml
    33 RUN_UTILS CopyFile z:\TEF_SQL\TestData\backup_registration.xml c:\private\102827c8\backup_registration.xml
    34 
    35 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    36 RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
    37 
    38 START_TESTCASE SYSLIB-SQL-CIT-1834
    39 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1834
    40 //! @SYMTestCaseDesc  Backup and restore with no change
    41 //! @SYMTestPriority  High
    42 //! @SYMTestActions   See description and the config file.
    43 //! @SYMTestExpectedResults
    44 //!                  The test looks for errors and content
    45 //!                  within the database. If these are not seen test errors
    46 //!                  will be generated.
    47 //!                  
    48 //! @SYMREQ           REQ5906
    49 
    50 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
    51 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
    52 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    53 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
    54 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    55 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
    56 END_TESTCASE SYSLIB-SQL-CIT-1834
    57 
    58 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    59 RUN_UTILS DeleteDirectory c:\BackupArchive\
    60 
    61 START_TESTCASE SYSLIB-SQL-CIT-1835
    62 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1835
    63 //! @SYMTestCaseDesc  Backup and restore with database file deleted
    64 //! @SYMTestPriority  High
    65 //! @SYMTestActions   See description and the config file.
    66 //! @SYMTestExpectedResults
    67 //!                  The test looks for errors and content
    68 //!                  within the database. If these are not seen test errors
    69 //!                  will be generated.
    70 //!                  
    71 //! @SYMREQ           REQ5906
    72 	
    73 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup	
    74 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
    75 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    76 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    77 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
    78 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    79 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
    80 END_TESTCASE SYSLIB-SQL-CIT-1835
    81 
    82 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    83 RUN_UTILS DeleteDirectory c:\BackupArchive\
    84 
    85 START_TESTCASE SYSLIB-SQL-CIT-1836
    86 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1836
    87 //! @SYMTestCaseDesc  Backup and restore with database file modified
    88 //! @SYMTestPriority  High
    89 //! @SYMTestActions   See description and the config file.
    90 //! @SYMTestExpectedResults
    91 //!                  The test looks for errors and content
    92 //!                  within the database. If these are not seen test errors
    93 //!                  will be generated.
    94 //!                  
    95 //! @SYMREQ           REQ5906
    96 
    97 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
    98 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
    99 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   100 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini modify
   101 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   102 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   103 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
   104 END_TESTCASE SYSLIB-SQL-CIT-1836
   105 
   106 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   107 RUN_UTILS DeleteDirectory c:\BackupArchive\
   108 
   109 START_TESTCASE SYSLIB-SQL-CIT-1837
   110 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1837
   111 //! @SYMTestCaseDesc  Backup and restore with database file corrupted
   112 //! @SYMTestPriority  High
   113 //! @SYMTestActions   See description and the config file.
   114 //! @SYMTestExpectedResults
   115 //!                  The test looks for errors and content
   116 //!                  within the database. If these are not seen test errors
   117 //!                  will be generated.
   118 //!                  
   119 //! @SYMREQ           REQ5906
   120 
   121 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
   122 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   123 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   124 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db	
   125 	RUN_UTILS CopyFile z:\TEF_SQL\TestData\[102827c7]corrupt.db c:\private\10281e17\[102827c7]bur.db
   126 	RUN_UTILS MakeReadWrite c:\private\10281e17\[102827c7]bur.db
   127 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   128 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   129 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
   130 END_TESTCASE SYSLIB-SQL-CIT-1837
   131 
   132 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   133 RUN_UTILS DeleteDirectory c:\BackupArchive\
   134 
   135 START_TESTCASE SYSLIB-SQL-CIT-1838
   136 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1838
   137 //! @SYMTestCaseDesc  Backup and restore with database file from 2 data owners
   138 //! @SYMTestPriority  High
   139 //! @SYMTestActions   See description and the config file.
   140 //! @SYMTestExpectedResults
   141 //!                  The test looks for errors and content
   142 //!                  within the database. If these are not seen test errors
   143 //!                  will be generated.
   144 //!                  
   145 //! @SYMREQ           REQ5906
   146 
   147 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
   148 	RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\BUR.ini setup2
   149 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur2
   150 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   151 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   152 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
   153 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur2
   154 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   155 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
   156 	RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\BUR.ini check2
   157 END_TESTCASE SYSLIB-SQL-CIT-1838
   158 
   159 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   160 RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
   161 RUN_UTILS DeleteDirectory c:\BackupArchive\
   162 
   163 START_TESTCASE SYSLIB-SQL-CIT-1839-0001
   164 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1839-0001
   165 //! @SYMTestCaseDesc  Backup and restore with 3 database files
   166 //! @SYMTestPriority  High
   167 //! @SYMTestActions   See description and the config file.
   168 //! @SYMTestExpectedResults
   169 //!                  The test looks for errors and content
   170 //!                  within the database. If these are not seen test errors
   171 //!                  will be generated.
   172 //!                  
   173 //! @SYMREQ           REQ5906
   174 
   175 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup3
   176 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   177 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   178 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur1.db
   179 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur2.db
   180 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur3.db
   181 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   182 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   183 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check3
   184 END_TESTCASE SYSLIB-SQL-CIT-1839-0001
   185 
   186 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur1.db
   187 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur2.db
   188 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur3.db
   189 
   190 START_TESTCASE SYSLIB-SQL-CIT-4026
   191 //! @SYMTestCaseID    SYSLIB-SQL-CIT-4026
   192 //! @SYMTestCaseDesc  Backup and restore a database file (with no extension)
   193 //! @SYMTestPriority  High
   194 //! @SYMTestActions   See description and the config file.
   195 //! @SYMTestExpectedResults
   196 //!                  The test looks for errors and content
   197 //!                  within the database. If these are not seen test errors
   198 //!                  will be generated.
   199 //!                  
   200 //! @SYMDEF	     INC118192
   201 //!              PDEF118675
   202 //!              PDEF118676
   203 
   204 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup4
   205 	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   206 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   207 	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]118192
   208 	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   209 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   210 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check4
   211 END_TESTCASE SYSLIB-SQL-CIT-4026
   212 
   213 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]118192
   214 RUN_UTILS DeleteDirectory c:\BackupArchive
   215 
   216 //cleanup
   217 RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   218 RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
   219 RUN_UTILS MakeReadWrite c:\private\102827c7\backup_registration.xml
   220 RUN_UTILS MakeReadWrite c:\private\102827c8\backup_registration.xml
   221 RUN_UTILS DeleteFile c:\private\102827c7\backup_registration.xml
   222 RUN_UTILS DeleteFile c:\private\102827c8\backup_registration.xml
   223 RUN_UTILS DeleteDirectory c:\BackupArchive\
   224 RUN_UTILS DeleteDirectory c:\private\102827c7\
   225 RUN_UTILS DeleteDirectory c:\private\102827c8\
   226 
   227