From 0e138452fd0e71b1243619d89de3c2a58226c499 Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Fri, 23 Mar 2018 17:21:05 +0100 Subject: [PATCH] TC_CSE_REG_RET_005 Updated for support of MN CSE testing Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- OneM2M_TestControl_IN_profile.ttcn | 2 +- OneM2M_TestControl_MN_profile.ttcn | 1 + OneM2M_Testcases_CSE_Release_1.ttcn | 33 +++++++++++++++++++---------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/OneM2M_TestControl_IN_profile.ttcn b/OneM2M_TestControl_IN_profile.ttcn index b092d21..6fd75e8 100644 --- a/OneM2M_TestControl_IN_profile.ttcn +++ b/OneM2M_TestControl_IN_profile.ttcn @@ -54,7 +54,7 @@ module OneM2M_TestControl_IN_profile { if(true) {execute (TC_CSE_REG_UPD_001());} if(true) {execute (TC_CSE_REG_DEL_001());} if(PICS_CB_CST) {execute (TC_CSE_REG_RET_002_CST());} - if(PICS_IN_CSE) {execute (TC_CSE_REG_RET_005());} + if(true) {execute (TC_CSE_REG_RET_005());} if(PICS_CB_NL) {execute (TC_CSE_REG_RET_002_NL());} //CE_REG_00002 diff --git a/OneM2M_TestControl_MN_profile.ttcn b/OneM2M_TestControl_MN_profile.ttcn index 2b69d05..43eb984 100644 --- a/OneM2M_TestControl_MN_profile.ttcn +++ b/OneM2M_TestControl_MN_profile.ttcn @@ -54,6 +54,7 @@ module OneM2M_TestControl_MN_profile { if(true) {execute (TC_CSE_REG_UPD_001());} if(true) {execute (TC_CSE_REG_DEL_001());} if(PICS_CB_CST) {execute (TC_CSE_REG_RET_002_CST());} + if(true) {execute (TC_CSE_REG_RET_005());} if(PICS_CB_NL) {execute (TC_CSE_REG_RET_002_NL());} //CE_REG_00002 diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index 6bd8a97..5fa26dd 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -2258,13 +2258,8 @@ module OneM2M_Testcases_CSE_Release_1 { // Local variables var MsgIn v_response; var integer v_aeIndex := -1; - var template PrimitiveContent v_contentResponse; - - // Test control - if(not(PICS_IN_CSE)) { - setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); - stop; - } + var template PrimitiveContent v_contentResponse_MN; + var template PrimitiveContent v_contentResponse_IN; // Test component configuration f_cf01Up(); @@ -2275,18 +2270,34 @@ module OneM2M_Testcases_CSE_Release_1 { v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); // Test Body - v_contentResponse.cSEBase := mw_contentCSEBase_rc1; - v_contentResponse.cSEBase.cseType := int1; + v_contentResponse_MN.cSEBase := mw_contentCSEBase_rc1; + v_contentResponse_IN.cSEBase := mw_contentCSEBase_rc1; + v_contentResponse_IN.cSEBase.cseType := int1; mcaPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID tc_ac.start; alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse), {"parentID"})) -> value v_response { + [PX_IN_CSE] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse_IN), {"parentID"})) -> value v_response { tc_ac.stop; setverdict(pass, __SCOPE__ & ": cseType attribute is set to 1 (IN_CSE)"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response { + [PX_MN_CSE] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse_MN), {"parentID"})) -> value v_response { + tc_ac.stop; + if(ispresent(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType)) { + if(v_response.primitive.responsePrimitive.primitiveContent.cSEBase.cseType == int2) { + setverdict(pass, __SCOPE__ & ": cseType attribute is set to 2 (MN_CSE)"); + } else { + setverdict(fail, __SCOPE__ & ": cseType attribute is set to other than 2 (MN_CSE)"); + } + } + + } + [PX_IN_CSE] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse_IN))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [PX_MN_CSE] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse_MN))) -> value v_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } -- GitLab