os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BasicSQL2-8S.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 
    27 START_TESTCASE SYSLIB-SQL-CIT-1848
    28 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1848
    29 //! @SYMTestCaseDesc  Tests basic transaction behaviour and a simple level
    30 //!                  of concurrency. A single record is added to a table.
    31 //!                  Then, within a transaction three more are added.
    32 //!                  At this point two concurrent threads (one ESerializable,
    33 //!                  one EReadUncommitted) check the content of the table.
    34 //!                  After checking the transaction is rolled back.
    35 //!                  (8-bit/Asynchronous variant)
    36 //! @SYMTestPriority  High
    37 //! @SYMTestActions   See description and the config file.
    38 //! @SYMTestExpectedResults
    39 //!                  The ESerializable thread is unable to read the table
    40 //!                  because it is locked. The EReadUncommitted read it fine.
    41 //! @SYMREQ           REQ5792
    42 //!                  REQ5793
    43 
    44 CONCURRENT
    45 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread2
    46 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread3
    47 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread1
    48 END_TESTCASE SYSLIB-SQL-CIT-1848
    49 
    50 START_TESTCASE SYSLIB-SQL-CIT-1849
    51 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1849
    52 //! @SYMTestCaseDesc  Verifies the rollback on the last test performed properly.
    53 //!                  (8-bit/Asynchronous variant)
    54 //! @SYMTestPriority  High
    55 //! @SYMTestActions   See description and the config file.
    56 //! @SYMTestExpectedResults
    57 //!                  The table reads without error, it contains 1 record.
    58 //! @SYMREQ           REQ5792
    59 
    60 CONSECUTIVE
    61 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini CheckFollowingRollback
    62 END_TESTCASE SYSLIB-SQL-CIT-1849
    63 
    64 START_TESTCASE SYSLIB-SQL-CIT-1850
    65 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1850
    66 //! @SYMTestCaseDesc  Verifies that streams behave - we pass a read stream
    67 //!                  to a write stream.
    68 //!                  (8-bit/Asynchronous variant)
    69 //! @SYMTestPriority  High
    70 //! @SYMTestActions   See description and the config file.
    71 //! @SYMTestExpectedResults
    72 //!                  Runs without error.
    73 //! @SYMREQ           REQ5792
    74 
    75 CONSECUTIVE
    76 	RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini CopyCellsWithStreams
    77 END_TESTCASE SYSLIB-SQL-CIT-1850
    78 
    79 START_TESTCASE SYSLIB-SQL-CIT-1851
    80 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1851
    81 //! @SYMTestCaseDesc  A simple test of the effect of two binds without an
    82 //!                  exec/reset between them.
    83 //!                  (8-bit/Asynchronous variant)
    84 //! @SYMTestPriority  High
    85 //! @SYMTestActions   See description and the config file.
    86 //! @SYMTestExpectedResults
    87 //!                  The second data to be bound gets written to the cell,
    88 //!                  a PASS will be reported.
    89 //! @SYMREQ           REQ5792
    90 
    91 CONSECUTIVE
    92 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini DoubleBind
    93 END_TESTCASE SYSLIB-SQL-CIT-1851
    94 
    95 START_TESTCASE SYSLIB-SQL-CIT-1852
    96 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1852
    97 //! @SYMTestCaseDesc  A simple test using the OpenL and CreateL methods.
    98 //!                  (8-bit/Asynchronous variant)
    99 //! @SYMTestPriority  High
   100 //! @SYMTestActions   See description and the config file.
   101 //! @SYMTestExpectedResults
   102 //!                  Checks for appropriate error codes from the APIs called
   103 //!                  and reports a PASS.
   104 //! @SYMREQ           REQ5792
   105 
   106 CONSECTUTIVE
   107 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini LeaveMethods
   108 END_TESTCASE SYSLIB-SQL-CIT-1852
   109 
   110 RUN_UTILS DeleteFile C:\Leave1.db
   111 RUN_UTILS DeleteFile C:\MCO1.db
   112 RUN_UTILS DeleteFile C:\MCO2.db
   113 RUN_UTILS DeleteFile C:\MCO3.db
   114 RUN_UTILS DeleteFile C:\MCO4.db
   115 RUN_UTILS DeleteFile C:\MCO5.db
   116 START_TESTCASE SYSLIB-SQL-CIT-1853
   117 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1853
   118 //! @SYMTestCaseDesc  Tests the effect of multiple sequential Creates and Opens.
   119 //!                  (8-bit/Asynchronous variant)
   120 //! @SYMTestPriority  High
   121 //! @SYMTestActions   See description and the config file.
   122 //! @SYMTestExpectedResults
   123 //!                  Verifies that multiple Creates and Opens with the same
   124 //!                  RSqlDatabase object does not generate an error. You
   125 //!                  might expect a PANIC but you'd be wrong! Note the
   126 //!                  deletes afterwards, these clean up where we can't because
   127 //!                  all of the databases get locked.
   128 //! @SYMREQ           REQ5792
   129 
   130 	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini MultipleCreateOpen
   131 END_TESTCASE SYSLIB-SQL-CIT-1853
   132 
   133 RUN_UTILS DeleteFile C:\Leave1.db
   134 RUN_UTILS DeleteFile C:\MCO1.db
   135 RUN_UTILS DeleteFile C:\MCO2.db
   136 RUN_UTILS DeleteFile C:\MCO3.db
   137 RUN_UTILS DeleteFile C:\MCO4.db
   138 RUN_UTILS DeleteFile C:\MCO5.db
   139 
   140 START_TESTCASE SYSLIB-SQL-CIT-1854
   141 //! @SYMTestCaseID    SYSLIB-SQL-CIT-1854
   142 //! @SYMTestCaseDesc  Further bind tests.
   143 //!                  (8-bit/Asynchronous variant)
   144 //! @SYMTestPriority  High
   145 //! @SYMTestActions   See description and the config file.
   146 //! @SYMTestExpectedResults
   147 //!                  A couple of tests that verify that a bind can be used
   148 //!                  in combination with a SELECT to fetch data from a table
   149 //!                  based on parameters in the bind. The first one uses
   150 //!                  integers, the second a binary field (though it's defined
   151 //!                  as text in the 'Create table' line). For no special
   152 //!                  reason we run these concurrently. It isn't really a
   153 //!                  concurrency test, just two tests executing concurrently.
   154 //! @SYMREQ           REQ5792
   155 
   156 CONCURRENT
   157 	RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini ExtraBindTest
   158 	RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini ExtraBindTest2
   159 END_TESTCASE SYSLIB-SQL-CIT-1854
   160