installationservices/swcomponentregistry/test/tscr/scripts/tscr_api.script
changeset 24 84a16765cd86
child 25 98b66e4fb0be
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 API tests.
       
    16 // All APIs provided by SCR are covered by the test cases below.
       
    17 // For more information about the test cases, please see TMS:\Security,Privacy and Control Protection\USIF\SCR\tscr_api
       
    18 // 
       
    19 //
       
    20 
       
    21 PRINT Run Software Component Registry (SCR) API Tests
       
    22 
       
    23 // Load Suite
       
    24 LOAD_SUITE tscr -SharedData // SharedData is used for sharing the componentid between test steps
       
    25 SHARED_DATA z:\tusif\tscr\tscr.ini shared_data
       
    26 
       
    27 // Delete the SCR Database file
       
    28 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
    29 
       
    30 //! @SYMTestCaseID		API-SEC-SCR-API-0001
       
    31 //! @SYMTestCaseDesc 		Add a single software component with component name and vendor
       
    32 
       
    33 START_TESTCASE API-SEC-SCR-API-0001
       
    34 
       
    35 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    36 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
       
    37 
       
    38 END_TESTCASE API-SEC-SCR-API-0001
       
    39 
       
    40 
       
    41 //! @SYMTestCaseID		API-SEC-SCR-API-0002
       
    42 //! @SYMTestCaseDesc 		Adding a single software component with localizables names
       
    43 
       
    44 START_TESTCASE API-SEC-SCR-API-0002
       
    45 
       
    46 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_localizables
       
    47 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_localizables1 
       
    48 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_localizables2
       
    49 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_localizables3
       
    50 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nonlocalized_names
       
    51 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_unspecified_names
       
    52 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_particular_names
       
    53 
       
    54 END_TESTCASE API-SEC-SCR-API-0002
       
    55 
       
    56 
       
    57 //! @SYMTestCaseID		API-SEC-SCR-API-0003
       
    58 //! @SYMTestCaseDesc 		Adding a software component with an empty component localizable object
       
    59 
       
    60 START_TESTCASE API-SEC-SCR-API-0003
       
    61 
       
    62 RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_empty_localizables
       
    63 RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_empty_name
       
    64 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    65 RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_empty_name
       
    66 RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_component
       
    67 
       
    68 END_TESTCASE API-SEC-SCR-API-0003
       
    69 
       
    70 
       
    71 //! @SYMTestCaseID		API-SEC-SCR-API-0004
       
    72 //! @SYMTestCaseDesc 		Set attributes of a software component
       
    73 
       
    74 START_TESTCASE API-SEC-SCR-API-0004
       
    75 
       
    76 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_multiple_names
       
    77 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_attributes
       
    78 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_updated_component_attributes
       
    79 
       
    80 END_TESTCASE API-SEC-SCR-API-0004
       
    81 
       
    82 
       
    83 //! @SYMTestCaseID		API-SEC-SCR-API-0005
       
    84 //! @SYMTestCaseDesc 		Add general and localizable properties of a software component.
       
    85 
       
    86 START_TESTCASE API-SEC-SCR-API-0005
       
    87 
       
    88 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
    89 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
       
    90 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini common_component_properties
       
    91 
       
    92 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_single_localized_property
       
    93 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_localized_property
       
    94 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_non_localized_property
       
    95 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_int_property
       
    96 
       
    97 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_multiple_localized_property
       
    98 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_nonlocalized_version_property
       
    99 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_unspecified_version_property
       
   100 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_specific_version_property
       
   101 
       
   102 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini all_unspecified_locale_properties
       
   103 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini all_non_localized_properties
       
   104 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini all_particular_properties
       
   105 
       
   106 END_TESTCASE API-SEC-SCR-API-0005
       
   107 
       
   108 
       
   109 //! @SYMTestCaseID		API-SEC-SCR-API-0006
       
   110 //! @SYMTestCaseDesc 		Update general and localizable properties of a software component.
       
   111 
       
   112 START_TESTCASE API-SEC-SCR-API-0006
       
   113 
       
   114 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   115 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
       
   116 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini common_component_properties
       
   117 
       
   118 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini new_component_properties
       
   119 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini new_component_properties
       
   120 
       
   121 END_TESTCASE API-SEC-SCR-API-0006
       
   122 
       
   123 
       
   124 //! @SYMTestCaseID		API-SEC-SCR-API-0007
       
   125 //! @SYMTestCaseDesc 		Register files to existing components.
       
   126 
       
   127 START_TESTCASE API-SEC-SCR-API-0007
       
   128 
       
   129 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   130 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   131 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   132 
       
   133 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_component_files
       
   134 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini second_component_files
       
   135 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini third_component_files
       
   136 
       
   137 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini first_component_files
       
   138 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini second_component_files
       
   139 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini third_component_files
       
   140 
       
   141 END_TESTCASE API-SEC-SCR-API-0007
       
   142 
       
   143 
       
   144 //! @SYMTestCaseID		API-SEC-SCR-API-0008
       
   145 //! @SYMTestCaseDesc 		Add general properties of a registered file
       
   146 
       
   147 START_TESTCASE API-SEC-SCR-API-0008
       
   148 
       
   149 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   150 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini component_files
       
   151 
       
   152 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_file1_properties
       
   153 RUN_TEST_STEP 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini component_file1_properties
       
   154 
       
   155 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_file2_properties
       
   156 RUN_TEST_STEP 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini component_file2_properties
       
   157 
       
   158 RUN_TEST_STEP 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini component_file_property
       
   159 
       
   160 END_TESTCASE API-SEC-SCR-API-0008
       
   161 
       
   162 
       
   163 //! @SYMTestCaseID		API-SEC-SCR-API-0009
       
   164 //! @SYMTestCaseDesc 		Delete component properties
       
   165 
       
   166 START_TESTCASE API-SEC-SCR-API-0009
       
   167 
       
   168 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   169 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
       
   170 
       
   171 RUN_TEST_STEP 100 tscr SCRDeleteComponentProperty z:\tusif\tscr\tscr.ini delete_component_properties
       
   172 RUN_TEST_STEP 100 tscr SCRGetComponentProperties    z:\tusif\tscr\tscr.ini component_properties_left
       
   173 
       
   174 END_TESTCASE API-SEC-SCR-API-0009
       
   175 
       
   176 
       
   177 //! @SYMTestCaseID		API-SEC-SCR-API-0010
       
   178 //! @SYMTestCaseDesc 		Delete file properties
       
   179 
       
   180 START_TESTCASE API-SEC-SCR-API-0010
       
   181 
       
   182 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   183 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
       
   184 
       
   185 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file1_properties
       
   186 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file2_properties
       
   187 
       
   188 RUN_TEST_STEP 100 tscr SCRDeleteFileProperty z:\tusif\tscr\tscr.ini delete_common_file1_property1
       
   189 RUN_TEST_STEP 100 tscr SCRGetFileProperties  z:\tusif\tscr\tscr.ini common_file1_properties_left
       
   190 RUN_TEST_STEP 100 tscr SCRDeleteFileProperty z:\tusif\tscr\tscr.ini delete_common_file2_property1
       
   191 RUN_TEST_STEP 100 tscr SCRGetFileProperties  z:\tusif\tscr\tscr.ini common_file2_properties_left
       
   192 
       
   193 END_TESTCASE API-SEC-SCR-API-0010
       
   194 
       
   195 
       
   196 //! @SYMTestCaseID		API-SEC-SCR-API-0011
       
   197 //! @SYMTestCaseDesc 		Unregister a component file
       
   198 
       
   199 START_TESTCASE API-SEC-SCR-API-0011
       
   200 
       
   201 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   202 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini component_files_to_be_unregistered
       
   203 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_file_properties_to_be_unregistered
       
   204 
       
   205 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_component_file
       
   206 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini unregistered_file_property
       
   207 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini registered_files
       
   208 
       
   209 END_TESTCASE API-SEC-SCR-API-0011
       
   210 
       
   211 
       
   212 //! @SYMTestCaseID		API-SEC-SCR-API-0012
       
   213 //! @SYMTestCaseDesc 		Delete a component
       
   214 
       
   215 START_TESTCASE API-SEC-SCR-API-0012
       
   216 
       
   217 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_to_be_deleted
       
   218 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini common_component_properties
       
   219 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
       
   220 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file1_properties
       
   221 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file2_properties
       
   222 
       
   223 RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_component
       
   224 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini deleted_component_properties
       
   225 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini deleted_component_files
       
   226 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini deleted_component_file1_properties
       
   227 RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
       
   228 RUN_TEST_STEP !Result=Fail 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_component_deleted
       
   229 RUN_TEST_STEP !Result=-1 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_non_existing_component
       
   230 
       
   231 END_TESTCASE API-SEC-SCR-API-0012
       
   232 
       
   233 
       
   234 //! @SYMTestCaseID		API-SEC-SCR-API-0013
       
   235 //! @SYMTestCaseDesc 		Retrieve software component entry
       
   236 
       
   237 START_TESTCASE API-SEC-SCR-API-0013
       
   238 
       
   239 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_with_default_language
       
   240 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_with_nondefault_language_only
       
   241 
       
   242 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_default_language
       
   243 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_unspecified_language
       
   244 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_specified_language
       
   245 
       
   246 // Try getting the component without specifying locale - we should get the first available language
       
   247 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_1
       
   248 // Try getting the component while specifying matching locale
       
   249 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_2
       
   250 // Try getting the component while specifying a different locale - we should fail
       
   251 RUN_TEST_STEP !Result=-10323 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_3
       
   252 // Try getting the component while specifying a "non-localized" locale - we should fail
       
   253 RUN_TEST_STEP !Result=-10323 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_nondefault_language_only_4
       
   254 
       
   255 END_TESTCASE API-SEC-SCR-API-0013
       
   256 
       
   257 
       
   258 //! @SYMTestCaseID		API-SEC-SCR-API-0014
       
   259 //! @SYMTestCaseDesc 		Try to retrieve a non-existing software component
       
   260 
       
   261 START_TESTCASE API-SEC-SCR-API-0014
       
   262 
       
   263 RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_non_existing_component
       
   264 
       
   265 END_TESTCASE API-SEC-SCR-API-0014
       
   266 
       
   267 
       
   268 //! @SYMTestCaseID		API-SEC-SCR-API-0015
       
   269 //! @SYMTestCaseDesc 		Negative tests for retrieving multiple file properties
       
   270 
       
   271 START_TESTCASE API-SEC-SCR-API-0015
       
   272 
       
   273 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   274 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
       
   275 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file1_properties
       
   276 
       
   277 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini getfileproperties_of_nonexisting_component
       
   278 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini getfileproperties_of_nonexisting_file
       
   279 
       
   280 END_TESTCASE API-SEC-SCR-API-0015
       
   281 
       
   282 
       
   283 //! @SYMTestCaseID		API-SEC-SCR-API-0016
       
   284 //! @SYMTestCaseDesc 		Negative tests for retrieving single file property
       
   285 
       
   286 START_TESTCASE API-SEC-SCR-API-0016
       
   287 
       
   288 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   289 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini common_files
       
   290 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini common_file2_properties
       
   291 
       
   292 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini getfileproperty_of_nonexisting_component
       
   293 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini getfileproperty_of_nonexisting_file
       
   294 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini getfileproperty_of_nonexisting_property
       
   295 
       
   296 END_TESTCASE API-SEC-SCR-API-0016
       
   297 
       
   298 
       
   299 //! @SYMTestCaseID		API-SEC-SCR-API-0017
       
   300 //! @SYMTestCaseDesc 		Get file components
       
   301 
       
   302 START_TESTCASE API-SEC-SCR-API-0017
       
   303 
       
   304 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   305 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   306 
       
   307 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_to_first_component
       
   308 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_to_second_component
       
   309 
       
   310 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component1_file_property
       
   311 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component2_file_property
       
   312 
       
   313 RUN_TEST_STEP 100 tscr SCRGetFileComponents z:\tusif\tscr\tscr.ini get_file_components
       
   314 
       
   315 END_TESTCASE API-SEC-SCR-API-0017
       
   316 
       
   317 
       
   318 //! @SYMTestCaseID		API-SEC-SCR-API-0018
       
   319 //! @SYMTestCaseDesc 		Get component properties
       
   320 
       
   321 START_TESTCASE API-SEC-SCR-API-0018
       
   322 
       
   323 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   324 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component_properties_with_localizables
       
   325 
       
   326 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini component_nonlocalized_properties
       
   327 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini component_localized_properties
       
   328 
       
   329 END_TESTCASE API-SEC-SCR-API-0018
       
   330 
       
   331 
       
   332 //! @SYMTestCaseID		API-SEC-SCR-API-0019
       
   333 //! @SYMTestCaseDesc 		Get Plugin UID with Mime Type and Component Id
       
   334 
       
   335 START_TESTCASE API-SEC-SCR-API-0019
       
   336 
       
   337 RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_mimetype_1
       
   338 RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_mimetype_2
       
   339 RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_componentid
       
   340 
       
   341 END_TESTCASE API-SEC-SCR-API-0019
       
   342 
       
   343 
       
   344 //! @SYMTestCaseID		API-SEC-SCR-API-0020
       
   345 //! @SYMTestCaseDesc 		Get components by software type
       
   346 
       
   347 START_TESTCASE API-SEC-SCR-API-0020
       
   348 
       
   349 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   350 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_dummy_type
       
   351 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_plain_type
       
   352 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_component_with_dummy_type
       
   353 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_dummy_components
       
   354 
       
   355 END_TESTCASE API-SEC-SCR-API-0020
       
   356 
       
   357 
       
   358 //! @SYMTestCaseID		API-SEC-SCR-API-0021
       
   359 //! @SYMTestCaseDesc 		Get components by vendor
       
   360 
       
   361 START_TESTCASE API-SEC-SCR-API-0021
       
   362 
       
   363 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini first_component_with_same_vendor
       
   364 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_component_with_same_vendor
       
   365 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_different_vendor
       
   366 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_by_vendor
       
   367 
       
   368 END_TESTCASE API-SEC-SCR-API-0021
       
   369 
       
   370 
       
   371 //! @SYMTestCaseID		API-SEC-SCR-API-0022
       
   372 //! @SYMTestCaseDesc 		Get components by component properties
       
   373 
       
   374 START_TESTCASE API-SEC-SCR-API-0022
       
   375 
       
   376 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   377 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   378 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   379 
       
   380 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini first_component_properties
       
   381 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_properties
       
   382 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini third_component_properties
       
   383 
       
   384 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_integer_property1
       
   385 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_integer_property2
       
   386 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_string_property1
       
   387 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_string_property2
       
   388 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_localized_property1
       
   389 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_localized_property2
       
   390 
       
   391 END_TESTCASE API-SEC-SCR-API-0022
       
   392 
       
   393 
       
   394 //! @SYMTestCaseID		API-SEC-SCR-API-0023
       
   395 //! @SYMTestCaseDesc 		Get components by files
       
   396 
       
   397 START_TESTCASE API-SEC-SCR-API-0023
       
   398 
       
   399 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_to_first_component
       
   400 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_to_second_component
       
   401 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_to_third_component
       
   402 
       
   403 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file1
       
   404 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file2
       
   405 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file3
       
   406 
       
   407 END_TESTCASE API-SEC-SCR-API-0023
       
   408 
       
   409 
       
   410 //! @SYMTestCaseID		API-SEC-SCR-API-0024
       
   411 //! @SYMTestCaseDesc 		Get components by common component attributes
       
   412 
       
   413 START_TESTCASE API-SEC-SCR-API-0024
       
   414 
       
   415 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   416 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   417 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   418 
       
   419 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_first_component_attributes
       
   420 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_second_component_attributes
       
   421 
       
   422 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_removable_components
       
   423 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_unremovable_components
       
   424 
       
   425 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_drmprotected_components
       
   426 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_drmunprotected_components
       
   427 
       
   428 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_hidden_components
       
   429 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_nonhidden_components
       
   430 
       
   431 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_knownrevoked_components
       
   432 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_knownunrevoked_components
       
   433 
       
   434 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_originverified_components
       
   435 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_originnonverified_components
       
   436 
       
   437 END_TESTCASE API-SEC-SCR-API-0024
       
   438 
       
   439 //! @SYMTestCaseID		API-SEC-SCR-API-0025
       
   440 //! @SYMTestCaseDesc 		Set component SCOMO state
       
   441 
       
   442 START_TESTCASE API-SEC-SCR-API-0025
       
   443 
       
   444 RUN_TEST_STEP 100 tscr SCRSetScomoState z:\tusif\tscr\tscr.ini update_component_scomostate
       
   445 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_non_activated_components
       
   446 
       
   447 END_TESTCASE API-SEC-SCR-API-0025
       
   448 
       
   449 
       
   450 //! @SYMTestCaseID		API-SEC-SCR-API-0026
       
   451 //! @SYMTestCaseDesc 		Get components by installed drives
       
   452 
       
   453 START_TESTCASE API-SEC-SCR-API-0026
       
   454 
       
   455 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   456 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   457 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   458 
       
   459 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_of_first_component
       
   460 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_of_second_component
       
   461 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini files_of_third_component
       
   462 
       
   463 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveC
       
   464 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveD
       
   465 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveX
       
   466 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveZ
       
   467 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveCE
       
   468 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveCZ
       
   469 
       
   470 END_TESTCASE API-SEC-SCR-API-0026
       
   471 
       
   472 
       
   473 //! @SYMTestCaseID		API-SEC-SCR-API-0027
       
   474 //! @SYMTestCaseDesc 		Unregister the file registered to multiple files
       
   475 
       
   476 START_TESTCASE API-SEC-SCR-API-0027
       
   477 
       
   478 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   479 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   480 
       
   481 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_registration_of_file
       
   482 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini second_registration_of_file
       
   483 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_multiply_registered_file_1
       
   484 
       
   485 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_first_component_file
       
   486 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_multiply_registered_file_2
       
   487 
       
   488 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_second_component_file
       
   489 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_multiply_registered_file_3
       
   490 
       
   491 END_TESTCASE API-SEC-SCR-API-0027
       
   492 
       
   493 
       
   494 //! @SYMTestCaseID		API-SEC-SCR-API-0028
       
   495 //! @SYMTestCaseDesc 		Uncommitted transactions are rollbacked automatically
       
   496 
       
   497 START_TESTCASE API-SEC-SCR-API-0028
       
   498 
       
   499 RUN_TEST_STEP 100 tscr SCRApplyTransaction z:\tusif\tscr\tscr.ini transaction_component
       
   500 RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini transaction_component_attributes
       
   501 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini transaction_component_properties_rollback
       
   502 RUN_TEST_STEP !Result=Fail 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini transaction_files
       
   503 
       
   504 END_TESTCASE API-SEC-SCR-API-0028
       
   505 
       
   506 
       
   507 //! @SYMTestCaseID		API-SEC-SCR-API-0029
       
   508 //! @SYMTestCaseDesc 		Commit a started transaction.
       
   509 
       
   510 START_TESTCASE API-SEC-SCR-API-0029
       
   511 
       
   512 RUN_TEST_STEP 100 tscr SCRApplyTransaction z:\tusif\tscr\tscr.ini commit_common_component
       
   513 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini transaction_component_attributes
       
   514 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini transaction_component_properties_commit
       
   515 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini transaction_files
       
   516 
       
   517 END_TESTCASE API-SEC-SCR-API-0029
       
   518 
       
   519 
       
   520 //! @SYMTestCaseID		API-SEC-SCR-API-0030
       
   521 //! @SYMTestCaseDesc 		Cancel a started transaction.
       
   522 
       
   523 START_TESTCASE API-SEC-SCR-API-0030
       
   524 
       
   525 RUN_TEST_STEP 100 tscr SCRApplyTransaction z:\tusif\tscr\tscr.ini cancel_common_component
       
   526 RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini transaction_component_attributes
       
   527 RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini transaction_component_properties
       
   528 RUN_TEST_STEP !Result=Fail 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini transaction_files
       
   529 
       
   530 END_TESTCASE API-SEC-SCR-API-0030
       
   531 
       
   532 
       
   533 //! @SYMTestCaseID		API-SEC-SCR-API-0031
       
   534 //! @SYMTestCaseDesc 		Create a reading session while a transaction is in progress
       
   535 
       
   536 START_TESTCASE API-SEC-SCR-API-0031
       
   537 
       
   538 // First, try to create a reading sub-session while a transaction owned by another session is in progress
       
   539 RUN_TEST_STEP !Result=-10320 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_before_subsession
       
   540 // Then, try to create a reading sub-session while a transaction owned by the same session is in progress
       
   541 // Also, try creating a transaction while a sub-session is in progress (opposite order)
       
   542 RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini open_reading_in_same_session
       
   543 
       
   544 END_TESTCASE API-SEC-SCR-API-0031
       
   545 
       
   546 
       
   547 //! @SYMTestCaseID		API-SEC-SCR-API-0032
       
   548 //! @SYMTestCaseDesc 		Create a transaction while a reading session is in progress
       
   549 
       
   550 START_TESTCASE API-SEC-SCR-API-0032
       
   551 
       
   552 // First, try to begin a transaction while a reading sub-session created in another session is in progress
       
   553 RUN_TEST_STEP !Result=-10321 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_after_subsession
       
   554 // Try doing a mutating operation while a subsession is in progress
       
   555 RUN_TEST_STEP !Result=-10321 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini mutating_operation_with_subsession
       
   556 // Then, try to begin a transaction while a reading sub-session created in the same session is in progress
       
   557 RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_after_subsession_in_same_session
       
   558 
       
   559 END_TESTCASE API-SEC-SCR-API-0032
       
   560 
       
   561 
       
   562 //! @SYMTestCaseID		API-SEC-SCR-API-0033
       
   563 //! @SYMTestCaseDesc 		Create a transaction while another transaction is in progress
       
   564 
       
   565 START_TESTCASE API-SEC-SCR-API-0033
       
   566 
       
   567 RUN_TEST_STEP !Result=-10320 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini begin_after_another_begin
       
   568 
       
   569 END_TESTCASE API-SEC-SCR-API-0033
       
   570 
       
   571 
       
   572 //! @SYMTestCaseID		API-SEC-SCR-API-0034
       
   573 //! @SYMTestCaseDesc 		Create a transaction while another transaction is in progress.
       
   574 //!				In addition, invoke mutating and non-mutating functions from another transaction.				
       
   575 
       
   576 START_TESTCASE API-SEC-SCR-API-0034
       
   577 
       
   578 RUN_TEST_STEP !Result=-10322 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini commit_another_transaction
       
   579 RUN_TEST_STEP !Result=-10320 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini another_transaction_mutating
       
   580 RUN_TEST_STEP 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini another_transaction_nonmutating
       
   581 
       
   582 END_TESTCASE API-SEC-SCR-API-0034
       
   583 
       
   584 
       
   585 //! @SYMTestCaseID		API-SEC-SCR-API-0035
       
   586 //! @SYMTestCaseDesc 		Cancel a transaction while another transaction is in progress
       
   587 
       
   588 START_TESTCASE API-SEC-SCR-API-0035
       
   589 
       
   590 RUN_TEST_STEP !Result=-10322 100 tscr SCRManageAnotherTransaction z:\tusif\tscr\tscr.ini cancel_another_transaction
       
   591 
       
   592 END_TESTCASE API-SEC-SCR-API-0035
       
   593 
       
   594 
       
   595 //! @SYMTestCaseID		API-SEC-SCR-API-0036
       
   596 //! @SYMTestCaseDesc 		Open a subsession while another subsession is already opened by another session
       
   597 
       
   598 START_TESTCASE API-SEC-SCR-API-0036
       
   599 
       
   600 RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini multiple_subsessions
       
   601 RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini multiple_active_subsessions
       
   602 
       
   603 END_TESTCASE API-SEC-SCR-API-0036
       
   604 
       
   605 
       
   606 //! @SYMTestCaseID		API-SEC-SCR-API-0037
       
   607 //! @SYMTestCaseDesc 		Invoke a mutating SCR interface while a transaction created by a different session is in progress.
       
   608 
       
   609 START_TESTCASE API-SEC-SCR-API-0037
       
   610 
       
   611 RUN_TEST_STEP !Result=-10320 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini write_after_begin
       
   612 
       
   613 END_TESTCASE API-SEC-SCR-API-0037
       
   614 
       
   615 
       
   616 //! @SYMTestCaseID		API-SEC-SCR-API-0038
       
   617 //! @SYMTestCaseDesc 		Invoke a non-mutating SCR interface while a transaction created by a different session is in progress.
       
   618 
       
   619 START_TESTCASE API-SEC-SCR-API-0038
       
   620 
       
   621 RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini read_after_begin
       
   622 
       
   623 END_TESTCASE API-SEC-SCR-API-0038
       
   624 
       
   625 
       
   626 //! @SYMTestCaseID		API-SEC-SCR-API-0039
       
   627 //! @SYMTestCaseDesc 		Retrieve all components from SCR
       
   628 
       
   629 START_TESTCASE API-SEC-SCR-API-0039
       
   630 
       
   631 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   632 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   633 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_dummy_type
       
   634 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   635 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini all_components
       
   636 
       
   637 END_TESTCASE API-SEC-SCR-API-0039
       
   638 
       
   639 
       
   640 //! @SYMTestCaseID		API-SEC-SCR-API-0040
       
   641 //! @SYMTestCaseDesc 		Concurrent tests
       
   642 
       
   643 START_TESTCASE API-SEC-SCR-API-0040
       
   644 
       
   645 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   646 CONCURRENT
       
   647 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini concurrent_component_1
       
   648 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini concurrent_component_2
       
   649 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini concurrent_component_properties
       
   650 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini concurrent_component1_attributes
       
   651 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini concurrent_component2_attributes
       
   652 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini concurrent_component_properties
       
   653 CONSECUTIVE
       
   654 
       
   655 END_TESTCASE API-SEC-SCR-API-0040
       
   656 
       
   657 
       
   658 //! @SYMTestCaseID		API-SEC-SCR-API-0041
       
   659 //! @SYMTestCaseDesc 		IsMediaPresent - positive tests
       
   660 
       
   661 START_TESTCASE API-SEC-SCR-API-0041
       
   662 
       
   663 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   664 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   665 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   666 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_positive_files_register1
       
   667 RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_positive_files_check1
       
   668 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_positive_files_register2
       
   669 RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_positive_files_check2
       
   670 
       
   671 END_TESTCASE API-SEC-SCR-API-0041
       
   672 
       
   673 
       
   674 //! @SYMTestCaseID		API-SEC-SCR-API-0042
       
   675 //! @SYMTestCaseDesc 		IsMediaPresent - negative tests
       
   676 
       
   677 START_TESTCASE API-SEC-SCR-API-0042
       
   678 
       
   679 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   680 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   681 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   682 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_negative_files_register1
       
   683 RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_negative_files_check1
       
   684 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini ismediapresent_negative_files_register2
       
   685 RUN_TEST_STEP 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_negative_files_check2
       
   686 RUN_TEST_STEP !Result=-1 100 tscr SCRIsMediaPresent z:\tusif\tscr\tscr.ini ismediapresent_negative_non_existent_component
       
   687 
       
   688 END_TESTCASE API-SEC-SCR-API-0042
       
   689 
       
   690 
       
   691 //! @SYMTestCaseID		API-SEC-SCR-API-0043
       
   692 //! @SYMTestCaseDesc 		SCR property and file names are case-insensitive	
       
   693 
       
   694 START_TESTCASE API-SEC-SCR-API-0043
       
   695 
       
   696 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   697 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   698 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini lower_case_property
       
   699 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini lower_case_file_name
       
   700 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini filter_mixed_case_property_name
       
   701 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini filter_mixed_case_file_name
       
   702 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini mixed_lower_case_property
       
   703 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini mixed_lower_case_property
       
   704 RUN_TEST_STEP 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_with_mimetype_1
       
   705 
       
   706 END_TESTCASE API-SEC-SCR-API-0043
       
   707 
       
   708 
       
   709 //! @SYMTestCaseID		API-SEC-SCR-API-0044
       
   710 //! @SYMTestCaseDesc 		Get only component Ids by using a NULL filter.	
       
   711 
       
   712 START_TESTCASE API-SEC-SCR-API-0044
       
   713 
       
   714 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   715 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   716 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   717 RUN_TEST_STEP 100 tscr SCRGetComponentIds z:\tusif\tscr\tscr.ini all_components_component_ids_test44
       
   718 
       
   719 END_TESTCASE API-SEC-SCR-API-0044
       
   720 
       
   721 
       
   722 //! @SYMTestCaseID		API-SEC-SCR-API-0045
       
   723 //! @SYMTestCaseDesc  		Various negative tests
       
   724 
       
   725 START_TESTCASE API-SEC-SCR-API-0045
       
   726 
       
   727 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   728 RUN_TEST_STEP !Result=-46 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini wrong_software_type_name
       
   729 RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini no_locales_in_add_component
       
   730 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   731 RUN_TEST_STEP !Result=-6 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini no_drive_file_name
       
   732 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_twice
       
   733 // Try to register the same file twice - should not return an error
       
   734 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_twice
       
   735 // Try to get nonexisting file property
       
   736 RUN_TEST_STEP !Result=-1 100 tscr SCRGetFileProperty z:\tusif\tscr\tscr.ini nonexisting_file_property
       
   737 // Try to unregister the same file twice - should not return an error
       
   738 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_file_twice
       
   739 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini unregister_file_twice
       
   740 // Try to get nonexisting property
       
   741 RUN_TEST_STEP !Result=-1 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini missing_single_property
       
   742 // Try to get plugin for non-existing MIME type
       
   743 RUN_TEST_STEP !Result=-10303 100 tscr SCRGetPlugin z:\tusif\tscr\tscr.ini get_plugin_for_nonexisting_mimetype 
       
   744 // Try setting a negative component size
       
   745 RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini set_negative_component_size
       
   746 // Add component with invalid operation type
       
   747 RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_invalid_operation_type
       
   748 END_TESTCASE API-SEC-SCR-API-0045
       
   749 
       
   750 //! @SYMTestCaseID		API-SEC-SCR-API-0046
       
   751 //! @SYMTestCaseDesc 		Get components using composite filters - part 1
       
   752 
       
   753 START_TESTCASE API-SEC-SCR-API-0046
       
   754 
       
   755 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   756 // Add components
       
   757 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   758 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   759 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   760 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   761 // Register the same file to components 1, 3
       
   762 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_component_file
       
   763 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini third_component_file
       
   764 // Add the same property to components 2, 4
       
   765 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
       
   766 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
       
   767 // Get all components with same file and property
       
   768 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file_and_property_empty
       
   769 
       
   770 END_TESTCASE API-SEC-SCR-API-0046
       
   771 
       
   772 
       
   773 //! @SYMTestCaseID		API-SEC-SCR-API-0047
       
   774 //! @SYMTestCaseDesc 		Get components using composite filters - part 2
       
   775 
       
   776 START_TESTCASE API-SEC-SCR-API-0047
       
   777 
       
   778 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   779 // Add components
       
   780 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   781 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   782 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   783 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   784 // Do not register files
       
   785 // Add the same property to components 2, 4
       
   786 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
       
   787 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
       
   788 // Get all components with same file and property
       
   789 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file_and_property_empty
       
   790 
       
   791 END_TESTCASE API-SEC-SCR-API-0047
       
   792 
       
   793 
       
   794 //! @SYMTestCaseID		API-SEC-SCR-API-0048
       
   795 //! @SYMTestCaseDesc 		Get components using composite filters - part 3
       
   796 
       
   797 START_TESTCASE API-SEC-SCR-API-0048
       
   798 
       
   799 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   800 // Add components
       
   801 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   802 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   803 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   804 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   805 // Register file to fourth component
       
   806 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini fourth_component_file
       
   807 // Add the same property to components 2, 4
       
   808 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
       
   809 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
       
   810 // Get all components with same file and property
       
   811 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_file_and_property_fourth
       
   812 
       
   813 END_TESTCASE API-SEC-SCR-API-0048
       
   814 
       
   815 
       
   816 //! @SYMTestCaseID		API-SEC-SCR-API-0049
       
   817 //! @SYMTestCaseDesc 		Get components using composite filters - part 4
       
   818 
       
   819 START_TESTCASE API-SEC-SCR-API-0049
       
   820 
       
   821 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   822 // Add components
       
   823 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini filter_test_names_test49
       
   824 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   825 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   826 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini filter_test_names_test49
       
   827 // Register file to fourth component
       
   828 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini fourth_component_file
       
   829 // Add the same property to components 2, 4
       
   830 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
       
   831 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini fourth_component_property
       
   832 // Get all components with same file and property
       
   833 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_names_file_and_property_fourth
       
   834 
       
   835 END_TESTCASE API-SEC-SCR-API-0049
       
   836 
       
   837 
       
   838 //! @SYMTestCaseID		API-SEC-SCR-API-0050
       
   839 //! @SYMTestCaseDesc 		Get components using composite filters - part 5
       
   840 
       
   841 START_TESTCASE API-SEC-SCR-API-0050
       
   842 
       
   843 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   844 // Add components
       
   845 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini filter_test_names_vendor_test50
       
   846 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   847 // Add the same property to the second component
       
   848 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
       
   849 // Get all components with same vendor name and property
       
   850 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_vendor_and_property_second
       
   851 
       
   852 END_TESTCASE API-SEC-SCR-API-0050
       
   853 
       
   854 
       
   855 //! @SYMTestCaseID		API-SEC-SCR-API-0051
       
   856 //! @SYMTestCaseDesc 		Test Int64 component property functionality
       
   857 
       
   858 START_TESTCASE API-SEC-SCR-API-0051
       
   859 
       
   860 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   861 // Check adding an int64 property
       
   862 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini single_int64_property
       
   863 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_single_int64_property
       
   864 // Check updating an int64 property
       
   865 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini update_single_int64_property
       
   866 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_updated_int64_property
       
   867 
       
   868 // Check filters on int64 property
       
   869 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini verify_in64_property_filter
       
   870 
       
   871 RUN_TEST_STEP 100 tscr SCRDeleteComponentProperty z:\tusif\tscr\tscr.ini single_int64_property
       
   872 
       
   873 // Check handling multiple properties, where one of them is int64
       
   874 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini multiple_int64_properties
       
   875 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini multiple_int64_properties
       
   876 
       
   877 END_TESTCASE API-SEC-SCR-API-0051
       
   878 
       
   879 
       
   880 //! @SYMTestCaseID		API-SEC-SCR-API-0052
       
   881 //! @SYMTestCaseDesc 		Get components using composite filters - part 6
       
   882 
       
   883 START_TESTCASE API-SEC-SCR-API-0052
       
   884 
       
   885 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   886 // Add components
       
   887 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component3_test52
       
   888 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component2_test52
       
   889 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component1_test52
       
   890 // Add string property A and int property B to the first component
       
   891 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini first_component_property_test52
       
   892 // Add int property B and int property C to the second component
       
   893 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property_test52
       
   894 // Add string property A, int property B and int property C to the third component
       
   895 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini third_component_property_test52
       
   896 // Get all components with integer properties B and C
       
   897 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_int_properties_test52
       
   898 // Get all components with string property A and integer property B
       
   899 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_str_int_property_test52
       
   900 
       
   901 END_TESTCASE API-SEC-SCR-API-0052
       
   902 
       
   903 
       
   904 //! @SYMTestCaseID		API-SEC-SCR-API-0053
       
   905 //! @SYMTestCaseDesc 		Check GetComponentFilesCountL API
       
   906 
       
   907 START_TESTCASE API-SEC-SCR-API-0053
       
   908 
       
   909 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   910 // Add two components
       
   911 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   912 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   913 // Register two files for the first component
       
   914 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini first_component_files
       
   915 // Verify files count for both components
       
   916 RUN_TEST_STEP 100 tscr SCRGetComponentFilesCount z:\tusif\tscr\tscr.ini verify_first_component_count_test53
       
   917 RUN_TEST_STEP 100 tscr SCRGetComponentFilesCount z:\tusif\tscr\tscr.ini verify_second_component_count_test53
       
   918 
       
   919 END_TESTCASE API-SEC-SCR-API-0053
       
   920 
       
   921 
       
   922 //! @SYMTestCaseID		API-SEC-SCR-API-0054
       
   923 //! @SYMTestCaseDesc 		Get components using composite filters - part 7
       
   924 
       
   925 START_TESTCASE API-SEC-SCR-API-0054
       
   926 
       
   927 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   928 // Add components
       
   929 // Components 1,2,3,4 have the same software type
       
   930 // Components 1,3,4,5 have the same vendor
       
   931 // Components 1,2,3,5 have the same name 
       
   932 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component1_test54
       
   933 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component2_test54
       
   934 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component3_test54
       
   935 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component4_test54
       
   936 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component5_test54
       
   937 // Retrieve all components with given name, software type and vendor - components 1 and 3 should match
       
   938 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_subsession_test54
       
   939 // Repeat the same, but for component ids 
       
   940 RUN_TEST_STEP 100 tscr SCRGetComponentIds z:\tusif\tscr\tscr.ini get_component_ids_test54
       
   941 
       
   942 END_TESTCASE API-SEC-SCR-API-0054
       
   943 
       
   944 
       
   945 //! @SYMTestCaseID		API-SEC-SCR-API-0055
       
   946 //! @SYMTestCaseDesc 		Verify adding and retrieving components with large size
       
   947 
       
   948 START_TESTCASE API-SEC-SCR-API-0055
       
   949 
       
   950 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   951 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
   952 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini huge_component_test55_update
       
   953 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini huge_component_test55_verify
       
   954 
       
   955 END_TESTCASE API-SEC-SCR-API-0055
       
   956 
       
   957 //! @SYMTestCaseID		API-SEC-SCR-API-0057
       
   958 //! @SYMTestCaseDesc 		Check filters for multiple locales in properties
       
   959 
       
   960 START_TESTCASE API-SEC-SCR-API-0057
       
   961 
       
   962 // Components 1,2 have value EnglishValue for the test property for ELangEnglish and JustValue for ELangNone
       
   963 // Component 3 has value EnglishValue for the test property for ELangNone
       
   964 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component1_test57
       
   965 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component2_test57
       
   966 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component3_test57
       
   967 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component1_properties
       
   968 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component2_properties
       
   969 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component3_properties
       
   970 // Retrieve all components with the test property EnglishValue for ELangEnglish
       
   971 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_english_property_test57
       
   972 // Retrieve all components with the test property EnglishValue for any locale
       
   973 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_any_property_test57
       
   974 // Retrieve all components with the test property EnglishValue for ELangSwedish
       
   975 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_negative_property_test57
       
   976 
       
   977 END_TESTCASE API-SEC-SCR-API-0057
       
   978 
       
   979 
       
   980 //! @SYMTestCaseID		API-SEC-SCR-API-0058
       
   981 //! @SYMTestCaseDesc 		Add a single software component with global id.
       
   982 
       
   983 START_TESTCASE API-SEC-SCR-API-0058
       
   984 
       
   985 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_global_id
       
   986 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini component_attributes_with_global_id
       
   987 // Add another component with the same global id
       
   988 RUN_TEST_STEP !Result=-11 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_global_id
       
   989 
       
   990 END_TESTCASE API-SEC-SCR-API-0058
       
   991 
       
   992 
       
   993 //! @SYMTestCaseID		API-SEC-SCR-API-0059
       
   994 //! @SYMTestCaseDesc 		Add a new component dependency.
       
   995 
       
   996 START_TESTCASE API-SEC-SCR-API-0059
       
   997 
       
   998 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
   999 // First add the supplier component (S1)
       
  1000 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini supplier_component
       
  1001 RUN_TEST_STEP 100 tscr SCRGetComponentId z:\tusif\tscr\tscr.ini supplier_component_globalid
       
  1002 // Then add the dependant component (D1)
       
  1003 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini dependant_component
       
  1004 RUN_TEST_STEP 100 tscr SCRGetComponentWithGlobalId z:\tusif\tscr\tscr.ini dependant_component_globalid
       
  1005 // Add dependency between the supplier and dependant components (D1 -> S1)
       
  1006 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_existing_components
       
  1007 // Check the dependancy added successfully
       
  1008 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini dependant_components
       
  1009 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini supplier_components
       
  1010 // Add another component which will be supplier (S2)
       
  1011 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_supplier_component
       
  1012 // Add a second dependancy where the lastly added component is supplier. (D1 -> S2)
       
  1013 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_second_supplier
       
  1014 // Get the all suppliers of the dependant component (D1)
       
  1015 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini all_supplier_components
       
  1016 // Add another component which will be a dependant. (D2)
       
  1017 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_dependant_component
       
  1018 // Add a second dependency where the D2 depends on S2
       
  1019 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_second_dependant
       
  1020 // Get the all dependants of the supplier component (S2)
       
  1021 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini all_dependant_components
       
  1022 // Try to duplicate an existing dependency
       
  1023 RUN_TEST_STEP !Result=-11 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_second_dependant
       
  1024 // Add a dependency to non-existing supplier
       
  1025 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_to_nonexisting_component
       
  1026 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini existing_and_nonexisting_suppliers
       
  1027 // Delete D2
       
  1028 RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_second_dependant
       
  1029 // Get the suppliers of the deleted dependant (D2). Should be empty.
       
  1030 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini suppliers_of_deleted_dependant
       
  1031 // Get the all suppliers of the dependant component (D1). Should be deleted.
       
  1032 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini all_supplier_components
       
  1033 // Delete S1
       
  1034 RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_first_supplier
       
  1035 // Dependencies where S1 is supplier should remain
       
  1036 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini remained_dependencies
       
  1037 
       
  1038 END_TESTCASE API-SEC-SCR-API-0059
       
  1039 
       
  1040 
       
  1041 //! @SYMTestCaseID		API-SEC-SCR-API-0060
       
  1042 //! @SYMTestCaseDesc 		Delete the component dependency.
       
  1043 
       
  1044 START_TESTCASE API-SEC-SCR-API-0060
       
  1045 
       
  1046 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1047 // First, add a dependency between two existing components, and then delete that dependency
       
  1048 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini supplier_component
       
  1049 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini dependant_component
       
  1050 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_existing_components
       
  1051 RUN_TEST_STEP 100 tscr SCRDeleteComponentDependency z:\tusif\tscr\tscr.ini dependency_with_existing_components
       
  1052 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini deleted_dependant
       
  1053 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini deleted_supplier
       
  1054 // Secondly, add a dependency between two non-existing components and then delete it.
       
  1055 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini dependency_with_nonexisting_components
       
  1056 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini dependant_nonexisting_components
       
  1057 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini supplier_nonexisting_components
       
  1058 
       
  1059 END_TESTCASE API-SEC-SCR-API-0060
       
  1060 
       
  1061 
       
  1062 //! @SYMTestCaseID		API-SEC-SCR-API-0061
       
  1063 //! @SYMTestCaseDesc 		Get components using composite filters - part 8
       
  1064 
       
  1065 START_TESTCASE API-SEC-SCR-API-0061
       
  1066 
       
  1067 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1068 // Add components
       
  1069 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1070 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1071 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1072 // Set common component attributes
       
  1073 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_first_component_attributes_test61
       
  1074 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_second_component_attributes_test61
       
  1075 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_third_component_attributes_test61
       
  1076 // Add a property to the second component
       
  1077 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini second_component_property
       
  1078 // Get all components with two common properties
       
  1079 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_drm_hidden_common_properties
       
  1080 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_originverified_knownrevoked_properties
       
  1081 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_components_with_common_and_customized_attributes
       
  1082 
       
  1083 END_TESTCASE API-SEC-SCR-API-0061
       
  1084 
       
  1085 
       
  1086 //! @SYMTestCaseID		API-SEC-SCR-API-0062
       
  1087 //! @SYMTestCaseDesc 		Add & query versioned component dependency.
       
  1088 
       
  1089 START_TESTCASE API-SEC-SCR-API-0062
       
  1090 
       
  1091 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1092 // First add the supplier component (S1)
       
  1093 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini supplier_component
       
  1094 // Then add the dependant component (D1)
       
  1095 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini dependant_component
       
  1096 // Add dependency between the supplier and dependant components (D1 -> S1)
       
  1097 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini versioned_dependency
       
  1098 // Check the dependancy added successfully
       
  1099 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_dependant_components
       
  1100 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_supplier_components
       
  1101 // Add another component which will be supplier (S2)
       
  1102 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_supplier_component
       
  1103 // Add a second dependancy where the lastly added component is supplier. (D1 -> S2)
       
  1104 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini versioned_dependency_with_second_supplier
       
  1105 // Get the all suppliers of the dependant component (D1)
       
  1106 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_all_supplier_components
       
  1107 // Add another component which will be a dependant. (D2)
       
  1108 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini second_dependant_component
       
  1109 // Add a second dependency where the D2 depends on S2
       
  1110 RUN_TEST_STEP 100 tscr SCRAddComponentDependency z:\tusif\tscr\tscr.ini versioned_dependency_with_second_dependant
       
  1111 // Get the all dependants of the supplier component (S2)
       
  1112 RUN_TEST_STEP 100 tscr SCRGetGlobalIdList z:\tusif\tscr\tscr.ini versioned_all_dependant_components
       
  1113 
       
  1114 END_TESTCASE API-SEC-SCR-API-0062
       
  1115 
       
  1116 
       
  1117 //! @SYMTestCaseID 		API-SEC-SCR-API-0063
       
  1118 //! @SYMTestCaseDesc 		Post-manufacture plugin management tests
       
  1119 
       
  1120 START_TESTCASE API-SEC-SCR-API-0063
       
  1121 
       
  1122 // Add a sofwtare component type with only unique name
       
  1123 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_nonlocalized_software_type
       
  1124 // Add a component to check that the non-localized software type has been added successfully
       
  1125 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_nonlocalized_software_type
       
  1126 // Check that the component is not orphaned 
       
  1127 RUN_TEST_STEP 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini non_orphaned_component
       
  1128 // Add a sofwtare component type with unique and localized names
       
  1129 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type
       
  1130 // Add a component to check that the localized software type has been added successfully
       
  1131 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_localized_software_type
       
  1132 // Try to add a component without specifying MIME types
       
  1133 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_software_type_without_mime_types
       
  1134 // Delete a software component type
       
  1135 RUN_TEST_STEP 100 tscr SCRDeleteSoftwareType z:\tusif\tscr\tscr.ini
       
  1136 // Check that the component is orphaned 
       
  1137 RUN_TEST_STEP 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini orphaned_component
       
  1138 // Get the orphaned component
       
  1139 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini orphaned_component_attributes
       
  1140 // Get the orphaned component via filter
       
  1141 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_orphaned_component_by_vendor
       
  1142 // Set the common properties of the orphaned component
       
  1143 RUN_TEST_STEP !Result=-46 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_orphaned_component_attributes
       
  1144 // Try to register some files to the orphaned component
       
  1145 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini orphaned_component_files
       
  1146 // Try to add a sutom property to the orphaned component
       
  1147 RUN_TEST_STEP !Result=-46 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini orphaned_component_properties
       
  1148 // Re-add the sofwtare component type with only unique name
       
  1149 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_nonlocalized_software_type
       
  1150 // Check that the component is not orphaned 
       
  1151 RUN_TEST_STEP 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini non_orphaned_component_after_reinstalling_swtype
       
  1152 // Check if a non-existing component is orphaned
       
  1153 RUN_TEST_STEP !Result=-1 100 tscr SCRIsComponentOrphaned z:\tusif\tscr\tscr.ini orphaned_non_existing_component
       
  1154 // Add the same software type again
       
  1155 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_nonlocalized_software_type
       
  1156 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_nonlocalized_software_type
       
  1157 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_different_plugin_uid
       
  1158 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_extra_name
       
  1159 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_missing_name
       
  1160 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_extra_mime
       
  1161 RUN_TEST_STEP 100 tscr SCRAddSoftwareType z:\tusif\tscr\tscr.ini add_localized_software_type_with_missing_mime
       
  1162 
       
  1163 END_TESTCASE API-SEC-SCR-API-0063
       
  1164 
       
  1165 
       
  1166 //! @SYMTestCaseID 		API-SEC-SCR-API-0064
       
  1167 //! @SYMTestCaseDesc 		Verify drive bitmask management
       
  1168 
       
  1169 START_TESTCASE API-SEC-SCR-API-0064
       
  1170 
       
  1171 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1172 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1173 // Register 2 files on drive C and one file on drive D
       
  1174 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini drives_management_register_files
       
  1175 // Verify that both C and D drives are used by the component
       
  1176 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini drives_management_both_drives
       
  1177 // Unregister one file on drive C
       
  1178 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini drives_management_unregister_first_c_file
       
  1179 // Verify that both C and D drives are used by the component
       
  1180 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini drives_management_both_drives
       
  1181 // Unregister one file on drive D
       
  1182 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini drives_management_unregister_first_d_file
       
  1183 // Verify that drive C is used by the component
       
  1184 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini drives_management_c_drive
       
  1185 // Unregister second file on drive C
       
  1186 RUN_TEST_STEP 100 tscr SCRUnregisterFile z:\tusif\tscr\tscr.ini drives_management_unregister_second_c_file
       
  1187 // Verify that no drives are used by the component
       
  1188 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
       
  1189 
       
  1190 END_TESTCASE API-SEC-SCR-API-0064
       
  1191 
       
  1192 
       
  1193 //! @SYMTestCaseID 		API-SEC-SCR-API-0065
       
  1194 //! @SYMTestCaseDesc 		Verify language downgrade path functionality
       
  1195 
       
  1196 START_TESTCASE API-SEC-SCR-API-0065
       
  1197 
       
  1198 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1199 // Add a single component
       
  1200 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_localizables_test65
       
  1201 // Set a localizable property for language English
       
  1202 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_base_language_property_test65
       
  1203 // Get the property for language English
       
  1204 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_base_language_property_test65
       
  1205 // Get the property for language American
       
  1206 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_child_language_property_test65
       
  1207 // Get the property for non-specified locale
       
  1208 RUN_TEST_STEP 100 tscr SCRGetComponentProperty z:\tusif\tscr\tscr.ini get_unspecified_language_property_test65
       
  1209 // Get component for unspecified, English and American locale
       
  1210 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_unspecified_names_test65
       
  1211 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_base_language_test65
       
  1212 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_with_child_language_test65
       
  1213 
       
  1214 END_TESTCASE API-SEC-SCR-API-0065
       
  1215 
       
  1216 
       
  1217 //! @SYMTestCaseID 		API-SEC-SCR-API-0066
       
  1218 //! @SYMTestCaseDesc 		Install log history tests
       
  1219 
       
  1220 START_TESTCASE API-SEC-SCR-API-0066
       
  1221 
       
  1222 // Delete database and log files
       
  1223 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1224 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
       
  1225 // Add a new component with version (since version is set in the same session, it is reflected to the log record)
       
  1226 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names_with_version
       
  1227 // Delete the component
       
  1228 RUN_TEST_STEP 100 tscr SCRDeleteComponent z:\tusif\tscr\tscr.ini delete_component
       
  1229 // Add the upgrade version of deleted component
       
  1230 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini update_common_component_names
       
  1231 // Get log entries and compare with the expected ones
       
  1232 RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini log_entries
       
  1233 // Add a component and then set its version. Since a new session is started, version is not reflected the log record.
       
  1234 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1235 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_attributes
       
  1236 // Add a component with dummy type
       
  1237 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_dummy_type
       
  1238 // Get the log entries for dummy software type
       
  1239 RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini dummy_log_entries
       
  1240 // Test the recorded component name for various situations
       
  1241 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1242 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
       
  1243 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_currentlocale_name
       
  1244 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_nonlocalized_name
       
  1245 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_with_localized_name
       
  1246 RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini name_log_entries
       
  1247 // Delete log file for the following test steps
       
  1248 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
       
  1249 // Add a component to create log file
       
  1250 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names_with_version
       
  1251 // Make the log file read-only
       
  1252 RUN_TEST_STEP 100 tscr SCRSetLogFileReadOnlyAttr z:\tusif\tscr\tscr.ini read_only_log_file
       
  1253 // Try to write into the read-only log file by adding a component 
       
  1254 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1255 // Verify that the component log couldn't be added, but the component has been added successfully
       
  1256 RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini readonly_log_entries
       
  1257 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini common_component_attributes
       
  1258 // Make sure SCR server shuts
       
  1259 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini db_file 
       
  1260 // Make the file writable
       
  1261 RUN_TEST_STEP 100 tscr SCRSetLogFileReadOnlyAttr z:\tusif\tscr\tscr.ini writable_log_file
       
  1262 // Try to add the component again
       
  1263 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1264 // Verify that the component log has been added this time
       
  1265 RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini writable_log_entries
       
  1266 // Delete the log file
       
  1267 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
       
  1268 // Add a component with EScrCompHidden type
       
  1269 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini hidden_common_component_names
       
  1270 // Get log entries. No log is written for a hidden component operation type.
       
  1271 RUN_TEST_STEP 100 tscr SCRGetLogEntries z:\tusif\tscr\tscr.ini hidden_log_entries
       
  1272 // Delete the log file
       
  1273 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
       
  1274 // Create the scr log file which includes maximum allowed records
       
  1275 RUN_TEST_STEP 500 tscr SCRCreateLogFile z:\tusif\tscr\tscr.ini log_file_size
       
  1276 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1277 // Delete the log file not to affect other tests' performance
       
  1278 RUN_TEST_STEP 100 tscr SCRDeleteDbFile z:\tusif\tscr\tscr.ini log_file 
       
  1279 
       
  1280 END_TESTCASE API-SEC-SCR-API-0066
       
  1281 
       
  1282 
       
  1283 //! @SYMTestCaseID 		API-SEC-SCR-API-0067
       
  1284 //! @SYMTestCaseDesc 		Version comparetor tests
       
  1285 
       
  1286 START_TESTCASE API-SEC-SCR-API-0067
       
  1287 
       
  1288 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini less_version_1 
       
  1289 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini less_version_2
       
  1290 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini less_version_3
       
  1291 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini great_version_1
       
  1292 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini great_version_2
       
  1293 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini great_version_3
       
  1294 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_1
       
  1295 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_2
       
  1296 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_3
       
  1297 RUN_TEST_STEP 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini equal_version_4
       
  1298 RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_1
       
  1299 RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_2
       
  1300 RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_3
       
  1301 RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_4
       
  1302 RUN_TEST_STEP !Result=-6 100 tscr SCRCompareVersions z:\tusif\tscr\tscr.ini wrong_version_5
       
  1303 
       
  1304 END_TESTCASE API-SEC-SCR-API-0067
       
  1305 
       
  1306 
       
  1307 //! @SYMTestCaseID 		API-SEC-SCR-API-0068
       
  1308 //! @SYMTestCaseDesc 		Test if an isntalled component is on read-only drive
       
  1309 
       
  1310 START_TESTCASE API-SEC-SCR-API-0068
       
  1311 
       
  1312 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1313 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1314 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1315 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini iscomponentonrom_positive
       
  1316 RUN_TEST_STEP 100 tscr SCRIsComponentOnReadOnlyDrive z:\tusif\tscr\tscr.ini iscomponentonrom_positive_check
       
  1317 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini iscomponentonrom_negative
       
  1318 RUN_TEST_STEP 100 tscr SCRIsComponentOnReadOnlyDrive z:\tusif\tscr\tscr.ini iscomponentonrom_negative_check
       
  1319 
       
  1320 END_TESTCASE API-SEC-SCR-API-0068
       
  1321 
       
  1322 
       
  1323 //! @SYMTestCaseID		API-SEC-SCR-API-0069
       
  1324 //! @SYMTestCaseDesc		Tests for component presence
       
  1325 
       
  1326 START_TESTCASE API-SEC-SCR-API-0069
       
  1327 
       
  1328 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1329 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1330 // Check for default componet presence value
       
  1331 RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini check_default_componentpresence
       
  1332 // Set the component presence value to false
       
  1333 RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_set_false
       
  1334 // Reset component presence value to true
       
  1335 RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_set_true
       
  1336 // Register the component files
       
  1337 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_component_files
       
  1338 // Check for presence after the files registration
       
  1339 RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_is_false
       
  1340 // Set the component presence value to false after files being registered
       
  1341 RUN_TEST_STEP 100 tscr ScrComponentPresence z:\tusif\tscr\tscr.ini componentpresence_set_false
       
  1342 
       
  1343 END_TESTCASE API-SEC-SCR-API-0069
       
  1344 
       
  1345 
       
  1346 //! @SYMTestCaseID 		API-SEC-SCR-API-0070
       
  1347 //! @SYMTestCaseDesc 		Verify that having the same name on different component's localizables works correctly
       
  1348 
       
  1349 START_TESTCASE API-SEC-SCR-API-0070
       
  1350 
       
  1351 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1352 // Add a component with same names on two different locales
       
  1353 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini add_component_with_same_localizables_test70
       
  1354 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_with_same_localizables_names_test70
       
  1355 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_same_localized_property_test70
       
  1356 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_with_same_localizables_properties_test70
       
  1357 
       
  1358 END_TESTCASE API-SEC-SCR-API-0070
       
  1359 
       
  1360 
       
  1361 //! @SYMTestCaseID 		API-SEC-SCR-API-0071
       
  1362 //! @SYMTestCaseDesc 		Verify that filters on empty vendor names work correctly
       
  1363 
       
  1364 START_TESTCASE API-SEC-SCR-API-0071
       
  1365 
       
  1366 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1367 // Add a component with a normal vendor name
       
  1368 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1369 // Add a component with an empty vendor name
       
  1370 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_empty_vendor_name
       
  1371 // Retrieve all components with empty vendor names
       
  1372 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_with_empty_vendor_name_test71
       
  1373 
       
  1374 END_TESTCASE API-SEC-SCR-API-0071
       
  1375 
       
  1376 
       
  1377 //! @SYMTestCaseID 		API-SEC-SCR-API-0072
       
  1378 //! @SYMTestCaseDesc 		Verify that setting very long attributes works
       
  1379 
       
  1380 START_TESTCASE API-SEC-SCR-API-0072
       
  1381 
       
  1382 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1383 // Add a component with a regular attributes
       
  1384 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1385 RUN_TEST_STEP 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_huge_name_vendor
       
  1386 RUN_TEST_STEP 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini component_huge_property
       
  1387 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_component_huge_name_vendor
       
  1388 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_huge_name_vendor
       
  1389 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_huge_property
       
  1390 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_huge_test
       
  1391 RUN_TEST_STEP 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_huge_file_property
       
  1392 RUN_TEST_STEP 100 tscr SCRGetComponentProperties z:\tusif\tscr\tscr.ini component_huge_property
       
  1393 RUN_TEST_STEP 100 tscr SCRGetFileProperties z:\tusif\tscr\tscr.ini component_huge_file_property
       
  1394 
       
  1395 END_TESTCASE API-SEC-SCR-API-0072
       
  1396 
       
  1397 
       
  1398 //! @SYMTestCaseID 		API-SEC-SCR-API-0073
       
  1399 //! @SYMTestCaseDesc 		Verify that setting extremely long attributes doesn't work and that a proper error code is returned
       
  1400 
       
  1401 START_TESTCASE API-SEC-SCR-API-0073
       
  1402 
       
  1403 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1404 RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini very_huge_component_name
       
  1405 RUN_TEST_STEP !Result=-6 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini very_huge_component_vendor_name
       
  1406 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1407 RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_very_huge_name
       
  1408 RUN_TEST_STEP !Result=-6 100 tscr SCRSetCommonProperty z:\tusif\tscr\tscr.ini update_component_set_very_huge_vendor
       
  1409 RUN_TEST_STEP !Result=-6 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_component_very_huge_property_name
       
  1410 RUN_TEST_STEP !Result=-6 100 tscr SCRSetComponentProperty z:\tusif\tscr\tscr.ini set_component_very_huge_property_value
       
  1411 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_file_huge_test
       
  1412 RUN_TEST_STEP !Result=-6 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_very_huge_file_property_name
       
  1413 RUN_TEST_STEP !Result=-6 100 tscr SCRAddFileProperty z:\tusif\tscr\tscr.ini component_very_huge_file_property_value
       
  1414 RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_name
       
  1415 RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_vendor
       
  1416 RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_property_name
       
  1417 RUN_TEST_STEP !Result=-6 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini get_component_by_very_huge_property_value
       
  1418 
       
  1419 END_TESTCASE API-SEC-SCR-API-0073
       
  1420 
       
  1421 
       
  1422 //! @SYMTestCaseID 		API-SEC-SCR-API-0074
       
  1423 //! @SYMTestCaseDesc 		Verify that invalid parameters in filters don't cause failures
       
  1424 
       
  1425 START_TESTCASE API-SEC-SCR-API-0074
       
  1426 
       
  1427 RUN_TEST_STEP 100 tscr SCRValuesNegative z:\tusif\tscr\tscr.ini
       
  1428 
       
  1429 END_TESTCASE API-SEC-SCR-API-0074
       
  1430 
       
  1431 
       
  1432 //! @SYMTestCaseID 		API-SEC-SCR-API-0075
       
  1433 //! @SYMTestCaseDesc 		Try closing a session whilst a subsession is open
       
  1434 
       
  1435 START_TESTCASE API-SEC-SCR-API-0075
       
  1436 
       
  1437 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1438 // Make sure that sub-sessions will have entries to iterate on by adding a component
       
  1439 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini common_component_names
       
  1440 RUN_TEST_STEP 100 tscr SCRCreateTransaction z:\tusif\tscr\tscr.ini close_session_with_open_subsession
       
  1441 
       
  1442 END_TESTCASE API-SEC-SCR-API-0075
       
  1443 
       
  1444 
       
  1445 //! @SYMTestCaseID 		API-SEC-SCR-API-0076
       
  1446 //! @SYMTestCaseDesc 		Verify registering files when setting aConsiderForInstalledDrives to false
       
  1447 
       
  1448 START_TESTCASE API-SEC-SCR-API-0076
       
  1449 
       
  1450 RUN_TEST_STEP 100 tscr SCRDeleteAllComponents z:\tusif\tscr\tscr.ini
       
  1451 // Register two components with different names
       
  1452 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini test76_component_without_drives
       
  1453 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini test76_component_with_drives
       
  1454 // Register same files to both components, while setting the flag to false for the first component
       
  1455 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_files_consider_drives_false_test76
       
  1456 RUN_TEST_STEP 100 tscr SCRRegisterFile z:\tusif\tscr\tscr.ini register_files_consider_drives_true_test76
       
  1457 // Check that filter on components which have files on drive C does not return component 1, but returns component 2
       
  1458 RUN_TEST_STEP 100 tscr ScrComponentRegistrySubsession z:\tusif\tscr\tscr.ini components_on_driveC_test76
       
  1459 // Verify that files were registered to the first component
       
  1460 RUN_TEST_STEP 100 tscr ScrFileListSubsession z:\tusif\tscr\tscr.ini component_files_test76
       
  1461 // Verify that the first component does not list any registered drives
       
  1462 RUN_TEST_STEP 100 tscr SCRGetComponent z:\tusif\tscr\tscr.ini get_no_drives_component_test76
       
  1463 END_TESTCASE API-SEC-SCR-API-0076
       
  1464 
       
  1465 
       
  1466 //! @SYMTestCaseID		API-SEC-SCR-API-0077
       
  1467 //! @SYMTestCaseDesc 		Add a single software component with localized information and retrieve the same
       
  1468 
       
  1469 START_TESTCASE API-SEC-SCR-API-0077
       
  1470 RUN_TEST_STEP 100 tscr SCRAddComponent z:\tusif\tscr\tscr.ini component_localized_info
       
  1471 RUN_TEST_STEP 100 tscr SCRGetComponentLocalizedInfo z:\tusif\tscr\tscr.ini verify_component_localized_info
       
  1472 END_TESTCASE API-SEC-SCR-API-0077