Commit 5707fcfa authored by YannGarcia's avatar YannGarcia
Browse files

Review Initial conditions for all Test Cases

parent 549be05d
Loading
Loading
Loading
Loading
+460 −8
Original line number Diff line number Diff line
@@ -2024,6 +2024,7 @@ module AtsNg112_TestCases {
        
        // Postamble
        f_cf_01_http_down();
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_01_ecrf
      
@@ -2231,6 +2232,7 @@ module AtsNg112_TestCases {
        
        // Postamble
        f_cf_01_http_down();
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_02_ecrf
      
@@ -2440,6 +2442,7 @@ module AtsNg112_TestCases {
        
        // Postamble
        f_cf_01_http_down();
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_03_ecrf
      
@@ -2649,6 +2652,7 @@ module AtsNg112_TestCases {
        
        // Postamble
        f_cf_01_http_down();
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_04_ecrf
      
@@ -2743,6 +2747,454 @@ module AtsNg112_TestCases {
      
    } // End of group f_TC_ESRP_SIP_INVITE_BV_04 
    
    /**
     * @desc "IUT responds to OPTIONS requests"
     */
    testcase TC_ESRP_SIP_INVITE_BV_05(
                                      in CSeq p_cSeq_s
                                      ) runs on HttpImsComponent system TestAdapter {
        // Local variables
        var HttpComponent v_ecrf;
        var ImsComponent v_ue;
        var ImsComponent v_psap;
        
        // Test control
        if (not(PICS_ESRP_IUT) or not(PICS_S_SIP_OPT1)) {
          log("*** " & testcasename() & ": PICS_ESRP_IUT and PICS_S_SIP_OPT1 required for executing the TC ***");
          setverdict(inconc);
          stop;
        }
        
        // Test component configuration
        f_cf_03_up(v_ecrf, v_ue, v_psap);
        
        // Test adapter configuration
        
        // Preamble
        
        // Test Body
        v_ecrf.start(f_TC_ESRP_SIP_INVITE_BV_05_ecrf());
        f_incCSeq(p_cSeq_s); v_ue.start(f_TC_ESRP_SIP_INVITE_BV_05_ue(p_cSeq_s));
        f_incCSeq(p_cSeq_s); v_psap.start(f_TC_ESRP_SIP_INVITE_BV_05_psap(p_cSeq_s));
        f_serverSyncNClientsAndStop(3, {c_prDone, c_tbDone, c_poDone});
        
        // Postamble
        f_cf_03_down(v_ecrf, v_ue, v_psap);
      
    } // End of testcase TC_ESRP_SIP_INVITE_BV_05
    
    group f_TC_ESRP_SIP_INVITE_BV_05 {
      
      function f_TC_ESRP_SIP_INVITE_BV_05_ecrf() runs on HttpComponent {
        // Local variables
        
        // Test control
        
        // Test component configuration
        
        // Test adapter configuration
        
        // Preamble
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
       f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
       
        // Postamble
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_05_ecrf
      
      function f_TC_ESRP_SIP_INVITE_BV_05_ue(
                                             in CSeq p_cSeq_s
                                             ) runs on ImsComponent {
        // Local variables
        var template REGISTER_Request v_register;
        
        // Test control
        
        // Test component configuration
        f_init_userprofile(c_userProfile_UE1atSUThome);
        f_initSipUrl(c_serviceProfile_EMERGENCY);
        f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
        
        // Test adapter configuration
        
        // Preamble
         f_IMS_preamble_woRegistration(p_cSeq_s);
        LibIms_Steps.f_setHeadersOPTIONS(p_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_init_sdp_userprofile(vc_sdp_local, c_userProfile_UE1atSUThome, c_userProfile_Huawei);
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        f_SendOPTIONS(m_OPTIONS_Request_Base(vc_requestUri,
                                             vc_callId,
                                             vc_cSeq,
                                             vc_from,
                                             vc_to,
                                             vc_via
                                             ));
        f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq));
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_IMS_postamble_withDeRegistration(vc_cSeq);
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
      } // End of function f_TC_ESRP_SIP_INVITE_BV_05_ue
      
      function f_TC_ESRP_SIP_INVITE_BV_05_psap(
                                               in CSeq p_cSeq_s
                                               ) runs on ImsComponent {
        // Local variables
        
        // Test control
        
        // Test component configuration
        
        // Test adapter configuration
        
        // Preamble
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
      } // End of function f_TC_ESRP_SIP_INVITE_BV_05_psap
      
    } // End of group f_TC_ESRP_SIP_INVITE_BV_05 
    
    /**
     * @desc "IUT successfully forwards an incoming SIP MESSAGE to the correct downstream element, based on the ECRF response"
     */
    testcase TC_ESRP_SIP_INVITE_BV_06(
                                      in CSeq p_cSeq_s
                                      ) runs on HttpImsComponent system TestAdapter {
        // Local variables
        var HttpComponent v_ecrf;
        var ImsComponent v_ue;
        var ImsComponent v_psap;
        
        // Test control
        if (not(PICS_ESRP_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_SERVICE_LOST) or not(PICS_E_SIP_URN1) or not(PICS_L_FIS_GEO1)) {
          log("*** " & testcasename() & ": PICS_ESRP_IUT and PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST and PICS_E_SIP_URN1 and PICS_L_FIS_GEO1 required for executing the TC ***");
          setverdict(inconc);
          stop;
        }
        
        // Test component configuration
        f_cf_03_up(v_ecrf, v_ue, v_psap);
        
        // Test adapter configuration
        
        // Preamble
        
        // Test Body
        v_ecrf.start(f_TC_ESRP_SIP_INVITE_BV_06_ecrf());
        f_incCSeq(p_cSeq_s); v_ue.start(f_TC_ESRP_SIP_INVITE_BV_06_ue(p_cSeq_s));
        f_incCSeq(p_cSeq_s); v_psap.start(f_TC_ESRP_SIP_INVITE_BV_06_psap(p_cSeq_s));
        f_serverSyncNClientsAndStop(3, {c_prDone, c_tbDone, c_poDone});
        
        // Postamble
        f_cf_03_down(v_ecrf, v_ue, v_psap);
      
    } // End of testcase TC_ESRP_SIP_INVITE_BV_06
    
    group f_TC_ESRP_SIP_INVITE_BV_06 {
      
      function f_TC_ESRP_SIP_INVITE_BV_06_ecrf() runs on HttpComponent {
        // Local variables
        var HeaderLines v_headers;
        var HttpMessage v_request;
        
        // Test control
        
        // Test component configuration
        f_cf_01_http_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(-, -, v_headers);
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_request(
                                              mw_http_request_post(
                                                                   PICS_ECRF_URI,
                                                                   v_headers,
                                                                   mw_http_message_body_xml(
                                                                                            mw_body_xml_find_service_request(
                                                                                                                             mw_find_service_request(
                                                                                                                                                     {
                                                                                                                                                      mw_location(
                                                                                                                                                                  PX_LOCATION_ID,
                                                                                                                                                                  { mw_extension_point },
                                                                                                                                                                  "geodetic-2d" // TODO Use a Pixit
                                                                                                                                                                  )
                                                                                                                                                     },
                                                                                                                                                     { },
                                                                                                                                                     PX_E_POLICE_SERVICE_URN
          )))))) -> value v_request {
            tc_ac.stop;
            
            // Send the response
            f_init_default_headers_list(-, -, v_headers);
            httpPort.send(
                          m_http_response(
                                          m_http_response_ok(
                                                             m_http_message_body_xml(
                                                                                     m_body_xml_find_service_response(
                                                                                                                      m_find_service_response(
                                                                                                                                              { m_mapping(
                                                                                                                                                          mw_expires_date_time(PX_LOST_EXPIRES),
                                                                                                                                                          PX_LOST_LAST_UPDATED,
                                                                                                                                                          PX_V_POLICE_SOURCE,
                                                                                                                                                          PX_E_POLICE_SOURCE_ID,
                                                                                                                                                          { m_display_name(-, PX_E_POLICE_DISPLAY_NAME) },
                                                                                                                                                          { PX_E_POLICE_SIP_URI },
                                                                                                                                                          -,
                                                                                                                                                          PX_E_POLICE_SERVICE_URN
                                                                                                                                                          )
                                                                                                                                               },
                                                                                                                                               -,
                                                                                                                                               LibItsHttp_XmlTemplates.m_path(
                                                                                                                                                                              { LibItsHttp_XmlTemplates.m_via(PX_V_POLICE_SOURCE) }
                                                                                                                                                                              ),
                                                                                                                                               -, -,
                                                                                                                                               m_location_used(PX_LOCATION_ID)
                                                                                                                                               ))
                                                             ),
                                                             v_headers)));
            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
          }
          [] tc_ac.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
          }
        } // End of 'alt' staement
        
        // Postamble
        f_cf_01_http_down();
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_06_ecrf
      
      function f_TC_ESRP_SIP_INVITE_BV_06_ue(
                                             in CSeq p_cSeq_s
                                             ) runs on ImsComponent {
        // Local variables
        var template REGISTER_Request v_register;
        
        // Test control
        
        // Test component configuration
        f_init_userprofile(c_userProfile_UE1atSUThome);
        f_initSipUrl(c_serviceProfile_EMERGENCY);
        f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
        
        // Test adapter configuration
        
        // Preamble
        f_IMS_preamble_woRegistration(p_cSeq_s);
        LibIms_Steps.f_setHeadersMESSAGE(p_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_init_sdp_userprofile(vc_sdp_local, c_userProfile_UE1atSUThome, c_userProfile_Huawei);
        f_SendMESSAGE(m_MESSAGE_Request_IMS_Ng112(vc_requestUri,
                                                vc_callId,
                                                vc_cSeq,
                                                vc_from,
                                                vc_to,
                                                vc_via,
                                                m_Require_100rel,
                                                -,
                                                m_Supported_100rel,
                                                m_MBody_SDP(vc_sdp_local)
                                                ));
        f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq));
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_terminateCall_UE(vc_requestUri, valueof(vc_callId), vc_cSeq, vc_caller_From, vc_caller_To);
        f_IMS_postamble_withDeRegistration(vc_cSeq);
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
      } // End of function f_TC_ESRP_SIP_INVITE_BV_06_ue
      
      function f_TC_ESRP_SIP_INVITE_BV_06_psap(
                                               in CSeq p_cSeq_s
                                               ) runs on ImsComponent {
        // Local variables
        var template REGISTER_Request v_register;
        
        // Test control
        f_init_userprofile(c_userProfile_UE1atSUThome);
        f_initSipUrl(c_serviceProfile_EMERGENCY);
        f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
        
        // Test component configuration
        
        // Test adapter configuration
        
        // Preamble
        f_IMS_preamble_withRegistration(p_cSeq_s, v_register);
        LibIms_Steps.f_setHeadersMESSAGE(p_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        f_awaitingMESSAGE(
                          mw_MESSAGE_Request_IMS_Ng112(
                                                       vc_requestUri
                                                       )
                          );
        f_awaitingResponse(mw_Response_Base(c_statusLine100, vc_callId, vc_cSeq));
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_terminateCall_UE(vc_requestUri, valueof(vc_callId), vc_cSeq, vc_caller_From, vc_caller_To);
        f_IMS_postamble_withDeRegistration(vc_cSeq);
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
      } // End of function f_TC_ESRP_SIP_INVITE_BV_06_psap
      
    } // End of group f_TC_ESRP_SIP_INVITE_BV_06 
    
    /**
     * @desc "IUT responds BUSY for an incoming SIP INVITE when downstream element is not reachable"
     */
    testcase TC_ESRP_SIP_INVITE_BV_07(
                                      in CSeq p_cSeq_s
                                      ) runs on HttpImsComponent system TestAdapter {
        // Local variables
        var HttpComponent v_ecrf;
        var ImsComponent v_ue;
        var ImsComponent v_psap;
        
        // Test control
        if (not(PICS_ESRP_IUT) or not(PICS_S_SIP_BUS1)) {
          log("*** " & testcasename() & ": PICS_ESRP_IUT and PICS_S_SIP_BUS1 required for executing the TC ***");
          setverdict(inconc);
          stop;
        }
        
        // Test component configuration
        f_cf_03_up(v_ecrf, v_ue, v_psap);
        
        // Test adapter configuration
        
        // Preamble
        
        // Test Body
        v_ecrf.start(f_TC_ESRP_SIP_INVITE_BV_07_ecrf());
        f_incCSeq(p_cSeq_s); v_ue.start(f_TC_ESRP_SIP_INVITE_BV_07_ue(p_cSeq_s));
        f_incCSeq(p_cSeq_s); v_psap.start(f_TC_ESRP_SIP_INVITE_BV_07_psap(p_cSeq_s));
        f_serverSyncNClientsAndStop(3, {c_prDone, c_tbDone, c_poDone});
        
        // Postamble
        f_cf_03_down(v_ecrf, v_ue, v_psap);
      
    } // End of testcase TC_ESRP_SIP_INVITE_BV_07
    
    group f_TC_ESRP_SIP_INVITE_BV_07 {
      
      function f_TC_ESRP_SIP_INVITE_BV_07_ecrf() runs on HttpComponent {
        // Local variables
        
        // Test control
        
        // Test component configuration
        
        // Test adapter configuration
        
        // Preamble
        
        // Test Body
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
        
      } // End of function f_TC_ESRP_SIP_INVITE_BV_07_ecrf
      
      function f_TC_ESRP_SIP_INVITE_BV_07_ue(
                                             in CSeq p_cSeq_s
                                             ) runs on ImsComponent {
        // Local variables
        var template REGISTER_Request v_register;
        
        // Test control
        
        // Test component configuration
        f_init_userprofile(c_userProfile_UE1atSUThome);
        f_initSipUrl(c_serviceProfile_EMERGENCY);
        f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
        
        // Test adapter configuration
        
        // Preamble
        f_IMS_preamble_withRegistration(p_cSeq_s, v_register);
        LibIms_Steps.f_setHeadersINVITE(vc_cSeq, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_init_sdp_userprofile(vc_sdp_local, c_userProfile_UE1atSUThome, c_userProfile_Huawei);
        f_SendINVITE(m_INVITE_Request_Mime_IMS(vc_requestUri,
                                               vc_callId,
                                               vc_cSeq,
                                               vc_from,
                                               vc_to,
                                               vc_via,
                                               vc_contact,
                                               m_Require_100rel,
                                               -, -,
                                               m_Supported_100rel,
                                               -,
                                               m_MBody_MIMESdpXml(
                                                                  vc_sdp_local, 
                                                                  m_XmlBody_Presence(
                                                                                     m_presence(
                                                                                                "pres:3650n87934c@ls.example.com" // TODO Use a Pixit
                                                                                                )
                                                                                     )
                                                                  )
                                          ));
        f_awaitingResponseIgnore100Trying(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq));
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        f_check_Conversation(PX_CHECK_CONVERSATION);
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_terminateCall_UE(vc_requestUri, valueof(vc_callId), vc_cSeq, vc_caller_From, vc_caller_To);
        f_IMS_postamble_withDeRegistration(vc_cSeq);
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
      } // End of function f_TC_ESRP_SIP_INVITE_BV_07_ue
      
      function f_TC_ESRP_SIP_INVITE_BV_07_psap(
                                               in CSeq p_cSeq_s
                                               ) runs on ImsComponent {
        // Local variables
        
        // Test control
        f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
        
        // Test component configuration
        
        // Test adapter configuration
        
        // Preamble
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test Body
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
        // Postamble
        f_clientSyncAndVerdictPostamble(c_poDone, e_success);
      } // End of function f_TC_ESRP_SIP_INVITE_BV_07_psap
      
    } // End of group f_TC_ESRP_SIP_INVITE_BV_07 
    
  } // End of group esrp_role
  
  group psap_role {
@@ -3589,9 +4041,9 @@ module AtsNg112_TestCases {
        
        // Preamble
        f_IMS_preamble_woRegistration(p_cSeq_s);
        LibIms_Steps.f_setHeadersNOTIFY(p_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        LibIms_Steps.f_setHeadersOPTIONS(p_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_init_sdp_userprofile(vc_sdp_local, c_userProfile_UE1atSUThome, c_userProfile_Huawei);
        f_SendNOTIFY(m_OPTIONS_Request_Base(vc_requestUri,
        f_SendOPTIONS(m_OPTIONS_Request_Base(vc_requestUri,
                                             vc_callId,
                                             vc_cSeq,
                                             vc_from,
+6 −1
Original line number Diff line number Diff line
@@ -195,8 +195,13 @@ module LibNg112_Pics {
  modulepar boolean PICS_B_SDP_ULA1 := true;
  
  /**
   * @desc Does IUT support SIP OPTION?
   * @desc Does IUT support SIP OPTIONS?
   */
  modulepar boolean PICS_S_SIP_OPT1 := true;
  
  /**
   * @desc Does IUT busy?
   */
  modulepar boolean PICS_S_SIP_BUS1 := true;
  
} // End of module LibNg112_Pics
+2 −2
Original line number Diff line number Diff line
@@ -170,9 +170,9 @@ module LibNg112_Pixits {
  
  modulepar XSD.Double PX_CIRCLE_IN_V_FIRE_SERVICE_BOUNDARY_RADIUS := 2.0;
  
  modulepar XSD.DateTime PX_LOST_EXPIRES := "";
  modulepar XSD.DateTime PX_LOST_EXPIRES := "1970-01-01T00:00:00+00:00";
  
  modulepar XSD.DateTime PX_LOST_LAST_UPDATED := "";
  modulepar XSD.DateTime PX_LOST_LAST_UPDATED := "1970-01-01T00:00:00+00:00";
  
  modulepar XSD.AnyURI PX_E_UNKNOWN_SERVICE_URN := "urn:service:sos.unknown";

+22 −0

File changed.

Preview size limit exceeded, changes collapsed.

+26 −1

File changed.

Preview size limit exceeded, changes collapsed.

Loading