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