diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 6521b99b86ef357a69d464d5b674def52b8a77a3..85c24219177d9a304c0d6ffaf9a246562694eb7a 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -1097,20 +1097,22 @@ module OneM2M_Functions { } if(not(v_deregistrationPerformed)) { - //Deregistration by Registree (IUT) - Send trigger message for deregistration - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(vc_localRemoteCseIndex); - f_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(vc_localRemoteCseIndex)); - - tc_ac.start; - alt { - [] mccPortIn.receive(mw_request(mw_delete(f_getLocalResourceAddress(vc_localRemoteCseIndex)))) -> value vc_request { - tc_ac.stop; - f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive); - mccPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))); - log(__SCOPE__&": INFO: Deregistration performed successfully"); - } - [] tc_ac.timeout { - log(__SCOPE__&": INFO: No deregistration performed"); + if(vc_localRemoteCseIndex != -1) { + //Deregistration by Registree (IUT) - Send trigger message for deregistration + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(vc_localRemoteCseIndex); + f_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(vc_localRemoteCseIndex)); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_delete(f_getLocalResourceAddress(vc_localRemoteCseIndex)))) -> value vc_request { + tc_ac.stop; + f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive); + mccPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))); + log(__SCOPE__&": INFO: Deregistration performed successfully"); + } + [] tc_ac.timeout { + log(__SCOPE__&": INFO: No deregistration performed"); + } } } } @@ -5290,6 +5292,45 @@ module OneM2M_Functions { //log("result: " & result); return result; } + + /** + * @desc Replace the CSE-Name by the shortcut ("-") in a structured resource id format + * @return Cleaned-up resourceID + */ + function f_useShortcutInResourceId(in XSD.ID p_resourceID) return XSD.ID { + var integer v_length := lengthof(p_resourceID); + var integer i; + var integer v_numberOfSlashes := 0; + var XSD.ID v_modifiedResourceId:= ""; + var XSD.ID v_cseName := ""; + + if(p_resourceID[0] == "/") { + if(p_resourceID[1] == "/") { + v_numberOfSlashes := 4; + } else { + v_numberOfSlashes := 2; + } + } + //log("p_resourceID: " & p_resourceID); + for (i := 0; i < v_length ; i := i+1){ + if(v_numberOfSlashes != 0) { + if(p_resourceID[i]=="/"){ + v_numberOfSlashes := v_numberOfSlashes - 1; + } + v_modifiedResourceId := v_modifiedResourceId & p_resourceID[i]; + } else if (v_numberOfSlashes == 0){ + if(p_resourceID[i]=="/"){ + v_numberOfSlashes := v_numberOfSlashes - 1; + v_modifiedResourceId := v_modifiedResourceId & "-/"; + log(__SCOPE__, "INFO: CSE Name to be removed from resource ID: " & v_cseName); + } + v_cseName := v_cseName & p_resourceID[i]; + } else if (v_numberOfSlashes == -1){ + v_modifiedResourceId := v_modifiedResourceId & p_resourceID[i]; + } + } + return v_modifiedResourceId; + } /** * @desc It removes the poa from a given url diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index f19a410685aca5e3760f1ab47b975380865a458a..35b953f1824848c249a3b4fe35059986c2537a33 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -435,7 +435,7 @@ module OneM2M_Templates { sizeBelow := omit, contentType_list := {}, attribute_list := {}, - filterUsage := omit, + filterUsage := int1, limit := omit, semanticsFilter_list := {}, filterOperation := omit, diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 21f509d1e8f1442156c0a4e228a4db13f1476786..2badcc6a6e3a0a0a737ca8520dca3527f05a918d 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -826,7 +826,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - //Force usage of Non-Hierarchical addressing method + //Force usage of Hierarchical addressing method v_addressingMethod := e_hierarchical; v_primitiveScope := p_primitiveScope; v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); @@ -862,6 +862,68 @@ module OneM2M_PermutationFunctions { function f_CSE_GEN_CRE_003(in PrimitiveScope p_primitiveScope) runs on AeSimu { + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + var XSD.ID v_cseName := PX_CSE_NAME; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); + v_request.to_ := f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)); + + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource created using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_CRE_003 + + + function f_CSE_GEN_CRE_004(in PrimitiveScope p_primitiveScope) runs on AeSimu { + // Local variables var RequestPrimitive v_request; var integer v_aeIndex := -1; @@ -918,7 +980,7 @@ module OneM2M_PermutationFunctions { // Tear down f_cf01Down(); - }//end f_CSE_GEN_CRE_003 + }//end f_CSE_GEN_CRE_004 } // end of group Create @@ -1007,7 +1069,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - //Force usage of Non-Hierarchical addressing method + //Force usage of Hierarchical addressing method v_addressingMethod := e_hierarchical; v_primitiveScope := p_primitiveScope; @@ -1038,6 +1100,118 @@ module OneM2M_PermutationFunctions { }//end f_CSE_GEN_RET_002 + function f_CSE_GEN_RET_003(in PrimitiveScope p_primitiveScope) runs on AeSimu { + + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; + + mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)), f_getOriginator(v_resourceIndex)))));tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource retrieved using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_RET_003 + + function f_CSE_GEN_RET_004(in PrimitiveScope p_primitiveScope) runs on AeSimu { + + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_hybrid; + v_primitiveScope := p_primitiveScope; + + mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))));tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource retrieved using hybrid addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using hybrid addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_RET_004 + } // end of group Retrieve group Update { @@ -1131,7 +1305,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - //Force usage of Non-Hierarchical addressing method + //Force usage of Hierarchical addressing method v_addressingMethod := e_hierarchical; v_primitiveScope := p_primitiveScope; @@ -1168,6 +1342,132 @@ module OneM2M_PermutationFunctions { }//end f_CSE_GEN_UPD_002 + function f_CSE_GEN_UPD_003(in PrimitiveScope p_primitiveScope) runs on AeSimu { + + // Local variables + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; + + v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; + + v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + v_updateRequest.to_ := f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)); + + mcaPort.send(f_getMsgOutPrimitive(m_request(v_updateRequest))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource updated using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_UPD_003 + + function f_CSE_GEN_UPD_004(in PrimitiveScope p_primitiveScope) runs on AeSimu { + + // Local variables + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_hybrid; + v_primitiveScope := p_primitiveScope; + + v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; + + v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + v_updateRequest.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); + + mcaPort.send(f_getMsgOutPrimitive(m_request(v_updateRequest))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource updated using hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_UPD_004 + } // end of group Update group Delete { @@ -1258,7 +1558,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // Test Body - //Force usage of Non-Hierarchical addressing method + //Force usage of Hierarchical addressing method v_addressingMethod := e_hierarchical; v_primitiveScope := p_primitiveScope; @@ -1292,6 +1592,126 @@ module OneM2M_PermutationFunctions { }//end f_CSE_GEN_DEL_002 + function f_CSE_GEN_DEL_003(in PrimitiveScope p_primitiveScope) runs on AeSimu { + + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; + + v_request := valueof(m_delete(f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)), f_getOriginator(v_resourceIndex))); + + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource deleted using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_DEL_003 + + function f_CSE_GEN_DEL_004(in PrimitiveScope p_primitiveScope) runs on AeSimu { + + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + + // Test Body + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_hybrid; + v_primitiveScope := p_primitiveScope; + + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex))); + + mcaPort.send(f_getMsgOutPrimitive(m_request(v_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource deleted using hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_GEN_DEL_004 + } // end of group Delete } // end of group Generic diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index 33a6fc5c370a02468939282790382ed1dfa001d1..629f4d6a58e477be23e2b49e4228942e3780c705 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -10705,6 +10705,7 @@ module OneM2M_Testcases_CSE_Release_1 { var integer v_childResourceIndex := -1; const ResourceType c_containerResourceType := int3; var AttributeAux v_invalidAttribute; + var FilterCriteria v_invalidFilterCriteria; // Test control @@ -10718,7 +10719,9 @@ module OneM2M_Testcases_CSE_Release_1 { v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); - v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1)); + v_invalidFilterCriteria := valueof(m_filterCriteria); + v_invalidFilterCriteria.sizeBelow := 1;//Whatever value, it will be overwritten by forceFields parameter + v_request := valueof(m_retrieveFilterCriteria(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), v_invalidFilterCriteria)); v_invalidAttribute := {name := "filterCriteria.sizeBelow", value_ := "-1"}; mcaPort.send(f_getMsgOutPrimitive(m_request(v_request, {v_invalidAttribute}))); tc_ac.start; diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index 367bf4a0db2c24128b1d230c2a621dc67c87555b..3227eeb646e3f5a0ec657635f283f6c69a906c3b 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -86,7 +86,7 @@ module OneM2M_Testcases_CSE_Release_2 { group g_CSE_GEN_CRE_003 { /** - * @desc Check that the IUT accepts the creation of a <container> resource using structured resource identifier with hybrid addressing. + * @desc Check that the IUT accepts the creation of a <container> resource using shortcut structured resource identifier * */ testcase TC_CSE_GEN_CRE_003_CSR() runs on Tester system CseSystem { @@ -121,18 +121,310 @@ module OneM2M_Testcases_CSE_Release_2 { v_ae1.start(f_CSE_GEN_CRE_003(e_absolute)); v_ae1.done; } + + }// end of group g_CSE_GEN_CRE_003 + + group g_CSE_GEN_CRE_004 { + + /** + * @desc Check that the IUT accepts the creation of a <container> resource using structured resource identifier with hybrid addressing. + * + */ + testcase TC_CSE_GEN_CRE_004_CSR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_CRE_004(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_CRE_004_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_CRE_004(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_CRE_004_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_CRE_004(e_absolute)); + v_ae1.done; + } - } // end of group g_CSE_GEN_CRE_003 + } // end of group g_CSE_GEN_CRE_004 } // end of group Create group Retrieve { + + group g_CSE_GEN_RET_003 { + + /** + * @desc Check that the IUT accepts the retrieval of a <container> resource using shortcut structured resource identifier + * + */ + testcase TC_CSE_GEN_RET_003_CSR() runs on Tester system CseSystem { + // Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_RET_003(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_RET_003_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_RET_003(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_RET_003_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_RET_003(e_absolute)); + v_ae1.done; + } + + } // end of group g_CSE_GEN_RET_003 + + + group g_CSE_GEN_RET_004 { + + /** + * @desc Check that the IUT accepts the retrieval of a <container> resource using structured resource identifier with hybrid addressing. + * + */ + testcase TC_CSE_GEN_RET_004_CSR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_RET_004(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_RET_004_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_RET_004(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_RET_004_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_RET_004(e_absolute)); + v_ae1.done; + } + + } // end of group g_CSE_GEN_RET_004 + } // end of group Retrieve group Update { + + group g_CSE_GEN_UPD_003 { + + /** + * @desc Check that the IUT accepts the update of a <container> resource using shortcut structured resource identifier + * + */ + testcase TC_CSE_GEN_UPD_003_CSR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_UPD_003(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_UPD_003_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_UPD_003(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_UPD_003_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_UPD_003(e_absolute)); + v_ae1.done; + } + + } // end of group g_CSE_GEN_UPD_003 + + + group g_CSE_GEN_UPD_004 { + + /** + * @desc Check that the IUT accepts the update of a <container> resource using structured resource identifier with hybrid addressing.. + * + */ + testcase TC_CSE_GEN_UPD_004_CSR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_UPD_004(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_UPD_004_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_UPD_004(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_UPD_004_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_UPD_004(e_absolute)); + v_ae1.done; + } + + } // end of group g_CSE_GEN_UPD_004 + } // end of group Update group Delete { + + group g_CSE_GEN_DEL_003 { + + /** + * @desc Check that the IUT accepts the deletion of a <container> resource using shortcut structured resource identifier + * + */ + testcase TC_CSE_GEN_DEL_003_CSR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_DEL_003(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_DEL_003_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_DEL_003(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_DEL_003_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_DEL_003(e_absolute)); + v_ae1.done; + } + + } // end of group g_CSE_GEN_DEL_003 + + + group g_CSE_GEN_DEL_004 { + + /** + * @desc Check that the IUT accepts the deletion of a <container> resource using structured resource identifier with hybrid addressing. + * + */ + testcase TC_CSE_GEN_DEL_004_CSR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_DEL_004(e_cseRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_DEL_004_SPR() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_DEL_004(e_spRelative)); + v_ae1.done; + } + + testcase TC_CSE_GEN_DEL_004_ABS() runs on Tester system CseSystem { + // Local variables + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1)); + v_ae1.done; + + v_ae1.start(f_CSE_GEN_DEL_004(e_absolute)); + v_ae1.done; + } + + } // end of group g_CSE_GEN_DEL_004 + } // end of group Delete } // end of group Generic @@ -1086,6 +1378,7 @@ module OneM2M_Testcases_CSE_Release_2 { v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int9));//ResultContent = 9 (modified attributes) v_ae1.done; } + } // end g_CSE_DMR_RET_020 group g_CSE_DMR_RET_021 { @@ -2219,8 +2512,8 @@ module OneM2M_Testcases_CSE_Release_2 { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; - var RateLimit v_rateLimit_1 := {0, omit}; - var RateLimit v_rateLimit_2 := {1, omit}; + var RateLimit v_rateLimit_1 := {0, "PT20M"}; + var RateLimit v_rateLimit_2 := {1, "PT30M"}; var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var ResponsePrimitive v_responsePrimitive;