|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the License "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 // tscr_datalayer.script |
|
17 // Software Component Registry Tests |
|
18 |
|
19 PRINT Run Software Component Registry (SCR) - Data Layer Tests |
|
20 |
|
21 // Load Suite |
|
22 LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps |
|
23 SHARED_DATA z:\tusif\tscr\tscr.ini shared_data |
|
24 |
|
25 // Delete the SCR Database file - this step ensures that the SCR DB is down before starting the test |
|
26 // As the Secure SQLite layer does not support two connections at the same time, this test step prevents this from happening |
|
27 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file |
|
28 |
|
29 // Load Suite |
|
30 LOAD_SUITE tscrdatalayer |
|
31 |
|
32 // Create the private directory for tdatalayer |
|
33 RUN_UTILS MkDir c:\private\1028634C |
|
34 // Delete the SCR Database file if it has been left from the previous session |
|
35 RUN_UTILS DeleteFile c:\private\1028634C\scr.db |
|
36 // Copy the an empty scr db into the test harness private directory, so that the test harness won't require AllFiles. |
|
37 // Since tscrdatalayer test harness loads scrdatabase.dll, it cannot have AllFiles capability. |
|
38 RUN_UTILS CopyFile z:\tusif\tscr\data\scr-noversiontable.db c:\private\1028634C\scr.db |
|
39 RUN_UTILS MakeReadWrite c:\private\1028634C\scr.db |
|
40 // Copy the invalid scr db |
|
41 RUN_UTILS CopyFile z:\tusif\tscrdatalayer\data\nondb.db c:\private\1028634C\nonscr.db |
|
42 RUN_UTILS MakeReadWrite c:\private\1028634C\nonscr.db |
|
43 |
|
44 //********************** SEC-SCR-DataLayer : SCR DATA LAYER ********************** |
|
45 |
|
46 //! @SYMTestCaseID API-SEC-SCR-DataLayer-0001 |
|
47 //! @SYMTestCaseDesc Unit tests for SCR Data Layer |
|
48 //! @SYMPREQ PREQ1269 |
|
49 //! @SYMTestPriority Critical |
|
50 //! @SYMTestStatus 3. Released |
|
51 //! @SYMTestActions Test Actions: |
|
52 //! SEC-SCR-DataLayer-0001: Open database file |
|
53 //! SEC-SCR-DataLayer-0002: Insert records |
|
54 //! SEC-SCR-DataLayer-0003: Verify inserted records |
|
55 //! SEC-SCR-DataLayer-0004: Update a record |
|
56 //! SEC-SCR-DataLayer-0005: Verify updated record |
|
57 //! SEC-SCR-DataLayer-0006: Delete a record |
|
58 //! SEC-SCR-DataLayer-0007: Verify the deleted record |
|
59 //! SEC-SCR-DataLayer-0008: Begin a transaction |
|
60 //! SEC-SCR-DataLayer-0009: Insert a record while a transaction is active |
|
61 //! SEC-SCR-DataLayer-0010: Insert a second record while a transaction is active |
|
62 //! SEC-SCR-DataLayer-0011: Rollback the transaction. |
|
63 //! SEC-SCR-DataLayer-0012: Verify the rollback |
|
64 //! SEC-SCR-DataLayer-0013: Execute a bad SQL statement (1) |
|
65 //! SEC-SCR-DataLayer-0014: Execute a bad SQL statement (2) |
|
66 //! SEC-SCR-DataLayer-0015: Execute a bad SQL statement (3) |
|
67 //! SEC-SCR-DataLayer-0016: Open a non-existing database |
|
68 //! SEC-SCR-DataLayer-0017: Open and work on a non-database file |
|
69 //! SEC-SCR-DataLayer-0018: Bind a column which doesn't exist |
|
70 //! SEC-SCR-DataLayer-0018: Retrieve the value of a column which doesn't exist |
|
71 //! SEC-SCR-DataLayer-0020: Retrieve the value of a column whose type doesn't match |
|
72 //! @SYMTestExpectedResults The intended database operations are performed successfully. |
|
73 //! @SYMTestType UT |
|
74 |
|
75 START_TESTCASE API-SEC-SCR-DataLayer-0001 |
|
76 |
|
77 RUN_TEST_STEP 100 tscrdatalayer SCRDataLayer |
|
78 |
|
79 END_TESTCASE API-SEC-SCR-DataLayer-0001 |