Commit 0d491b08 authored by bergengruen's avatar bergengruen
Browse files

draft for test SS_0001 added

parent aaa5abf2
Loading
Loading
Loading
Loading
+129 −148
Original line number Diff line number Diff line
@@ -927,6 +927,75 @@ group checksTC_IMS_REG_0007 {
	    }
} // group


group checksTC_IMS_SS_0001 {	    
	    /**
		 * @desc Starts monitor component behavior 
		 * @param p_monitorCompRef Reference to monitor component
		 */
	    function f_mtc_check_TP_IMS_5310_01_gm(
	    	ImsInterfaceMonitor p_monitorCompRef
	    ) runs on ImsTestCoordinator {
		   	    		
           p_monitorCompRef.start(
            f_imsIot_receive(
                {mw_SipRequest(mw_INVITE_Request_Base)},
                {},
                "TP_IMS_5310_01",
                "INVITE request",
                0,
                false
            )
           );
           p_monitorCompRef.done;
	    }
	    
	    /**
		 * @desc Starts monitor component behavior
		 * @param p_monitorCompRef Reference to monitor component
		 */
	    function f_mtc_check_TP_IMS_5310_01_mw(
	    	ImsInterfaceMonitor p_monitorCompRef
	    ) runs on ImsTestCoordinator  {
           p_monitorCompRef.start(
            f_imsIot_receive(
                {mw_SipRequest(mdw_TP_IMS_5310_01_mw)},
                {},
                "TP_IMS_5310_01",
                "INVITE request",
                0,
                false
            )
           );
           p_monitorCompRef.done;
	    }
	    /**
		 * @desc Starts monitor component behavior
		 * @param p_monitorCompRef Reference to monitor component
		 */
	    function f_mtc_check_TP_IMS_5310_01_as(
	    	ImsInterfaceMonitor p_monitorCompRef
	    ) runs on ImsTestCoordinator  {
           p_monitorCompRef.start(
            f_imsIot_receive(
                {mw_SipRequest(mdw_TP_IMS_5310_01_as)},
                {},
                "TP_IMS_5310_01",
                "INVITE request",
                0,
                false
            )
           );
           p_monitorCompRef.done;
	    }





} // group


group checksTC_IMS_SS_0007 {	    
	    /**
		 * @desc Starts monitor component behavior 
@@ -999,154 +1068,66 @@ group checksTC_IMS_SS_0007 {
		   }
	    }

//	    /**
//		 * @desc Starts monitor component behavior for TP_IMS_5011_02
//		 * @param p_monitorCompRef Reference to monitor component
//		 */
//	    function f_mtc_check_TP_IMS_5011_02_mw(
//	    	ImsInterfaceMonitor p_monitorCompRef
//	    ) runs on ImsTestCoordinator return Request{
//		   var charstring v_EUT_A_Addr := f_GetEUTAddress(PX_EUT_A);    		
//		   var SipMessage v_sip;
//           p_monitorCompRef.start(
//            f_imsIot_receive(
//                {mw_SipRequest(mdw_TP_IMS_5011_02_mw(v_EUT_A_Addr))},
//                {mw_SipRequest(mw_REGISTER_Request_Base)},
//                "TP_IMS_5011_02",
//                "REGISTER request",
//                0,
//                true
//            )
//           );
//           p_monitorCompRef.done;
//
//           f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
//           return v_sip.request;
//	    }
//
//	    /**
//		 * @desc Starts monitor component behavior for TP_IMS_5092_01
//		 * @param p_monitorCompRef Reference to monitor component
//		 */
//	    function f_mtc_check_TP_IMS_5092_01_mw(
//	    	ImsInterfaceMonitor p_monitorCompRef
//	    ) runs on ImsTestCoordinator return Response {
//	       var template SipUrl v_eutBUri := mw_SipUrl_Host(f_GetEUTAddress(PX_EUT_B)); 
//		   var SipMessage v_sip;
//          p_monitorCompRef.start(
//            f_imsIot_receive(
//                {mw_SipResponse(mdw_TP_IMS_5092_01_mw(v_eutBUri))},
//                {mw_SipResponse (mw_200OK_Base)},
//                "TP_IMS_5092_01",
//                "200OK",
//                0,
//                true
//            )
//           );
//           p_monitorCompRef.done;
//
//           f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
//           return v_sip.response;
//	    }
//
//
//	    /**
//		 * @desc Starts monitor component behavior for TP_IMS_5089_01
//		 * @param p_monitorCompRef Reference to monitor component
//		 */
//	    function f_mtc_check_TP_IMS_5089_01_mw(
//	    	ImsInterfaceMonitor p_monitorCompRef
//	    ) runs on ImsTestCoordinator return Response {
//		  var SipMessage v_sip;
//          p_monitorCompRef.start(
//            f_imsIot_receive(
//                {mw_SipResponse(mdw_TP_IMS_5089_01_mw)},
//                {mw_SipResponse (mw_401Unauthorized_Base)},
//                "TP_IMS_5089_01",
//                "401 Unauthorized",
//                0,
//                true
//            )
//           );
//           p_monitorCompRef.done;
//           p_monitorCompRef.done;
//           f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
//           return v_sip.response;
//	    }
//
//
//	    /**
//		 * @desc Starts monitor component behavior for TP_IMS_5011_02
//		 * @param p_monitorCompRef Reference to monitor component
//		 */
//	    function f_mtc_check_TP_IMS_5044_01_mw(
//	    	ImsInterfaceMonitor p_monitorCompRef, Response p_200OK
//	    ) runs on ImsTestCoordinator  return Request
//	    {
//	       var charstring v_EUTB_PublicId := f_GetEUTPublicId(PX_EUT_B);
//		   var template SipUrl v_eutAUri := mw_SipUrl_Host(f_GetEUTAddress(PX_EUT_A));  		
//		   var template SipUrl v_eutBUri := mw_SipUrl_Host(f_GetEUTAddress(PX_EUT_B)); 
//		   var SipMessage v_sip;
//		   var charstring v_Epires200OK;
//		   var charstring v_EpiresSubscribe;
//           p_monitorCompRef.start(
//            f_imsIot_receive(
//                {mw_SipRequest(mdw_TP_IMS_5044_01_mw(v_eutAUri, v_eutBUri, v_EUTB_PublicId))},
//                {mw_SipRequest(mw_SUBSCRIBE_Request_Base)},
//                "TP_IMS_5044_01",
//                "SUBSCRIBE request",
//                0,
//                true
//            )
//           );
//           p_monitorCompRef.done;
//
//           f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
//           // Check that the expires header is set to "a value greater than the one 
//           // in the Expires_header of the 200_response"
//		   v_Epires200OK := p_200OK.msgHeader.expires.deltaSec;
//		   v_EpiresSubscribe  := v_sip.request.msgHeader.expires.deltaSec;
//           if (char2int(v_EpiresSubscribe) <= char2int(v_Epires200OK)) {
//             setverdict(fail);
//           }
//           return v_sip.request;
//	    }
//
//	    /**
//		 * @desc Starts monitor component behavior for TP_IMS_5096_01
//		 */
//	    function f_mtc_check_TP_IMS_5096_01_mw(
//	    	ImsInterfaceMonitor p_monitorCompRef, Request p_Subscribe
//	    ) runs on ImsTestCoordinator  return Response
//	    {
//		   var SipMessage v_sip;
//           var charstring v_Epires200OK;
//           var charstring v_EpiresSubscribe;
//           p_monitorCompRef.start(
//            f_imsIot_receive(
//                {mw_SipResponse(mw_200OK_Base), mw_SipResponse(mw_202Accepted_Base)},
//                {},
//                "TP_IMS_5096_01",
//                "200 OK or 202 Accepted",
//                0,
//                true
//            )
//           );
//     
//           p_monitorCompRef.done;
//		   
//           f_getSipMsgFromMonitor(p_monitorCompRef, v_sip);
//           // Check that the message contains "Expires_header indicating the same or 
//           // lower expiry time than specified in the initial SUBSCRIBE"
//		   v_Epires200OK := v_sip.response.msgHeader.expires.deltaSec;
//		   v_EpiresSubscribe  := p_Subscribe.msgHeader.expires.deltaSec;          
//           if (char2int(v_EpiresSubscribe) >=  char2int(v_Epires200OK)) {
//             setverdict(fail);
//           }
//
//
//           return v_sip.response;
//	    }
	    /**
		 * @desc Starts monitor component
		 */
	    function f_mtc_check_TP_IMS_5110_01_as(
	    	ImsInterfaceMonitor p_monitorCompRef)
	    runs on ImsTestCoordinator 
	    {
           p_monitorCompRef.start(
            f_imsIot_receive(
                {mw_SipResponse(mw_200OK_Base)},
                {},
                "TP_IMS_5110_01",
                "200 OK",
                0, // TODO skip parameter
                false
            )
           );
           p_monitorCompRef.done;		   
	    }
	    /**
		 * @desc Starts monitor component
		 */
	    function f_mtc_check_TP_IMS_5110_01_mw(
	    	ImsInterfaceMonitor p_monitorCompRef)
	    runs on ImsTestCoordinator 
	    {
           p_monitorCompRef.start(
            f_imsIot_receive(
                {mw_SipResponse(mw_200OK_Base)},
                {},
                "TP_IMS_5110_01",
                "200 OK",
                0, // TODO skip parameter
                false
            )
           );
           p_monitorCompRef.done;		   
	    }

	    /**
		 * @desc Starts monitor component behavior
		 * @param p_monitorCompRef Reference to monitor component
		 */
	    function f_mtc_check_TP_IMS_5097_09_as(
	    	ImsInterfaceMonitor p_monitorCompRef
	    ) runs on ImsTestCoordinator  {
		   var template SipUrl v_EutB_ASUrl := mw_SipUrl_Host(f_GetEUTASServerAddress(PX_EUT_B));
           p_monitorCompRef.start(
            f_imsIot_receive(
                {mw_SipRequest(mdw_TP_IMS_5097_09_as(v_EutB_ASUrl))},
                {},
                "TP_IMS_5097_09",
                "INVITE request",
                0,
                true
            )
           );
           p_monitorCompRef.done;
	    }


} // group

+9 −2
Original line number Diff line number Diff line
@@ -246,14 +246,14 @@ module AtsImsIot_Functions {
     	}

    	/**
    	 * @desc Get the S-CSCF FQN address of referenced EUT 
    	 * @desc Get the S-CSCF FQDN address of referenced EUT 
    	 */
       function f_GetEUTScscfAddress(integer p_ProductIdx) return charstring {
         // TODO
         return "TODO";
       }
    	/**
    	 * @desc Get the P-CSCF FQN address of referenced EUT 
    	 * @desc Get the P-CSCF FQDN address of referenced EUT 
    	 */
     	function f_GetEUTPcscfAddress(integer p_ProductIdx) return charstring {
     	  // TODO
@@ -266,6 +266,13 @@ module AtsImsIot_Functions {
     	  // TODO
     	  return "TODO";
     	}
   	/**
    	 * @desc Get the AS server FQDN  of referenced EUT 
    	 */
     	function f_GetEUTASServerAddress(integer p_ProductIdx) return charstring {
     	  // TODO
     	  return "TODO";
     	}

 	}
 
+47 −0
Original line number Diff line number Diff line
@@ -232,6 +232,53 @@ module AtsImsIot_Templates {
      }
    }

   /**
     * 
     * @desc INVITE Request checking TP_IMS_5310_01 on MW
     */
    template INVITE_Request mdw_TP_IMS_5310_01_mw 
     modifies mw_INVITE_Request_Base := {
      msgHeader := {
        pChargingVector :=  mw_PChargingVector({
            {id := "access-network-charging-info", paramValue := *}, 
            *
          })
      }
    }
   /**
     * 
     * @desc INVITE Request checking TP_IMS_5310_01 on AS
     */
    template INVITE_Request mdw_TP_IMS_5310_01_as 
     modifies mw_INVITE_Request_Base := {
      msgHeader := {
        pChargingVector :=  mw_PChargingVector({
            {id := "access-network-charging-info", paramValue := *}, 
            *
          })
      }
    }


   /**
     * 
     * @desc INVITE Request checking TP_IMS_5097_09
     */
    template INVITE_Request mdw_TP_IMS_5097_09_as (template SipUrl p_EutB_ASUri)
     modifies mw_INVITE_Request_Base := {
      msgHeader := {
		route := {
    		fieldName := ROUTE_E,
    		routeBody := {mw_routeBody(p_EutB_ASUri), *}
			},
		 pChargingFunctionAddresses := ?,
         pChargingVector :=  mw_PChargingVector({
            {id := "orig-ioi", paramValue := *},  // TODO indicating also operator identifier for IMSA, and not including a term-ioi parameter
            *
          })
      }
    }



  template Response mw_200OK_Base  modifies m_Response_Dummy :=
+56 −3
Original line number Diff line number Diff line
@@ -414,6 +414,47 @@ module AtsImsIot_TestCases {
	}


	/**
	 * @desc Supplementary Service HOLD with AS
	 * @see TS 186 011-2 V2.3.1 cause 4.5.5.1
	 */
	testcase TC_IMS_SS_0001() runs on ImsTestCoordinator system IotSystemInterface {
		// create components
		var IotEquipmentUser v_ueA := f_cf_create_IotEquipmentUser(c_userUE_A);
        var IotEquipmentUser v_ueB := f_cf_create_IotEquipmentUser(c_userUE_B);
		var ImsInterfaceMonitor v_gmA := f_cf_create_monitor(c_gm_A);
		var ImsInterfaceMonitor v_mw := f_cf_create_monitor(c_mw);
		var ImsInterfaceMonitor v_asB := f_cf_create_monitor(c_as_B);
		var ImsUserInfo v_userInfoA := f_getAnyValidUser(PX_EUT_A);
		var ImsUserInfo v_userInfoB := f_getAnyValidUser(PX_EUT_B);
				
		// map/connect component ports
		f_cf_user_up(v_ueA);
		f_cf_user_up(v_ueB);
		f_cf_monitor_up(v_gmA);
		f_cf_monitor_up(v_mw);
		f_cf_monitor_up(v_asB);
		
		// preamble
		f_mtc_userTriggerRegistration(v_ueA, v_userInfoA); 
		f_mtc_userTriggerRegistration(v_ueB, v_userInfoB); 
		
		// test body
		f_mtc_userInitiateCall (v_ueA, v_userInfoB);
		f_mtc_check_TP_IMS_5310_01_gm(v_gmA); // Check1		
		f_mtc_check_TP_IMS_5310_01_mw(v_mw); // Check1 
		f_mtc_check_TP_IMS_5310_01_as(v_mw); // Check1 
		
		// postamble
		f_PO_user_home_deregistration(v_ueA);
		f_PO_user_home_deregistration(v_ueB);
		
		//unmap/disconnet component ports
		f_cf_user_down(v_ueA);
		f_cf_user_down(v_ueB);
	}

	
	/**
	 * @desc Supplementary Service CFU with AS
	 * @see TS 186 011-2 V2.3.1 cause 4.5.5.7
@@ -431,22 +472,34 @@ module AtsImsIot_TestCases {
		var ImsUserInfo v_userInfoB2 := f_getAnyValidUser(PX_EUT_B); //// TODO f_getAnyValidUser2 ?
		
		// map/connect component ports
		f_cf_user_up(v_ueB);
		// f_cf_user_up(v_ueB);
		f_cf_user_up(v_ueA);
		f_cf_user_up(v_ueB2);
		f_cf_monitor_up(v_gmA);
		f_cf_monitor_up(v_mw);
		f_cf_monitor_up(v_asB);
		
		// preamble
		f_mtc_userTriggerRegistration(v_ueA, v_userInfoA); 
		f_mtc_userTriggerRegistration(v_ueB, v_userInfoB); 
		// f_mtc_userTriggerRegistration(v_ueB, v_userInfoB); 
		f_mtc_userTriggerRegistration(v_ueB2, v_userInfoB2); 
		
		// test body
		f_mtc_userInitiateCall (v_ueA, v_userInfoB);
		f_mtc_check_TP_IMS_5046_01_gm(v_gmA);		
		f_mtc_check_TP_IMS_5046_01_mw(v_mw); // Check1 
		// Check2 TP_IMS_5067_01 ? is already covered in TP_IMS_5046_01
		f_mtc_check_TP_IMS_5046_01_mw (v_asB);

		// postabmle
		f_mtc_check_TP_IMS_5097_09_as(v_asB); // Check5 on AS (step 6? in the message sequence) 
        
		f_mtc_check_TP_IMS_5110_01_as(v_asB); // Check4 on AS (step 19 in the message sequence) 
		f_mtc_check_TP_IMS_5110_01_mw(v_mw); // Check4 on MW (step 20 in the message sequence)
		
		// TODO checks 6, 7
		
		
		// postamble
		f_PO_user_home_deregistration(v_ueA);
		f_PO_user_home_deregistration(v_ueB);
		f_PO_user_home_deregistration(v_ueB2);
+0 −3
Original line number Diff line number Diff line
@@ -21,9 +21,6 @@ module AtsImsIot_TestConfiguration {
	import from AtsImsIot_Templates {template m_SetFilterReq, mw_SetFilterRsp;}

	import from LibCommon_VerdictControl {type FncRetCode;}
	with {
		extension "Project:LibCommon"
	}

	import from LibIot_TypesAndValues {
		type