From e27f30c180d06d4a7f3f604aa9be7cea44cfad33 Mon Sep 17 00:00:00 2001 From: pkulkarni <pkulkarni75@gmail.com> Date: Thu, 23 Nov 2017 13:54:21 +0100 Subject: [PATCH] Corrections to CSE/REG/UPD/003 to check we receive the update request as in this case the IUT is triggered to send the update request Signed-off-by: pkulkarni <pkulkarni75@gmail.com> --- OneM2M_Testcases_CSE.ttcn | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/OneM2M_Testcases_CSE.ttcn b/OneM2M_Testcases_CSE.ttcn index f02181e..74bd72a 100644 --- a/OneM2M_Testcases_CSE.ttcn +++ b/OneM2M_Testcases_CSE.ttcn @@ -3023,6 +3023,10 @@ module OneM2M_Testcases_CSE { }//end f_CSE_REG_UPD_002 } //end g_CSE_REG_UPD_002 + /** + * @desc Check that IUT sends a <remoteCSE> update request with OPTIONAL_ATTRIBUTE attribute. + * + */ group g_CSE_REG_UPD_003 { testcase TC_CSE_REG_UPD_003_ET() runs on Tester system CseSystem { @@ -3102,7 +3106,7 @@ module OneM2M_Testcases_CSE { var RequestPrimitive v_request; var ResourceType v_resourceType := int16; //remoteCSE var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; - var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0]; + var charstring v_action := "Please, send a valid UPDATE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0]; // Test control if(not(PICS_MN_CSE)) { @@ -3126,27 +3130,16 @@ module OneM2M_Testcases_CSE { // Test Body v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); - mccPort.send(m_request(v_request)); tc_ac.start; alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute " & p_attribute[0]); - f_setResource(v_request.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + [] mccPortIn.receive(mw_request(v_request)) { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + setverdict(pass, __SCOPE__ & ": Received request for updation for resource type remoteCSE containing attribute " & p_attribute[0]); f_setResource(v_request.primitiveContent,int16); } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute " & p_attribute[0]); - f_setResource(v_request.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + [] mccPortIn.receive { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute" & p_attribute[0]); + setverdict(fail, __SCOPE__ & ": Error: Did not receive update request for resource type remoteCSE"); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); -- GitLab