os/security/contentmgmt/referencedrmagent/tcaf/scripts/stringattributes.script
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 //
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // All rights reserved.
     4 // This component and the accompanying materials are made available
     5 // under the terms of the License "Eclipse Public License v1.0"
     6 // which accompanies this distribution, and is available
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 //
     9 // Initial Contributors:
    10 // Nokia Corporation - initial contribution.
    11 //
    12 // Contributors:
    13 //
    14 // Description: 
    15 //
    16 
    17 
    18 LOAD_SUITE tcaf
    19 LOAD_SUITE RTAUtils
    20 
    21 RUN_UTILS MkDir c:\rta\
    22 RUN_UTILS MkDir c:\rta\testdata\
    23 RUN_UTILS MkDir c:\tcaf\
    24 RUN_UTILS MkDir c:\tcaf\testdata\
    25 RUN_UTILS MkDir c:\tcaf\testdata\TestAgentPrivateDir\
    26 
    27 RUN_UTILS CopyFile z:\rta\testdata\*.* c:\rta\testdata\*.*
    28 RUN_UTILS CopyFile z:\tcaf\testdata\*.* c:\tcaf\testdata\*.*
    29 RUN_UTILS CopyFile z:\tcaf\testdata\TestAgentPrivateDir\*.* c:\tcaf\testdata\TestAgentPrivateDir\*.*
    30 
    31 
    32 START_TESTCASE 			SEC-CAF-STRATR-0001
    33 //! @SYMTestCaseID 		SEC-CAF-STRATR-0001
    34 //! @SYMTestCaseDesc 		CreateDrmArchive for content.xml
    35 RUN_TEST_STEP 100 RTAUtils CreateDrmArchive c:\tcaf\stringattributes.ini CreateDrmArchive
    36 END_TESTCASE 			SEC-CAF-STRATR-0001
    37 
    38 START_TESTCASE 			SEC-CAF-STRATR-0002
    39 //! @SYMTestCaseID 		SEC-CAF-STRATR-0002
    40 //! @SYMTestCaseDesc 		copy stringattribute.content file to the private directory of the RTA, so the RTA gets picked
    41 RUN_TEST_STEP 100 tcaf CAFCopyFileStep c:\tcaf\stringattributes.ini PrivateCopyFileOk
    42 END_TESTCASE 			SEC-CAF-STRATR-0002
    43 
    44 
    45 START_TESTCASE 			SEC-CAF-STRATR-1909
    46 //------------------------------------- 
    47 //--  Step to retrieve TransactionID
    48 //------------------------------------- 
    49 //! @SYMTestCaseID 		SEC-CAF-STRATR-1909
    50 //! @SYMTestCaseDesc 		Test addition of new entry,TransactionID, in TStringAttribute
    51 //! @SYMCR 			CR0895
    52 //! @SYMREQ 			REQ 6526, 6527
    53 //! @SYMTestPriority 		High
    54 //! @SYMTestActions 		RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both shuold match.
    55 //! @SYMTestExpectedResults	transactionid in the .ini file should be identical to the one in .content file. 
    56 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute
    57 END_TESTCASE 			SEC-CAF-STRATR-1909
    58 
    59 START_TESTCASE 			SEC-CAF-STRATR-1914
    60 //--------------------------------------------------- 
    61 //-- Step to retrieve non existing transaction ID
    62 //--------------------------------------------------- 
    63 //! @SYMTestCaseID 		SEC-CAF-STRATR-1914
    64 //! @SYMTestCaseDesc 		Test retrieval of non-existing TransactionID, in TStringAttribute
    65 //! @SYMCR 			CR0895
    66 //! @SYMREQ 			REQ 6526, 6527
    67 //! @SYMTestPriority 		High
    68 //! @SYMTestActions 		RTA gets picked to read the content file, calls GetStringAttribute on transactionid and initiliases its value to "". 
    69 //! @SYMTestExpectedResults	expected value is empty string since there is not TransactionID attribute in this content, and expected result is KErrNotfound. 
    70 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini NonExistingTransactionIDAttribute
    71 END_TESTCASE 			SEC-CAF-STRATR-1914
    72 
    73 
    74 
    75 START_TESTCASE 			SEC-CAF-STRATR-1915
    76 //-----------------------------------------------------------------
    77 //-- Step to retrieve transaction ID using GetStringAttributeSet.
    78 //-----------------------------------------------------------------
    79 //! @SYMTestCaseID 		SEC-CAF-STRATR-1915
    80 //! @SYMTestCaseDesc 		Test TransactionID retrieval calling GetStringAttributeSet()
    81 //! @SYMCR 			CR0895
    82 //! @SYMREQ 			REQ 6526, 6527
    83 //! @SYMTestPriority 		High
    84 //! @SYMTestActions 		RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values.
    85 //! @SYMTestExpectedResults	transactionid & contentid should be the same as the ones defined in the .ini file.
    86 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
    87 END_TESTCASE 			SEC-CAF-STRATR-1915
    88 
    89 
    90 START_TESTCASE 			SEC-CAF-STRATR-3156
    91 //! @SYMTestCaseID 		SEC-CAF-STRATR-3156
    92 //! @SYMTestCaseDesc 		Test TransactionID retrieval calling GetStringAttributeSet()
    93 //! @SYMCR 			CR0895
    94 //! @SYMREQ 			REQ 6526, 6527
    95 //! @SYMTestPriority 		High
    96 //! @SYMTestActions 		RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values.
    97 //! @SYMTestExpectedResults	transactionid & contentid should be the same as the ones defined in the .ini file.
    98 RUN_TEST_STEP 100 tcaf CAFManagerStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
    99 END_TESTCASE 			SEC-CAF-STRATR-3156
   100 
   101 
   102 START_TESTCASE 			SEC-CAF-STRATR-1916
   103 //-------------------------------------------------
   104 //-- Step to retrieve 1char long transaction ID
   105 //-------------------------------------------------
   106 //! @SYMTestCaseID 		SEC-CAF-STRATR-1916
   107 //! @SYMTestCaseDesc 		Test 1char long transactionid
   108 //! @SYMCR 			CR0895
   109 //! @SYMREQ 			REQ 6526, 6527
   110 //! @SYMTestPriority 		High
   111 //! @SYMTestActions 		RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match.
   112 //! @SYMTestExpectedResults	transactionid in the .ini file should be identical to the one in .content file. 
   113 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute1char
   114 END_TESTCASE 			SEC-CAF-STRATR-1916
   115 
   116 
   117 START_TESTCASE 			SEC-CAF-STRATR-1919
   118 //-------------------------------------------------
   119 //-- Step to retrieve 13char long Transaction ID
   120 //-------------------------------------------------
   121 //! @SYMTestCaseID 		SEC-CAF-STRATR-1919
   122 //! @SYMTestCaseDesc 		Test 13char long transactionid
   123 //! @SYMCR 			CR0895
   124 //! @SYMREQ 			REQ 6526, 6527
   125 //! @SYMTestPriority 		High
   126 //! @SYMTestActions 		RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match.
   127 //! @SYMTestExpectedResults	transactionid in the .ini file should be identical to the one in .content file. 
   128 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute13char
   129 END_TESTCASE 			SEC-CAF-STRATR-1919
   130 
   131 
   132 START_TESTCASE 			SEC-CAF-STRATR-1918
   133 //--------------------------------------------------
   134 //-- Step to retrieve 257char long transaction ID
   135 //--------------------------------------------------
   136 //! @SYMTestCaseID 		SEC-CAF-STRATR-1918
   137 //! @SYMTestCaseDesc 		Test addition of new entry,TransactionID, in TStringAttribute
   138 //! @SYMCR 			CR0895
   139 //! @SYMREQ 			REQ 6526, 6527
   140 //! @SYMTestPriority 		High
   141 //! @SYMTestActions 		RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. 
   142 //! @SYMTestExpectedResults	An overflow error is expected as size of transaction ID is greater than the client side buffer size.
   143 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini 257LengthTransactionIDAttribute
   144 END_TESTCASE 			SEC-CAF-STRATR-1918
   145 
   146 
   147 START_TESTCASE 			SEC-CAF-STRATR-3384
   148 //--------------------------------------------------
   149 // Regression tests for DEF 101676
   150 //--------------------------------------------------
   151 //! @SYMTestCaseID 		SEC-CAF-STRATR-3384
   152 //! @SYMTestCaseDesc 		Test of GetStringAttribute functions in RTA Content module
   153 //! @SYMDEF 			DEF101676
   154 //! @SYMTestPriority 		High
   155 //! @SYMTestActions 		RTA gets picked to read the content file, gets the StringAttribute values & compares them with expected values in the .ini file. 
   156 //! @SYMTestExpectedResults	The values should match those in the .ini file
   157 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentStringAttribute
   158 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
   159 END_TESTCASE 			SEC-CAF-STRATR-3384
   160 
   161 
   162 START_TESTCASE 			SEC-CAF-STRATR-3399
   163 //--------------------------------------------------
   164 // Testing new entries added for DEF102465
   165 //--------------------------------------------------
   166 //! @SYMTestCaseID 		SEC-CAF-STRATR-3399
   167 //! @SYMTestCaseDesc 		Test addition of new entries in TStringAttribute: EContentLocation & ERightsIssuerURI, and in TAttribute: EContentVersion
   168 //! @SYMDEF 			DEF102465
   169 //! @SYMTestPriority 		High
   170 //! @SYMTestActions 		RTA gets picked to read the content file, gets the attributes & compares them with expected values in the .ini file.
   171 //! @SYMTestExpectedResults	Attributes in the .ini file should be identical to the ones in .content file. 
   172 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentLocationAttribute
   173 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini RightsIssuerURIAttribute
   174 RUN_TEST_STEP 100 tcaf CAFContentAttributeStep c:\tcaf\stringattributes.ini ContentVersionAttribute
   175 END_TESTCASE 			SEC-CAF-STRATR-3399
   176 
   177 
   178 START_TESTCASE 			SEC-CAF-STRATR-0003
   179 //! @SYMTestCaseID 		SEC-CAF-STRATR-0003
   180 //! @SYMTestCaseDesc 		delete the copy created earlier
   181 RUN_TEST_STEP 100 tcaf CAFDeleteStep c:\tcaf\stringattributes.ini PrivateDeleteFileOk
   182 END_TESTCASE 			SEC-CAF-STRATR-0003
   183 
   184 //delete content file
   185 RUN_UTILS Delete c:\tcaf\testdata\stringattribute.content
   186