Commit 33c0287b665347144e37028a69517fd6743434e7

Authored by Miguel Angel Reina Ortega
1 parent 9700ca42

Modifications on TC_CSE_PCH group

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -2155,8 +2155,7 @@ module OneM2M_Functions {
2155 2155 }
2156 2156  
2157 2157 [] tc_ac.timeout {
2158   - setverdict(inconc, __SCOPE__&":INFO: Container create request not received");
2159   - stop;
  2158 + setverdict(inconc, __SCOPE__&":INFO: Create request not received");
2160 2159 }
2161 2160 }
2162 2161  
... ...
... ... @@ -1491,9 +1491,9 @@ module OneM2M_Templates {
1491 1491 /**
1492 1492 * @desc Base NOTIFY request primitive
1493 1493 */
1494   - template RequestPrimitive m_notifyNotification(XSD.ID p_resourceAddress, template (value) Notification p_notification) modifies m_notify := {
  1494 + template RequestPrimitive m_notifyNotification(XSD.ID p_resourceAddress, template (value) Notification p_notification, template (omit) AbsRelTimestamp p_requestExpirationTimestamp := omit) modifies m_notify := {
1495 1495 primitiveContent := {notification := p_notification},
1496   - requestExpirationTimestamp := {alt_1 := 10000}//Needed for polling
  1496 + requestExpirationTimestamp := p_requestExpirationTimestamp//Needed for polling
1497 1497 };
1498 1498  
1499 1499 /**
... ...
... ... @@ -8984,6 +8984,10 @@ module OneM2M_PermutationFunctions {
8984 8984  
8985 8985 group PollingChannel {
8986 8986  
  8987 + /**
  8988 + * @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
  8989 + *
  8990 + */
8987 8991 function f_CSE_PCH_005(template RequestPrimitive p_requestPrimitive) runs on AeSimu {
8988 8992  
8989 8993 //Local variables
... ...
... ... @@ -3303,9 +3303,9 @@ module OneM2M_Testcases_CSE_Release_2 {
3303 3303 var integer v_aeIndex := -1;
3304 3304 var integer v_resourceIndex := -1;
3305 3305 var integer v_acpAuxIndex := -1;
3306   - var RequestPrimitive v_req1;
3307   - var MsgIn v_resp1;
3308   - var RequestPrimitive v_req2;
  3306 + var RequestPrimitive v_req1, v_req2, v_req3;
  3307 + var MsgIn v_resp1, v_resp3;
  3308 + var ResponsePrimitive v_resp2;
3309 3309  
3310 3310 // Test control
3311 3311  
... ... @@ -3357,10 +3357,41 @@ module OneM2M_Testcases_CSE_Release_2 {
3357 3357 }
3358 3358  
3359 3359 // Postamble
  3360 + f_checkAeSimuStatus();
  3361 +
  3362 + //Send response in any case
  3363 + v_resp2 := valueof(m_responseNotification(int2000, omit));
  3364 + v_resp2.requestIdentifier := v_resp1.primitive.responsePrimitive.primitiveContent.requestPrimitive.requestIdentifier;//requestIdentifier of req2
  3365 + v_req3 := valueof(m_notifyResponsePrimitive(f_getResourceAddress(v_resourceIndex) & "/" & c_resourceShortNamePollingChannelUri, v_resp2));
  3366 + v_req3.from_ := f_getOriginator(v_aeIndex);
  3367 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_req3)));
  3368 +
  3369 + tc_ac.start;
  3370 + alt {
  3371 + [] mcaPort.receive(mw_response(mw_responseNotify(int2000))) -> value v_resp3 {
  3372 + tc_ac.stop;
  3373 + setverdict(pass, __SCOPE__ & ": Response to req3 received");
  3374 + }
  3375 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  3376 + tc_ac.stop;
  3377 + setverdict(inconc, __SCOPE__&":INFO: Error while performing notification");
  3378 + }
  3379 + [] mcaPort.receive {
  3380 + tc_ac.stop;
  3381 + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
  3382 + }
  3383 + [] tc_ac.timeout {
  3384 + setverdict(inconc, __SCOPE__&":INFO: No answer while performing notification");
  3385 + }
  3386 + }
  3387 +
  3388 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
  3389 +
3360 3390 f_cse_postamble_deleteResources();
3361 3391  
3362 3392 // Tear down
3363   - f_cf01Down();
  3393 + f_cf02Down();
  3394 +
3364 3395 } // end TC_CSE_PCH_001
3365 3396  
3366 3397 /**
... ... @@ -3383,9 +3414,9 @@ module OneM2M_Testcases_CSE_Release_2 {
3383 3414 // Local variables
3384 3415 var integer v_aeIndex, v_acpAuxIndex := -1;
3385 3416 var integer v_resourceIndex := -1;
3386   - var RequestPrimitive v_request;
3387   - var MsgIn v_response;
3388   - var RequestPrimitive v_requestNotify;
  3417 + var RequestPrimitive v_req1, v_req2, v_req3;
  3418 + var MsgIn v_resp1, v_resp3;
  3419 + var ResponsePrimitive v_resp2;
3389 3420  
3390 3421 // Test control
3391 3422  
... ... @@ -3404,16 +3435,17 @@ module OneM2M_Testcases_CSE_Release_2 {
3404 3435  
3405 3436 v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex);
3406 3437  
3407   - v_requestNotify := valueof(m_notifyNotification(f_getResourceAddress(v_aeIndex), m_contentNotification_subscriptionVerification(PX_CSE1_ID)));
  3438 + v_req2 := valueof(m_notifyNotification(f_getResourceAddress(v_aeIndex), m_contentNotification_subscriptionVerification(PX_CSE1_ID)));
3408 3439  
3409   - vc_cse1.start(f_cse_notifyProcedure_notify(v_requestNotify));
  3440 + vc_cse1.start(f_cse_notifyProcedure_notify(v_req2));
  3441 + v_req2.from_ := PX_CSE1_ID;
3410 3442  
3411   - v_request := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
3412   - mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  3443 + v_req1 := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
  3444 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_req1)));
3413 3445  
3414 3446 tc_ac.start;
3415 3447 alt {
3416   - [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_requestNotify))) -> value v_response {
  3448 + [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_req2))) -> value v_resp1 {
3417 3449 tc_ac.stop;
3418 3450 setverdict(pass, __SCOPE__ & ": Polling response received");
3419 3451 }
... ... @@ -3435,6 +3467,35 @@ module OneM2M_Testcases_CSE_Release_2 {
3435 3467 }
3436 3468  
3437 3469 // Postamble
  3470 + f_checkAeSimuStatus();
  3471 +
  3472 + //Send response in any case
  3473 + v_resp2 := valueof(m_responseNotification(int2000, omit));
  3474 + v_resp2.requestIdentifier := v_resp1.primitive.responsePrimitive.primitiveContent.requestPrimitive.requestIdentifier;//requestIdentifier of req2
  3475 + v_req3 := valueof(m_notifyResponsePrimitive(f_getResourceAddress(v_resourceIndex) & "/" & c_resourceShortNamePollingChannelUri, v_resp2));
  3476 + v_req3.from_ := f_getOriginator(v_aeIndex);
  3477 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_req3)));
  3478 +
  3479 + tc_ac.start;
  3480 + alt {
  3481 + [] mcaPort.receive(mw_response(mw_responseNotify(int2000))) -> value v_resp3 {
  3482 + tc_ac.stop;
  3483 + setverdict(pass, __SCOPE__ & ": Response to req3 received");
  3484 + }
  3485 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  3486 + tc_ac.stop;
  3487 + setverdict(inconc, __SCOPE__&":INFO: Error while performing notification");
  3488 + }
  3489 + [] mcaPort.receive {
  3490 + tc_ac.stop;
  3491 + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
  3492 + }
  3493 + [] tc_ac.timeout {
  3494 + setverdict(inconc, __SCOPE__&":INFO: No answer while performing notification");
  3495 + }
  3496 + }
  3497 +
  3498 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
3438 3499 f_cse_postamble_deleteResources();
3439 3500  
3440 3501 // Tear down
... ... @@ -3442,7 +3503,7 @@ module OneM2M_Testcases_CSE_Release_2 {
3442 3503 } // end TC_CSE_PCH_002
3443 3504  
3444 3505 /**
3445   - * @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
  3506 + * @desc Check that the IUT performs both forwarding the response to the CSE and sending response to AE after receiving a Notify Request sent to the <pollingChannelURI> resource
3446 3507 *
3447 3508 */
3448 3509 testcase TC_CSE_PCH_003() runs on Tester system CseSystem {
... ... @@ -3487,11 +3548,10 @@ module OneM2M_Testcases_CSE_Release_2 {
3487 3548 v_req1 := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
3488 3549 mcaPort.send(f_getMsgOutPrimitive(m_request(v_req1)));
3489 3550  
3490   - //v_req2 := valueof(m_notifyNotification(f_getResourceAddress(v_aeIndex), m_contentNotification_subscriptionVerification));
3491   - v_req2 := valueof(m_notify(f_getResourceAddress(v_aeIndex)));
3492   - v_req2.requestExpirationTimestamp := {alt_1 := 15000};
  3551 + v_req2 := valueof(m_notifyNotification(f_getResourceAddress(v_aeIndex), m_contentNotification_subscriptionVerification(PX_CSE1_ID)));
3493 3552  
3494 3553 vc_cse1.start(f_cse_notifyProcedure_notify(v_req2));
  3554 + v_req2.from_ := PX_CSE1_ID;
3495 3555  
3496 3556 tc_ac.start;
3497 3557 alt {
... ... @@ -3552,7 +3612,11 @@ module OneM2M_Testcases_CSE_Release_2 {
3552 3612 // Tear down
3553 3613 f_cf02Down();
3554 3614 }
3555   -
  3615 +
  3616 + /**
  3617 + * @desc Check that the IUT which performs polling send the Notify request to <pollingChannelURI> Hosting CSE after receiving response using polling channel
  3618 + *
  3619 + */
3556 3620 testcase TC_CSE_PCH_004() runs on Tester system CseSystem {
3557 3621  
3558 3622 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
... ... @@ -3687,65 +3751,62 @@ module OneM2M_Testcases_CSE_Release_2 {
3687 3751 */
3688 3752 testcase TC_CSE_PCH_006() runs on Tester system CseSystem {
3689 3753  
3690   - var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
3691   - v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
3692   - v_cse1.done;
  3754 + var AeSimu v_ae1 := AeSimu.create("AE1") alive;
  3755 + v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
  3756 + v_ae1.done;
3693 3757  
3694   - v_cse1.start(f_CSE_PCH_006());
3695   - v_cse1.done;
  3758 + v_ae1.start(f_CSE_PCH_006());
  3759 + v_ae1.done;
3696 3760 }
3697 3761  
3698   - function f_CSE_PCH_006() runs on CseSimu {
  3762 + function f_CSE_PCH_006() runs on AeSimu {
3699 3763 // Local variables
3700   - var integer v_aeIndex, v_aeIndexForResourceAddress := -1;
  3764 + var integer v_aeIndex, v_acpAuxIndex := -1;
3701 3765 var integer v_resourceIndex := -1;
3702   - var MsgIn v_response;
3703   - var RequestPrimitive v_requestNotify;
  3766 + var RequestPrimitive v_req1;
3704 3767  
3705 3768 // Test control
3706 3769  
3707 3770 // Test component configuration
3708   - f_cf02UpCseSimuMaster();
  3771 + f_cf02Up();
3709 3772  
3710 3773 // Test adapter configuration
3711 3774  
3712   - // Preamble
3713   - vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
3714   -
3715   - vc_ae1.start(f_cse_preamble_registerAe());//AE1 is registred;
3716   - f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
3717   -
3718   - v_aeIndex := f_getLatestResourceIndex(vc_ae1);
3719   -
3720   - v_aeIndexForResourceAddress := f_getResourceFromAeSimu(vc_ae1);
3721   -
3722   - vc_ae1.start(f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex));//PollingChannel is created;
3723   - f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
3724   -
3725   - v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndexForResourceAddress)));
3726   - v_requestNotify.from_ := PX_CSE1_ID;
3727   -
3728   - mccPort.send(f_getMsgOutPrimitive(m_request(v_requestNotify)));
3729   - tc_ac.start;
3730   - alt {
3731   - [] mccPort.receive(mw_response(mw_responsePrimitive(int4108))) -> value vc_response {
3732   - tc_ac.stop;
3733   - setverdict(pass, __SCOPE__ & ":Response status code set to 4108 (REQUEST_TIMEOUT)");
3734   - }
3735   - [] mccPort.receive(mw_response()) {
3736   - tc_ac.stop;
3737   - setverdict(fail, __SCOPE__&":INFO: Unexpected message received");
3738   - }
3739   - [] tc_ac.timeout {
3740   - setverdict(fail, __SCOPE__&":INFO: No answer while performing notification");
3741   - }
3742   - }
3743   -
3744   - // Postamble
3745   - f_cse_postamble_deleteResourcesCSE();
  3775 + // Preamble
  3776 + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
  3777 + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
  3778 +
  3779 + v_acpAuxIndex := f_cse_preamble_createAcpAux();
  3780 +
  3781 + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//AE1 is registred;
  3782 +
  3783 + v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex);
  3784 +
  3785 + v_req1 := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
  3786 + v_req1.requestExpirationTimestamp := { alt_1 := 10000};
  3787 +
  3788 + mcaPort.send(f_getMsgOutPrimitive(m_request(v_req1)));
  3789 +
  3790 + tc_ac.start;
  3791 + alt {
  3792 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4008))) -> value vc_response {
  3793 + tc_ac.stop;
  3794 + setverdict(pass, __SCOPE__ & ":Response status code set to 4008 (REQUEST_TIMEOUT)");
  3795 + }
  3796 + [] mcaPort.receive(mw_response()) {
  3797 + tc_ac.stop;
  3798 + setverdict(fail, __SCOPE__&":INFO: Unexpected message received");
  3799 + }
  3800 + [] tc_ac.timeout {
  3801 + setverdict(fail, __SCOPE__&":INFO: No answer while performing notification");
  3802 + }
  3803 + }
  3804 +
  3805 + // Postamble
  3806 + f_cse_postamble_deleteResources();
3746 3807  
3747 3808 // Tear down
3748   - f_cf02DownCseSimuMaster();
  3809 + f_cf02Down();
3749 3810 } // end f_CSE_PCH_006
3750 3811  
3751 3812 }//end group PollingChannel
... ...