installationservices/swcomponentregistry/test/tscr/scripts/tscr_versioning.script
changeset 24 84a16765cd86
equal deleted inserted replaced
6:aba6b8104af3 24:84a16765cd86
       
     1 //
       
     2 // Copyright (c) 2008-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 // This script implements Software Component Registry compatibility and versioning tests.
       
    16 // For more information about the test cases, please see TMS:\Security,Privacy and Control Protection\USIF\SCR\tscr_versioning
       
    17 // 
       
    18 //
       
    19 
       
    20 PRINT Run Software Component Registry (SCR) Versioning Tests
       
    21 
       
    22 // Load Suite
       
    23 LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
       
    24 SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
       
    25 
       
    26 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0001
       
    27 //! @SYMTestCaseDesc 		Negative test - check that version table is required
       
    28 
       
    29 START_TESTCASE API-SEC-SCR-VERSIONING-0001
       
    30 
       
    31 // Delete the SCR Database file
       
    32 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    33 // Copy a corrupted DB file - does not contain version table
       
    34 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini corrupted_db_file_no_version_table
       
    35 RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    36 
       
    37 END_TESTCASE API-SEC-SCR-VERSIONING-0001
       
    38 
       
    39 
       
    40 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0002
       
    41 //! @SYMTestCaseDesc 		Negative test - check that entries in version table are required
       
    42 
       
    43 START_TESTCASE API-SEC-SCR-VERSIONING-0002
       
    44 
       
    45 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    46 // Copy a corrupted DB file - does not have entries in the version table
       
    47 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini corrupted_db_file_no_version_entries
       
    48 RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    49 
       
    50 END_TESTCASE API-SEC-SCR-VERSIONING-0002
       
    51 
       
    52 
       
    53 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0003
       
    54 //! @SYMTestCaseDesc 		Negative test - check that older major versions are not allowed
       
    55 
       
    56 START_TESTCASE API-SEC-SCR-VERSIONING-0003
       
    57 
       
    58 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    59 // Copy a DB file with an older major version
       
    60 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_older_major_version
       
    61 RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    62 
       
    63 END_TESTCASE API-SEC-SCR-VERSIONING-0003
       
    64 
       
    65 
       
    66 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0004
       
    67 //! @SYMTestCaseDesc 		Negative test - check that newer major versions are not allowed
       
    68 
       
    69 START_TESTCASE API-SEC-SCR-VERSIONING-0004
       
    70 
       
    71 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    72 // Copy a DB file with an newer major version
       
    73 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_newer_major_version
       
    74 RUN_TEST_STEP !Result=-2 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    75 
       
    76 END_TESTCASE API-SEC-SCR-VERSIONING-0004
       
    77 
       
    78 
       
    79 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0005
       
    80 //! @SYMTestCaseDesc 		Positive test - check that newer minor versions are allowed
       
    81 
       
    82 START_TESTCASE API-SEC-SCR-VERSIONING-0005
       
    83 
       
    84 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    85 // Copy a DB file with an newer minor version
       
    86 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_newer_minor_version
       
    87 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    88 
       
    89 END_TESTCASE API-SEC-SCR-VERSIONING-0005
       
    90 
       
    91 
       
    92 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0006
       
    93 //! @SYMTestCaseDesc 		Positive test - check that older minor versions are allowed
       
    94 
       
    95 START_TESTCASE API-SEC-SCR-VERSIONING-0006
       
    96 
       
    97 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    98 // Copy a DB file with an older minor version
       
    99 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_older_minor_version
       
   100 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   101 
       
   102 END_TESTCASE API-SEC-SCR-VERSIONING-0006
       
   103 
       
   104 
       
   105 //! @SYMTestCaseID		API-SEC-SCR-VERSIONING-0007
       
   106 //! @SYMTestCaseDesc 		Positive test - check that different build numbers are allowed
       
   107 
       
   108 START_TESTCASE API-SEC-SCR-VERSIONING-0007
       
   109 
       
   110 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
   111 // Copy a DB file with a different build number
       
   112 RUN_TEST_STEP 100 tscr SCRCopyDbFile z:\tusif\tscr\tscr.ini db_file_different_build_number
       
   113 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   114 
       
   115 END_TESTCASE API-SEC-SCR-VERSIONING-0007
       
   116 
       
   117 
       
   118 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file