/** * Copyright Notification * No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC). * All rights reserved. * * @author ETSI * @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $ * $Id: OneM2M_Testcases.ttcn 347 2017-08-11 08:48:20Z reinaortega $ * @desc Module containing test cases for oneM2M * */ module OneM2M_Testcases_AE_Release_1 { import from OneM2M_TestSystem all; import from OneM2M_Templates all; import from OneM2M_Types all;//{type XSD.ID}; import from OneM2M_TypesAndValues all; import from OneM2M_Pixits all; import from LibCommon_Time all; import from OneM2M_Pics all; import from OneM2M_Functions all; import from OneM2M_PermutationFunctions all; import from XSD all; group AE { group General { group Create { group g_AE_GEN_CRE_001 { /** * @desc Check that the IUT sends the creation of a resource using unstructured resource identifier */ testcase TC_AE_GEN_CRE_001_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; // Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_CRE_001(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_CRE_001_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; // Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_CRE_001(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_CRE_001_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; // Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_CRE_001(e_absolute)); v_cse1.done; } }//end group g_AE_GEN_CRE_002 group g_AE_GEN_CRE_002 { /** * @desc Check that the IUT sends the creation of a resource using structured resource identifier */ testcase TC_AE_GEN_CRE_002_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_CRE_002(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_CRE_002_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_CRE_002(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_CRE_002_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Structured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_CRE_002(e_absolute)); v_cse1.done; } } //end group g_AE_GEN_CRE_002 } //end group Create group Update { group g_AE_GEN_UPD_001 { /** * @desc Check that the IUT sends the update of a resource using unstructured resource identifier */ testcase TC_AE_GEN_UPD_001_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; // Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_UPD_001(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_UPD_001_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_UPD_001(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_UPD_001_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_UPD_001(e_absolute)); v_cse1.done; } }//end group g_AE_GEN_UPD_001 group g_AE_GEN_UPD_002 { /** * @desc Check that the IUT sends the update of a resource using structured resource identifier */ testcase TC_AE_GEN_UPD_002_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_UPD_002(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_UPD_002_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_UPD_002(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_UPD_002_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Structured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_UPD_002(e_absolute)); v_cse1.done; } } //end group g_AE_GEN_UPD_002 } //end group Update group Retrieve { group g_AE_GEN_RET_001 { /** * @desc Check that the IUT sends the retrieval of a resource using unstructured resource identifier */ testcase TC_AE_GEN_RET_001_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; // Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_RET_001(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_RET_001_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_RET_001(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_RET_001_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_RET_001(e_absolute)); v_cse1.done; } }//end group g_AE_GEN_RET_001 group g_AE_GEN_RET_002 { /** * @desc Check that the IUT sends the retrieval of a resource using structured resource identifier */ testcase TC_AE_GEN_RET_002_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_RET_002(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_RET_002_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_RET_002(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_RET_002_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Structured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_RET_002(e_absolute)); v_cse1.done; } } //end group g_AE_GEN_RET_002 } //end group Retrieve group Delete { group g_AE_GEN_DEL_001 { /** * @desc Check that the IUT sends the deletion of a resource using unstructured resource identifier */ testcase TC_AE_GEN_DEL_001_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_DEL_001(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_DEL_001_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_DEL_001(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_DEL_001_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Unstructured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_DEL_001(e_absolute)); v_cse1.done; } }//end group g_AE_GEN_DEL_001 group g_AE_GEN_DEL_002 { /** * @desc Check that the IUT sends the deletion of a resource using structured resource identifier */ testcase TC_AE_GEN_DEL_002_CSR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_DEL_002(e_cseRelative)); v_cse1.done; } testcase TC_AE_GEN_DEL_002_SPR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) { setverdict(inconc, __SCOPE__ & ": Structured-SP-Relative-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_DEL_002(e_spRelative)); v_cse1.done; } testcase TC_AE_GEN_DEL_002_ABS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //Test control if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) { setverdict(inconc, __SCOPE__ & ": Structured-Absolute-Resource-ID format support is required to run this test case"); stop; } v_cse1.start(f_AE_GEN_DEL_002(e_absolute)); v_cse1.done; } } //end group g_AE_GEN_DEL_002 } //end group Delete }//end group General group Registration { group Create { /** * @desc Check that the IUT sends an AE initial registration request with no AE-ID-STEM provided when it is started */ testcase TC_AE_REG_CRE_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_REG_CRE_001()); v_cse1.done; } function f_AE_REG_CRE_001() runs on CseSimu { //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var integer v_parentIndex := -1; var integer v_resourceIndex := -1; var PrimitiveContent v_resource; //primitives for mcaPortIn var MsgIn v_request; var template RequestPrimitive v_requestPrimitive := mw_createAe; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request"; f_cf03Up(); //Send Trigger Message v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -); v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_; f_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(-, -, -)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : AE registration request is accepted!!"); v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_createAe())) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Unexpected AE registration request"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a registration CREATE Request with the value of the attribute ATTRIBUTE_NAME of the AE resource */ group g_AE_REG_CRE_002 { testcase TC_AE_REG_CRE_002_RN() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ResourceName"; v_utRequest.requestPrimitive.primitiveContent.aE.resourceName := "UNINITIALIZED"; v_createAe.primitiveContent.aE.resourceName := complement("UNINITIALIZED"); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_ET() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ExpirationTime"; v_utRequest.requestPrimitive.primitiveContent.aE.expirationTime := "20301231T012345"; v_utRequest.forcedFields := {{name := "expirationTime", value_ := "UNINITIALIZED"}}; v_createAe.primitiveContent.aE.expirationTime := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_LBL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute Labels"; v_utRequest.requestPrimitive.primitiveContent.aE.labels := {"UNINITIALIZED"}; v_createAe.primitiveContent.aE.labels := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_APN() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute AppName"; v_utRequest.requestPrimitive.primitiveContent.aE.appName := "UNINITIALIZED"; v_createAe.primitiveContent.aE.appName := complement("UNINITIALIZED"); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_API() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute AppID"; v_utRequest.requestPrimitive.primitiveContent.aE.app_ID := "UNINITIALIZED"; v_createAe.primitiveContent.aE.app_ID := complement("UNINITIALIZED"); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_POA() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute PointOfAccess"; v_utRequest.requestPrimitive.primitiveContent.aE.pointOfAccess := {"UNINITIALIZED"}; v_createAe.primitiveContent.aE.pointOfAccess := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_OR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute OntologyRef"; v_utRequest.requestPrimitive.primitiveContent.aE.ontologyRef := "UNINITIALIZED"; v_createAe.primitiveContent.aE.ontologyRef := complement("UNINITIALIZED"); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_NL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute NodeLink"; v_utRequest.requestPrimitive.primitiveContent.aE.nodeLink := "UNINITIALIZED"; v_createAe.primitiveContent.aE.nodeLink := complement("UNINITIALIZED"); v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_RR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute RequestReachability"; v_utRequest.requestPrimitive.primitiveContent.aE.requestReachability := true; v_utRequest.forcedFields := {{name := "requestReachability", value_ := "UNINITIALIZED"}}; v_createAe.primitiveContent.aE.requestReachability := ?;//Check value other than UNINITIALIZED, done by typing v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } testcase TC_AE_REG_CRE_002_CSZ() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var template RequestPrimitive v_createAe := mw_createAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ContentSerialization"; v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {applicationxml}; v_utRequest.forcedFields := {{name := "contentSerialization", value_ := "UNINITIALIZED"}}; v_createAe.primitiveContent.aE.contentSerialization := ?;//Check value other than UNINITIALIZED, done by typing v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action)); v_cse1.done; } }//End of subgroup AE_REG_CRE_002 } // End of subgroup Create group Delete { /** * @desc Check that the IUT sends AE deregistration request to CSE */ testcase TC_AE_REG_DEL_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_REG_DEL_001()); v_cse1.done; } function f_AE_REG_DEL_001() runs on CseSimu { //variables var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_localResource; var integer v_auxInteger := -1; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE DELETE Registration Request"; //primitives for utPort var template UtTriggerPrimitive v_utRequest := m_utDelete; f_cf03Up(); v_localResource := f_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, -, -, omit))), vc_cSEBaseIndex, int2); v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, -, -); f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_auxInteger, -, -)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : AE deregistration request is accepted!"); v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive (mw_request(mw_delete(?))) { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Unexpected DELETE request"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } }// End Delete subgroup }//end Registration subgroup group Data_Management_and_Repository { group Create { /** * @desc Check that the IUT sends a Container creation request when it is triggered */ testcase TC_AE_DMR_CRE_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_CRE_001()); v_cse1.done; } function f_AE_DMR_CRE_001() runs on CseSimu { //variables var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var MsgIn v_request; var integer v_resourceIndex := -1; var template RequestPrimitive v_requestPrimitive := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container to "; f_cf03Up(); //send triggering primitive to SUT v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -); v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_; f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(-, -, -)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Container creation request is accepted!"); v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)))); } [] mcaPortIn.receive(mw_request(mw_create)) -> value v_request{ tc_ac.stop; setverdict(fail, __SCOPE__ & " : Unexpected CREATE request "); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a ContentInstance creation request when it is triggered */ testcase TC_AE_DMR_CRE_002() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_CRE_002()); v_cse1.done; } function f_AE_DMR_CRE_002() runs on CseSimu { var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var MsgIn v_request; var integer v_resourceIndex := -1; var PrimitiveContent v_localResource; var integer v_containerIndex := -1; var template RequestPrimitive v_requestPrimitive := mw_createContentInstance; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -); v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_; f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_containerIndex, -, -)); //Test behavior tc_ac.start; alt{ //receive MsgIn requestPrimitive [] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : ContentInstance creation request is accepted!!"); v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)))); } [] mcaPortIn.receive(mw_request(mw_create)) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Unexpected CREATE request "); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a ContentInstance creation request with optional attribute ATTRIBUTE_NAME */ group g_AE_DMR_CRE_003 { testcase TC_AE_DMR_CRE_003_CNF() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ContentInfo to "; v_utRequest.requestPrimitive.primitiveContent.contentInstance.contentInfo := "UNINITIALIZED"; v_request.primitiveContent.contentInstance.contentInfo := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_003_RN() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ResourceName to "; v_utRequest.requestPrimitive.primitiveContent.contentInstance.resourceName := "UNINITIALIZED"; v_request.primitiveContent.contentInstance.resourceName := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_003_ET() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ExpirationTime to"; v_utRequest.requestPrimitive.primitiveContent.contentInstance.expirationTime := "20301231T012345"; v_utRequest.forcedFields := {{name := "expirationTime", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.contentInstance.expirationTime := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_003_LBL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute Labels to "; v_utRequest.requestPrimitive.primitiveContent.contentInstance.labels := {"UNINITIALIZED"}; v_request.primitiveContent.contentInstance.labels := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_003_CR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance; var template RequestPrimitive v_request := mw_createContentInstance; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute Creator to "; v_utRequest.requestPrimitive.primitiveContent.contentInstance.creator := "UNINITIALIZED"; v_request.primitiveContent.contentInstance.creator := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action)); v_cse1.done; } }//End of subgroup AE_DMR_CRE_003 /** * @desc Check that the IUT sends a Container creation request with optional attribute ATTRIBUTE_NAME when it is triggered */ group g_AE_DMR_CRE_004 { testcase TC_AE_DMR_CRE_004_ACPI() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute AccessControlPolicyIDs to"; v_utRequest.requestPrimitive.primitiveContent.container.accessControlPolicyIDs := {"UNINITIALIZED"}; v_request.primitiveContent.container.accessControlPolicyIDs := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_MNI() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxNrOfInstances to "; v_utRequest.requestPrimitive.primitiveContent.container.maxNrOfInstances := 1; v_utRequest.forcedFields := {{name := "maxNrOfInstances", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.maxNrOfInstances := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_MBS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxByteSize to "; v_utRequest.requestPrimitive.primitiveContent.container.maxByteSize := 1; v_utRequest.forcedFields := {{name := "maxByteSize", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.maxByteSize := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_MIA() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxInstanceAge to "; v_utRequest.requestPrimitive.primitiveContent.container.maxInstanceAge := 1; v_utRequest.forcedFields := {{name := "maxInstanceAge", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.maxInstanceAge := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_OR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute OntologyRef to "; v_utRequest.requestPrimitive.primitiveContent.container.ontologyRef := "UNINITIALIZED"; v_request.primitiveContent.container.ontologyRef := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_RN() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute ResourceName to "; v_utRequest.requestPrimitive.primitiveContent.container.resourceName := "UNINITIALIZED"; v_request.primitiveContent.container.resourceName := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_ET() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute ExpirationTime to "; v_utRequest.requestPrimitive.primitiveContent.container.expirationTime := "20301231T012345"; v_utRequest.forcedFields := {{name := "expirationTime", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.expirationTime := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_LBL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute Labels to "; v_utRequest.requestPrimitive.primitiveContent.container.labels := {"UNINITIALIZED"}; v_request.primitiveContent.container.labels := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_CRE_004_CR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; var template RequestPrimitive v_request := mw_createContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute Creator to "; v_utRequest.requestPrimitive.primitiveContent.container.creator := "UNINITIALIZED"; v_request.primitiveContent.container.creator := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action)); v_cse1.done; } }//End of subgroup AE_DMR_CRE_004 }//End of subgroup Create group Update { group g_AE_DMR_UPD_001 { /** * @desc Check that the IUT sends an UPDATE Request with the value of the attribute ATTRIBUTE_NAME of the AE resource */ testcase TC_AE_DMR_UPD_001_ET() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var universal charstring v_action := "Please, send a valid UPDATE Request for AE updating attribute expirationTime to "; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; v_utRequest.requestPrimitive.primitiveContent.aE.expirationTime := "20301231T012345"; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.expirationTime := ?; v_cse1.start(f_AE_DMR_UPD_001(v_utRequest, v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_LBL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := "Please, send a valid UPDATE Request for AE updating attribute labels to "; v_utRequest.requestPrimitive.primitiveContent.aE.labels := {"UNINITIALIZED"}; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.labels := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_APN() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute appName to "; v_utRequest.requestPrimitive.primitiveContent.aE.appName := "UNINITIALIZED"; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.appName := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_POA() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute pointOfAccess to "; v_utRequest.requestPrimitive.primitiveContent.aE.pointOfAccess := {"UNINITIALIZED"}; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.pointOfAccess := complement({*,"UNINITIALIZED", *}); v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_OR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute ontologyRef to "; v_utRequest.requestPrimitive.primitiveContent.aE.ontologyRef := "UNINITIALIZED"; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.ontologyRef := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_NL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute nodeLink to "; v_utRequest.requestPrimitive.primitiveContent.aE.nodeLink := "UNINITIALIZED"; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.nodeLink := complement("UNINITIALIZED"); v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_RR() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute requestReachability to "; v_utRequest.requestPrimitive.primitiveContent.aE.requestReachability := true; v_utRequest.forcedFields := {{name := "requestReachability", value_ := "UNINITIALIZED"}}; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.requestReachability := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } testcase TC_AE_DMR_UPD_001_CSZ() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_expectedUpdateRequestAe; var template UtTriggerPrimitive v_utRequest := m_utUpdateAe; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute contentSerialization to "; v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {applicationxml}; v_utRequest.forcedFields := {{name := "contentSerialization", value_ := "UNINITIALIZED"}}; v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentAeUpdateRequest; v_expectedUpdateRequestAe.primitiveContent.aE.contentSerialization := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_UPD_001(v_utRequest,v_action, v_expectedUpdateRequestAe)); v_cse1.done; } }//End of subgroup AE_DMR_UPD_001 group g_AE_DMR_UPD_002 { /** * @desc Check that the IUT sends an UPDATE Request with the value of the attribute ATTRIBUTE_NAME of the resource */ testcase TC_AE_DMR_UPD_002_ET() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute expirationTime to "; v_utRequest.requestPrimitive.primitiveContent.container.expirationTime := "20301231T012345"; v_request.primitiveContent.container.expirationTime := ?; v_cse1.start(f_AE_DMR_UPD_002(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_UPD_002_LBL() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute labels to "; v_utRequest.requestPrimitive.primitiveContent.container.labels := {"UNINITIALIZED"}; v_request.primitiveContent.container.labels := complement({*,"UNINITIALIZED",*}); v_cse1.start(f_AE_DMR_UPD_002(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_UPD_002_MNI() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute maxNrOfInstances to "; v_utRequest.requestPrimitive.primitiveContent.container.maxNrOfInstances := 1; v_utRequest.forcedFields := {{name := "maxNrOfInstances", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.maxNrOfInstances := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_UPD_002(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_UPD_002_MBS() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute maxByteSize to "; v_utRequest.requestPrimitive.primitiveContent.container.maxByteSize := 1; v_utRequest.forcedFields := {{name := "maxByteSize", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.maxByteSize := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_UPD_002(v_utRequest,v_request,v_action)); v_cse1.done; } testcase TC_AE_DMR_UPD_002_MIA() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template RequestPrimitive v_request := mw_updateContainer; var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for Container updating attribute maxInstanceAge to "; v_utRequest.requestPrimitive.primitiveContent.container.maxInstanceAge := 1; v_utRequest.forcedFields := {{name := "maxInstanceAge", value_ := "UNINITIALIZED"}}; v_request.primitiveContent.container.maxInstanceAge := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_DMR_UPD_002(v_utRequest,v_request,v_action)); v_cse1.done; } }//End of subgroup AE_DMR_UPD_002 }//End of subgroup Update group Retrieve { group g_AE_DMR_RET_001{ /** * @desc Check that the IUT sends a RETRIEVE Request on the TARGET_RESOURCE_ADDRESS to CSE */ 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 to "; v_cse1.start(f_AE_DMR_RET_001(int5, m_primitiveContentCSEBase(m_contentCreateCSEBase),v_action)); v_cse1.done; } 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 to "; v_cse1.start(f_AE_DMR_RET_001(int2, m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit)),v_action)); v_cse1.done; } 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 to "; v_cse1.start(f_AE_DMR_RET_001(int3, m_primitiveContentContainer(m_contentCreateContainer()),v_action)); v_cse1.done; } }//End of TC_AE_DMR_RET_001 /** * @desc Check that the IUT sends a RETRIEVE Request of oldest virtual resource. */ testcase TC_AE_DMR_RET_002() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_RET_002()); v_cse1.done; } function f_AE_DMR_RET_002() runs on CseSimu { var integer v_resourceIndex, v_containerResourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieve("NotInitialized"); var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'oldest' child resource of Container at "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_containerResourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4); v_resourceIndex := f_setLocalResource(v_localResource, int4, v_containerResourceIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerResourceIndex) & "/" & c_resourceShortNameOldest; f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_containerResourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_ ))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : retrieve attribute oldest request is accepted!"); v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a RETRIEVE Request of latest virtual resource. */ testcase TC_AE_DMR_RET_003() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_RET_003()); v_cse1.done; } function f_AE_DMR_RET_003() runs on CseSimu { var integer v_resourceIndex, v_containerResourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieve("NotInitialized"); var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the 'latest' attribute from Container at "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_containerResourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4); v_resourceIndex := f_setLocalResource(v_localResource, int4, v_containerResourceIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerResourceIndex) & "/" & c_resourceShortNameLatest; f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_containerResourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : retrieve attribute latest request is accepted!!"); v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a resource RETRIEVE Request to CSE */ testcase TC_AE_DMR_RET_004() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_RET_004()); v_cse1.done; } function f_AE_DMR_RET_004() runs on CseSimu { var integer v_resourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieve("NotInitialized"); var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the Container to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : retrieve resource type request is accepted!!"); v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a resource RETRIEVE Request to CSE */ testcase TC_AE_DMR_RET_005 () runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_RET_005()); v_cse1.done; } function f_AE_DMR_RET_005() runs on CseSimu { var integer v_resourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utRetrieve("NotInitialized"); var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for retrieving the contentInstance to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), v_resourceIndex, int4); v_resourceIndex := f_setLocalResource(v_localResource, int4, v_resourceIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : retrieve resource type request is accepted!!"); v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Retrieve Request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } }//End of subgroup Retrieve group Delete { /** * @desc Check that the IUT sends a DELETE Request of oldest virtual resource. */ testcase TC_AE_DMR_DEL_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_DEL_001()); v_cse1.done; } function f_AE_DMR_DEL_001() runs on CseSimu { var integer v_resourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utDelete; var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'oldest' resource from container to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameOldest; f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Delete oldest ContentInstance resource is accepted"); //set responseStatusCode back to SUT v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); tc_ac.stop; } [] mcaPortIn.receive (mw_request(mw_delete(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Delete request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a DELETE Request of latest virtual resource. */ testcase TC_AE_DMR_DEL_002() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_DEL_002()); v_cse1.done; } function f_AE_DMR_DEL_002() runs on CseSimu { var integer v_resourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utDelete; var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'latest' resource from container to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameLatest; f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : delete attribute latest resource ContentInstance is accepted"); //set responseStatusCode back to SUT v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); tc_ac.stop; } [] mcaPortIn.receive (mw_request(mw_delete(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Delete request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a resource DELETE request to CSE */ testcase TC_AE_DMR_DEL_003() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_DEL_003()); v_cse1.done; } function f_AE_DMR_DEL_003() runs on CseSimu { var integer v_resourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utDelete; var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the container resource to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : delete resource type request is accepted!!"); //set responseStatusCode back to SUT v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); tc_ac.stop; } [] mcaPortIn.receive (mw_request(mw_delete(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Delete request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a resource DELETE Request to CSE */ testcase TC_AE_DMR_DEL_004 () runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_DMR_DEL_004()); v_cse1.done; } function f_AE_DMR_DEL_004() runs on CseSimu { var integer v_resourceIndex, v_containerResourceIndex := -1; var PrimitiveContent v_localResource; //variables var template UtTriggerPrimitive v_utRequest := m_utDelete; var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the contentInstance resource to "; //Test component configuration f_cf03Up(); //send triggering primitive to SUT v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); v_containerResourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), v_containerResourceIndex, int4); v_resourceIndex := f_setLocalResource(v_localResource, int4, v_containerResourceIndex); v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex)); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_ ))) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : delete resource type request is accepted!!"); //set responseStatusCode back to SUT v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); tc_ac.stop; } [] mcaPortIn.receive (mw_request(mw_delete(?))) -> value v_request { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Delete request for unexpected target"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } } }//end DMR subgroup group Subscription_and_Notification { group Create { /** * @desc Check that the IUT sends a subscription creation request */ testcase TC_AE_SUB_CRE_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_SUB_CRE_001()); v_cse1.done; } function f_AE_SUB_CRE_001() runs on CseSimu { //variables var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var MsgIn v_request; var integer v_parentIndex := -1; var integer v_resourceIndex := -1; var PrimitiveContent v_resource; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request"; f_cf03Up(); //send triggering primitive to SUT v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(); f_sendUtPrimitive(v_utRequest,v_action); //Test behavior tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Subscription creation request is accepted!"); v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Subscription creation request is rejected due to not including mandatory attributes!!"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } group g_AE_SUB_CRE_002 { /** * @desc Check that the IUT sends a subscription creation request with optional attribute ATTRIBUTE_NAME when it is triggered */ testcase TC_AE_SUB_CRE_002_ACPI() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute accessControlPolicyIDs"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.accessControlPolicyIDs := {"UNINITIALIZED"}; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.accessControlPolicyIDs := ?; v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } testcase TC_AE_SUB_CRE_002_ENC() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute createdBefore"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria(); v_utRequest.requestPrimitive.primitiveContent.subscription.eventNotificationCriteria.createdBefore := "20301231T012345"; v_utRequest.forcedFields := {{name := "createdBefore", value_ := "UNINITIALIZED"}}; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.eventNotificationCriteria.createdBefore := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } testcase TC_AE_SUB_CRE_002_EXC() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute expirationCounter"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.expirationCounter := 1; v_utRequest.forcedFields := {{name := "expirationCounter", value_ := "UNINITIALIZED"}}; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.expirationCounter := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } testcase TC_AE_SUB_CRE_002_NFU() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute notificationForwardingURI"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationForwardingURI := "UNINITIALIZED"; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.notificationForwardingURI := complement("UNINITIALIZED"); v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } testcase TC_AE_SUB_CRE_002_NCT() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute notificationContentType"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationContentType := int1; v_utRequest.forcedFields := {{name := "notificationContentType", value_ := "UNINITIALIZED"}}; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.notificationContentType := ?;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } testcase TC_AE_SUB_CRE_002_NEC() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute notificationEventCat"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationEventCat.alt_1 := 100; v_utRequest.forcedFields := {{name := "alt_1", value_ := "UNINITIALIZED"}}; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.notificationEventCat.alt_1 := 100;//Check value other than "UNINITIALIZED", done by typing v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } testcase TC_AE_SUB_CRE_002_SU() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; var template UtTriggerPrimitive v_utRequest := m_utCreateSubscription; var template RequestPrimitive v_requestT := mw_createSubscription; var universal charstring v_action := __SCOPE__ & ": Please, send a valid subscription creation request with optional attribute subscriberURI"; v_utRequest.requestPrimitive.primitiveContent.subscription.notificationURI := {"UNINITIALIZED"}; v_utRequest.requestPrimitive.primitiveContent.subscription.subscriberURI := "UNINITIALIZED"; v_requestT.primitiveContent.subscription.notificationURI := complement({*,"UNINITIALIZED",*}); v_requestT.primitiveContent.subscription.subscriberURI := complement("UNINITIALIZED"); v_cse1.start(f_AE_SUB_CRE_002(v_utRequest, v_requestT, v_action)); v_cse1.done; } }//End AE_SUB_CRE_002 }//End Create Group group Notify { /** * @desc Check that the IUT sends a Notify Response to the hosting CSE when receiving a Notify request containing a single notification */ testcase TC_AE_SUB_NTF_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_SUB_NTF_001()); v_cse1.done; } function f_AE_SUB_NTF_001() runs on CseSimu { //variables var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var MsgIn v_request; var integer v_parentIndex := -1; var integer v_resourceIndex := -1; var PrimitiveContent v_resource; var ResponsePrimitive v_responsePrimitive; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request"; f_cf03Up(); //create Ae v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(); f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : AE registration request is accepted!!"); v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { tc_ac.stop; setverdict(inconc, __SCOPE__ & " : AE registration request is rejected due to not including mandatory attributes!!"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(inconc, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } f_checkCseSimuStatus(); //create Subscription v_utRequest := m_utCreateSubscription; v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); v_action := "Please, send a valid CREATE request for Subscription"; f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Subscription creation request is accepted!"); v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive { tc_ac.stop; setverdict(inconc, __SCOPE__ & " : Subscription creation request is rejected due to not including mandatory attributes!!"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(inconc, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } f_checkCseSimuStatus(); //Test behavior f_send(e_mca_in_port, f_getMsgOutPrimitive(m_request(m_notify(f_getLocalResourceAddress(v_resourceIndex))))); tc_ac.start; alt{ [] mcaPortIn.receive(mw_response(mw_responsePrimitiveOK)) { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Notification response is accepted!"); } [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Notification response is rejected due to not including mandatory attributes!"); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } /** * @desc Check that the IUT sends a Notify Response to the hosting CSE when receiving a Notify request containing aggregated notifications */ testcase TC_AE_SUB_NTF_002() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_SUB_NTF_002()); v_cse1.done; } function f_AE_SUB_NTF_002() runs on CseSimu { //variables var template UtTriggerPrimitive v_utRequest := m_utCreateAe; var MsgIn v_request; var ResponsePrimitive v_responsePrimitive; var PrimitiveContent v_localResource; var integer v_parentIndex := -1; var integer v_resourceIndex := -1; var PrimitiveContent v_resource; var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE Registration CREATE Request"; f_cf03Up(); //create Ae v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(); f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_createAe)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : AE registration request is accepted!!"); v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request { tc_ac.stop; setverdict(inconc, __SCOPE__ & " : AE registration request is rejected due to not including mandatory attributes!!"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(inconc, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } f_checkCseSimuStatus(); //create Subscription v_utRequest := m_utCreateSubscription; v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); v_action := "Please, send a valid CREATE request for Subscription"; f_sendUtPrimitive(v_utRequest,v_action); tc_ac.start; alt{ [] mcaPortIn.receive(mw_request(mw_createSubscription)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Subscription creation request is accepted!"); v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); //send back responsePrimitive f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(v_responsePrimitive))); } [] mcaPortIn.receive { tc_ac.stop; setverdict(inconc, __SCOPE__ & " : Subscription creation request is rejected due to not including mandatory attributes!!"); f_send(e_mca_in_port, f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))))); } [] tc_ac.timeout{ setverdict(inconc, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } f_checkCseSimuStatus(); //Test behavior f_send(e_mca_in_port, f_getMsgOutPrimitive(m_request(m_notifyAggregatedNotification))); tc_ac.start; alt{ [] mcaPortIn.receive(mw_response(mw_responsePrimitiveOK)) { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Notification response is accepted!"); } [] mcaPortIn.receive { tc_ac.stop; setverdict(fail, __SCOPE__ & " : Notification response is rejected due to not including mandatory attributes!"); } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } } // Postamble f_cf03Down(); } }//End of Notify group }//end SUB subgroup group Polling { /** * @desc Check that the IUT which performs polling sends the Notify request to Hosting CSE after receiving response using polling channel */ testcase TC_AE_PCH_001() runs on Tester system AeSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_cse1.start(f_AE_PCH_001()); v_cse1.done; } function f_AE_PCH_001() runs on CseSimu { //Local variables var integer v_pollingChannelIndex := -1; var integer v_aeIndex := -1; var MsgIn v_request_req1, v_request_req3; var RequestPrimitive v_request_req2; var ResponsePrimitive v_response_rsp1; var template UtTriggerPrimitive v_utRequest1 := m_utCreateAe; var template UtTriggerPrimitive v_utRequest2 := m_utCreatePollingChannel; var template UtTriggerPrimitive v_utRequest3; var charstring v_action3 := "Please, send a Polling request (Retrieve PollingChannelURI request)"; var RequestPrimitive v_requestNotify; //Test control // Test component configuration f_cf03Up(); // Test adapter configuration // Preamble v_aeIndex := f_ae_preamble_registerAe(v_utRequest1); f_checkCseSimuStatus(); //Create a function to receive the Create PollingChannel and to send the response v_pollingChannelIndex := f_ae_createPollingChannel(v_utRequest2); f_checkCseSimuStatus(); //Trigger IUT for sending a polling request (req1) v_utRequest3 := valueof(m_utRetrievePollingChannelUri(f_getLocalResourceAddress(v_pollingChannelIndex) & "/" & c_resourceShortNamePollingChannelUri)); f_sendUtPrimitive(v_utRequest3,v_action3); tc_ac.start; alt { [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_pollingChannelIndex) & "/" & c_resourceShortNamePollingChannelUri))) -> value v_request_req1 { tc_ac.stop; setverdict(pass, __SCOPE__&":INFO: Polling request received successfuly"); v_response_rsp1 := valueof(m_responsePrimitive(int2000,v_request_req1.primitive.requestPrimitive.requestIdentifier)); v_response_rsp1.from_ := PX_CSE1_ID; v_response_rsp1.to_ := v_request_req1.primitive.requestPrimitive.from_; //Put in the primitiveContent a Notify request (req2) (simulated) from another node CSE v_request_req2 := valueof(m_notify(f_getLocalResourceAddress(v_pollingChannelIndex))); v_response_rsp1.primitiveContent := { requestPrimitive := v_request_req2 }; mcaPortIn.send(m_response(v_response_rsp1)); } [] tc_ac.timeout { setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type Polling Channel"); } } f_checkCseSimuStatus(); tc_ac.start; alt { [] mcaPortIn.receive(mw_request(mw_notifyResponsePrimitive(?))) -> value v_request_req3 { tc_ac.stop; //Check that primitiveContent carries the response to req2 (resp2) if(v_request_req3.primitive.requestPrimitive.primitiveContent.responsePrimitive.requestIdentifier == v_request_req2.requestIdentifier) { setverdict(pass, __SCOPE__ & ": NOTIFY request received carrying response (rsp2) to the Notify request (req2)"); } else { setverdict(fail, __SCOPE__ & ": NOTIFY request received not carryng the expected response (rsp2) to the Notify request (req2)"); } } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No message while expecting NOTIFY request"); } } //Postamble f_cse_postamble_deleteResourcesCSE(); // Tear down f_cf03Down(); } } //end group Polling }//end group AE }