os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BasicSQL2-8S.script
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BasicSQL2-8S.script Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,160 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// @file
1.18 +//
1.19 +//
1.20 +
1.21 +//! @SYMTestSuiteName PDS-TEF-SQL-SUITE
1.22 +//! @SYMScriptTestEnvironment TEF
1.23 +//! @internalComponent
1.24 +//! @test
1.25 +
1.26 +PRINT Run SQL Tests
1.27 +
1.28 +LOAD_SUITE te_SQL_Suite
1.29 +
1.30 +START_TESTCASE SYSLIB-SQL-CIT-1848
1.31 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1848
1.32 +//! @SYMTestCaseDesc Tests basic transaction behaviour and a simple level
1.33 +//! of concurrency. A single record is added to a table.
1.34 +//! Then, within a transaction three more are added.
1.35 +//! At this point two concurrent threads (one ESerializable,
1.36 +//! one EReadUncommitted) check the content of the table.
1.37 +//! After checking the transaction is rolled back.
1.38 +//! (8-bit/Asynchronous variant)
1.39 +//! @SYMTestPriority High
1.40 +//! @SYMTestActions See description and the config file.
1.41 +//! @SYMTestExpectedResults
1.42 +//! The ESerializable thread is unable to read the table
1.43 +//! because it is locked. The EReadUncommitted read it fine.
1.44 +//! @SYMREQ REQ5792
1.45 +//! REQ5793
1.46 +
1.47 +CONCURRENT
1.48 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread2
1.49 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread3
1.50 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini Thread1
1.51 +END_TESTCASE SYSLIB-SQL-CIT-1848
1.52 +
1.53 +START_TESTCASE SYSLIB-SQL-CIT-1849
1.54 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1849
1.55 +//! @SYMTestCaseDesc Verifies the rollback on the last test performed properly.
1.56 +//! (8-bit/Asynchronous variant)
1.57 +//! @SYMTestPriority High
1.58 +//! @SYMTestActions See description and the config file.
1.59 +//! @SYMTestExpectedResults
1.60 +//! The table reads without error, it contains 1 record.
1.61 +//! @SYMREQ REQ5792
1.62 +
1.63 +CONSECUTIVE
1.64 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini CheckFollowingRollback
1.65 +END_TESTCASE SYSLIB-SQL-CIT-1849
1.66 +
1.67 +START_TESTCASE SYSLIB-SQL-CIT-1850
1.68 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1850
1.69 +//! @SYMTestCaseDesc Verifies that streams behave - we pass a read stream
1.70 +//! to a write stream.
1.71 +//! (8-bit/Asynchronous variant)
1.72 +//! @SYMTestPriority High
1.73 +//! @SYMTestActions See description and the config file.
1.74 +//! @SYMTestExpectedResults
1.75 +//! Runs without error.
1.76 +//! @SYMREQ REQ5792
1.77 +
1.78 +CONSECUTIVE
1.79 + RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini CopyCellsWithStreams
1.80 +END_TESTCASE SYSLIB-SQL-CIT-1850
1.81 +
1.82 +START_TESTCASE SYSLIB-SQL-CIT-1851
1.83 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1851
1.84 +//! @SYMTestCaseDesc A simple test of the effect of two binds without an
1.85 +//! exec/reset between them.
1.86 +//! (8-bit/Asynchronous variant)
1.87 +//! @SYMTestPriority High
1.88 +//! @SYMTestActions See description and the config file.
1.89 +//! @SYMTestExpectedResults
1.90 +//! The second data to be bound gets written to the cell,
1.91 +//! a PASS will be reported.
1.92 +//! @SYMREQ REQ5792
1.93 +
1.94 +CONSECUTIVE
1.95 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini DoubleBind
1.96 +END_TESTCASE SYSLIB-SQL-CIT-1851
1.97 +
1.98 +START_TESTCASE SYSLIB-SQL-CIT-1852
1.99 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1852
1.100 +//! @SYMTestCaseDesc A simple test using the OpenL and CreateL methods.
1.101 +//! (8-bit/Asynchronous variant)
1.102 +//! @SYMTestPriority High
1.103 +//! @SYMTestActions See description and the config file.
1.104 +//! @SYMTestExpectedResults
1.105 +//! Checks for appropriate error codes from the APIs called
1.106 +//! and reports a PASS.
1.107 +//! @SYMREQ REQ5792
1.108 +
1.109 +CONSECTUTIVE
1.110 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini LeaveMethods
1.111 +END_TESTCASE SYSLIB-SQL-CIT-1852
1.112 +
1.113 +RUN_UTILS DeleteFile C:\Leave1.db
1.114 +RUN_UTILS DeleteFile C:\MCO1.db
1.115 +RUN_UTILS DeleteFile C:\MCO2.db
1.116 +RUN_UTILS DeleteFile C:\MCO3.db
1.117 +RUN_UTILS DeleteFile C:\MCO4.db
1.118 +RUN_UTILS DeleteFile C:\MCO5.db
1.119 +START_TESTCASE SYSLIB-SQL-CIT-1853
1.120 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1853
1.121 +//! @SYMTestCaseDesc Tests the effect of multiple sequential Creates and Opens.
1.122 +//! (8-bit/Asynchronous variant)
1.123 +//! @SYMTestPriority High
1.124 +//! @SYMTestActions See description and the config file.
1.125 +//! @SYMTestExpectedResults
1.126 +//! Verifies that multiple Creates and Opens with the same
1.127 +//! RSqlDatabase object does not generate an error. You
1.128 +//! might expect a PANIC but you'd be wrong! Note the
1.129 +//! deletes afterwards, these clean up where we can't because
1.130 +//! all of the databases get locked.
1.131 +//! @SYMREQ REQ5792
1.132 +
1.133 + RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini MultipleCreateOpen
1.134 +END_TESTCASE SYSLIB-SQL-CIT-1853
1.135 +
1.136 +RUN_UTILS DeleteFile C:\Leave1.db
1.137 +RUN_UTILS DeleteFile C:\MCO1.db
1.138 +RUN_UTILS DeleteFile C:\MCO2.db
1.139 +RUN_UTILS DeleteFile C:\MCO3.db
1.140 +RUN_UTILS DeleteFile C:\MCO4.db
1.141 +RUN_UTILS DeleteFile C:\MCO5.db
1.142 +
1.143 +START_TESTCASE SYSLIB-SQL-CIT-1854
1.144 +//! @SYMTestCaseID SYSLIB-SQL-CIT-1854
1.145 +//! @SYMTestCaseDesc Further bind tests.
1.146 +//! (8-bit/Asynchronous variant)
1.147 +//! @SYMTestPriority High
1.148 +//! @SYMTestActions See description and the config file.
1.149 +//! @SYMTestExpectedResults
1.150 +//! A couple of tests that verify that a bind can be used
1.151 +//! in combination with a SELECT to fetch data from a table
1.152 +//! based on parameters in the bind. The first one uses
1.153 +//! integers, the second a binary field (though it's defined
1.154 +//! as text in the 'Create table' line). For no special
1.155 +//! reason we run these concurrently. It isn't really a
1.156 +//! concurrency test, just two tests executing concurrently.
1.157 +//! @SYMREQ REQ5792
1.158 +
1.159 +CONCURRENT
1.160 + RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini ExtraBindTest
1.161 + RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini ExtraBindTest2
1.162 +END_TESTCASE SYSLIB-SQL-CIT-1854
1.163 +