os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BasicSQL2-8S.script
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 //! @SYMTestSuiteName PDS-TEF-SQL-SUITE
19 //! @SYMScriptTestEnvironment TEF
20 //! @internalComponent
25 LOAD_SUITE te_SQL_Suite
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.
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
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.
61 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini CheckFollowingRollback
62 END_TESTCASE SYSLIB-SQL-CIT-1849
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.
76 RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\APIBasic2-8S.ini CopyCellsWithStreams
77 END_TESTCASE SYSLIB-SQL-CIT-1850
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.
92 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini DoubleBind
93 END_TESTCASE SYSLIB-SQL-CIT-1851
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.
107 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini LeaveMethods
108 END_TESTCASE SYSLIB-SQL-CIT-1852
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.
130 RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\APIBasic2-8S.ini MultipleCreateOpen
131 END_TESTCASE SYSLIB-SQL-CIT-1853
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
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.
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