From 7dd410673a826bc17b203f8a928311289e66ee2e Mon Sep 17 00:00:00 2001 From: pkulkarni <pkulkarni75@gmail.com> Date: Mon, 2 Jul 2018 17:59:07 +0200 Subject: [PATCH] Removed the PCH combination for DMR/DEL/004. Moved the permutation function for CSE/PCH/005 to the permutationFunctions file. Signed-off-by: pkulkarni <pkulkarni75@gmail.com> --- OneM2M_PermutationFunctions.ttcn | 42 ++++++++++++++++++ OneM2M_Testcases_CSE_Release_2.ttcn | 67 +++++++---------------------- 2 files changed, 57 insertions(+), 52 deletions(-) diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 8b6bae1..346c2dc 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -8082,6 +8082,48 @@ module OneM2M_PermutationFunctions { }// end group Announcement + group PollingChannel { + + function f_CSE_PCH_005(inout integer p_aeIndex1, inout integer p_aeIndex2, RequestPrimitive p_requestprimitive) runs on AeSimu { + + //Local variables + var integer v_aeIndex1 := -1; + var integer v_aeIndex2 := -1; + var integer v_resourceIndex := -1; + var integer v_acpAuxIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);//c_CUDNDi) + + p_aeIndex1 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi); + + p_aeIndex2 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi); + + //v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); + mcaPort.send(m_request(p_requestprimitive)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Polling Resource type not created as originator has no privilege"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while creating polling resource type"); + } + } + } + } //end group PollingChannel + group Non_Blocking_Requests{ group Synchronous{ diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index 6288962..2ea56b8 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -4855,14 +4855,7 @@ module OneM2M_Testcases_CSE_Release_2 { v_ae1.start(f_CSE_DMR_DEL_004(int18, m_createScheduleBase, int23, m_createSubscriptionBase));//Schedule v_ae1.done; }; - - testcase TC_CSE_DMR_DEL_004_PCH() runs on Tester system CseSystem { - // Local variables - // don't exist pollingChannel's child resource - //v_ae1.start(f_CSE_DMR_DEL_004(int15, m_createPollingChannelBase, int23, m_createSubscriptionBase);//PollingChannel TODO ResourceType needed is PollingChannelURI -// v_ae1.done; - }; - + testcase TC_CSE_DMR_DEL_004_SUB() runs on Tester system CseSystem { // Local variables var AeSimu v_ae1 := AeSimu.create("AE1") alive; @@ -8738,6 +8731,10 @@ module OneM2M_Testcases_CSE_Release_2 { f_cf01Down(); } // end TC_CSE_PCH_002 + /** + * @desc Check that the IUT which hosts <pollingChannel> resource forwards the polling response message to the CSE when receiving a Notify request to the <pollingChannelURI> resource from the AE + * + */ testcase TC_CSE_PCH_003() runs on Tester system CseSystem { var AeSimu v_ae1 := AeSimu.create("AE1") alive; @@ -8810,6 +8807,10 @@ module OneM2M_Testcases_CSE_Release_2 { f_cf02Down(); } + /** + * @desc Check that the IUT which performs polling sends the Notify request to <pollingChannelURI> Hosting CSE after receiving response using polling channel + * + */ testcase TC_CSE_PCH_004() runs on Tester system CseSystem { var CseSimu v_cse1 := CseSimu.create("CSE1") alive; @@ -8851,12 +8852,12 @@ module OneM2M_Testcases_CSE_Release_2 { } //Trigger IUT for sending a polling request (req1) - v_utRequest2 := valueof(m_utRetrievePollingChannel(f_getLocalResourceAddress(v_localResourceIndex) & "\" & c_resourceShortNamePollingChannelUri)); + v_utRequest2 := valueof(m_utRetrievePollingChannel(f_getLocalResourceAddress(v_localResourceIndex) & "/" & c_resourceShortNamePollingChannelUri)); f_sendUtPrimitive(v_utRequest2,v_action2); tc_ac.start; alt { - [] mccPortIn.receive(mw_request(mw_retrieve(f_getResourceAddress(v_localResourceIndex) & "\" & c_resourceShortNamePollingChannelUri))) -> value v_request_req1 { + [] mccPortIn.receive(mw_request(mw_retrieve(f_getResourceAddress(v_localResourceIndex) & "/" & 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)); @@ -8895,6 +8896,10 @@ module OneM2M_Testcases_CSE_Release_2 { f_cf02DownCseSimuMaster(); } + /** + * @desc Check that the IUT rejects a <pollingChannel> OPERATION of the AE when AE-ID is not same as the AE-ID of the parent resource + * + */ group g_CSE_PCH_005 { testcase TC_CSE_PCH_005_CRE() runs on Tester system CseSystem { @@ -8973,48 +8978,6 @@ module OneM2M_Testcases_CSE_Release_2 { v_ae1.done; } - - function f_CSE_PCH_005(inout integer p_aeIndex1, inout integer p_aeIndex2, RequestPrimitive p_requestprimitive) runs on AeSimu { - - //Local variables - var integer v_aeIndex1 := -1; - var integer v_aeIndex2 := -1; - var integer v_resourceIndex := -1; - var integer v_acpAuxIndex := -1; - var RequestPrimitive v_request; - var MsgIn v_response; - var RequestPrimitive v_requestNotify; - - // Test control - - // Test component configuration - f_cf01Up(true); - - // Test adapter configuration - - // Preamble - v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);//c_CUDNDi) - - p_aeIndex1 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi); - - p_aeIndex2 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi); - - //v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); - mcaPort.send(m_request(p_requestprimitive)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) { - tc_ac.stop; - setverdict(pass, __SCOPE__&":INFO: Polling Resource type not created as originator has no privilege"); - } - [] tc_ac.timeout { - setverdict(inconc, __SCOPE__&":INFO: No answer while creating polling resource type"); - } - } - - - } - } //end group g_CSE_PCH_005 /** * @desc Check that the IUT sends the response with a status to the CSE1 when the request expires according to its Request Expiration Timestamp -- GitLab