From 6d9c9e0641c394a3418f07e8bfaae9446cb59d3f Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Wed, 25 Jul 2018 15:32:11 +0200 Subject: [PATCH] Fixing and improving of f_AE_DMR_RET_001 Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- OneM2M_PermutationFunctions.ttcn | 19 ++++++++++++------- OneM2M_Testcases_AE_Release_1.ttcn | 6 +++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index bf34ee7..55989c1 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -681,7 +681,7 @@ module OneM2M_PermutationFunctions { group Retrieve { - function f_AE_DMR_RET_001(ResourceType p_resourceType, template PrimitiveContent p_primitiveContent, in universal charstring p_action) runs on CseSimu { + function f_AE_DMR_RET_001(ResourceType p_resourceType, in template (omit) PrimitiveContent p_primitiveContent, in universal charstring p_action) runs on CseSimu { //variables var template UtTriggerPrimitive v_utRequest; @@ -693,21 +693,26 @@ module OneM2M_PermutationFunctions { //Test component configuration f_cf03Up(); - //send triggerin - v_utRequest := m_utRetrieve(f_getLocalResourceAddress(vc_cSEBaseIndex)); - f_sendUtPrimitive(v_utRequest,p_action); + //send triggering message + if(p_resourceType != int5) { + v_localResource := f_generateLocalResource(p_primitiveContent, vc_cSEBaseIndex, p_resourceType); + v_resourceIndex := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex); + } else { + v_resourceIndex := vc_cSEBaseIndex; + } + v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex)); + f_sendUtPrimitive(v_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ - [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(vc_cSEBaseIndex)))) -> value v_request { + [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_resourceIndex)))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!"); - v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_); v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } - [] mcaPortIn.receive { + [] mcaPortIn.receive (mw_request(mw_retrieve(?))){ tc_ac.stop; setverdict(fail, __SCOPE__, " : error while retrieving resource !"); mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); diff --git a/OneM2M_Testcases_AE_Release_1.ttcn b/OneM2M_Testcases_AE_Release_1.ttcn index ca7fa6c..f3d80d5 100644 --- a/OneM2M_Testcases_AE_Release_1.ttcn +++ b/OneM2M_Testcases_AE_Release_1.ttcn @@ -1395,7 +1395,7 @@ module OneM2M_Testcases_AE_Release_1 { testcase TC_AE_DMR_RET_001_CB() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for CSEBase"; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for CSEBase to "; v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1)); v_cse1.done; v_cse1.start(f_AE_DMR_RET_001(int5, m_primitiveContentCSEBase(m_contentCreateCSEBase),v_action)); @@ -1405,7 +1405,7 @@ module OneM2M_Testcases_AE_Release_1 { testcase TC_AE_DMR_RET_001_AE() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for AE"; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for AE to "; v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1)); v_cse1.done; v_cse1.start(f_AE_DMR_RET_001(int2, m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit)),v_action)); @@ -1415,7 +1415,7 @@ module OneM2M_Testcases_AE_Release_1 { testcase TC_AE_DMR_RET_001_CNT() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for Container"; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for Container to "; v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1)); v_cse1.done; v_cse1.start(f_AE_DMR_RET_001(int3, m_primitiveContentContainer(m_contentCreateContainer()),v_action)); -- GitLab