Commit 4cf63dfa authored by garciay's avatar garciay
Browse files

Validate ECRF test cases

parent 2c42057c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -83,7 +83,9 @@ system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debu
#AtsNg112_TestCases.TC_LIS_HTTP_GET_BV_02
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_02
AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_03
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_03
AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_04
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_05

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+184 −8
Original line number Diff line number Diff line
@@ -1202,7 +1202,7 @@ module AtsNg112_TestCases {
                                                                                                                                                 )
                                                                                                                                      },
                                                                                 { /*m_notLost(encvalue_unichar(valueof(m_point(PX_LOST_NO_LOST, PX_SRS_NAME, "point1"))))*/ },
                                                                                                                                    PX_E_POLICE_SERVICE_URN,
                                                                                                                                    PX_E_UNKNOWN_SERVICE_URN,
                                                                                                                                    true,
                                                                                                                                    value_
                                                                                                                                    )))
@@ -1249,13 +1249,13 @@ module AtsNg112_TestCases {
     * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST
     * <pre>
     * Initial conditions with {
     *   the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing
     *     serviceMappingFor SERVICE_URN_1 containing
     *        URI indicating value SIP_URI_1;
     *   the IUT entity havingServiceBoundaryFor the E_POLICE_SERVICE_BOUNDARY containing
     *     serviceMappingFor E_POLICE_SERVICE_BOUNDARY containing
     *        URI indicating value E_POLICE_SERVICE_BOUNDARY;
     *   ;
     *   and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing
     *     serviceMappingFor SERVICE_URN_2 containing
     *        URI indicating value SIP_URI_2;
     *   and the IUT entity havingServiceBoundaryFor the E_FIRE_SERVICE_BOUNDARY containing
     *     serviceMappingFor E_FIRE_SERVICE_BOUNDARY containing
     *        URI indicating value E_FIRE_SERVICE_BOUNDARY;
     *   ;
     * }
     * </pre>
@@ -1310,7 +1310,7 @@ module AtsNg112_TestCases {
                                                                     mw_http_message_body_xml(
                                                                                              mw_body_xml_find_service_response_error(
                                                                                                                                      mw_exception_serviceNotImplemented(
                                                                                                                                                                         PX_E_FIRE_SERVICE_URN,
                                                                                                                                                                         PX_V_POLICE_SOURCE,
                                                                                                                                                                         mw_basic_exception
                                                                                                                                                                         )))))) {
              tc_ac.stop;
@@ -1327,6 +1327,182 @@ module AtsNg112_TestCases {
        f_cf_01_http_down();
    } // End of testcase TC_ECRF_HTTP_POST_BV_03
    
    /**
     * @desc "IUT successfully responds with an error response for an unrecognized location profile"
     * @reference
     *           "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)",
     *           "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4",
     *           "https://tools.ietf.org/html/rfc5222"
     * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST
     * <pre>
     * Initial conditions with {
     *   the IUT entity havingServiceBoundaryFor the E_POLICE_SERVICE_BOUNDARY containing
     *     serviceMappingFor E_POLICE_SERVICE_BOUNDARY containing
     *        URI indicating value E_POLICE_SERVICE_BOUNDARY;
     *   ;
     *   and the IUT entity havingServiceBoundaryFor the E_FIRE_SERVICE_BOUNDARY containing
     *     serviceMappingFor E_FIRE_SERVICE_BOUNDARY containing
     *        URI indicating value E_FIRE_SERVICE_BOUNDARY;
     *   ;
     * }
     * </pre>
     */
    testcase TC_ECRF_HTTP_POST_BV_04() runs on HttpComponent system TestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if (not(PICS_ECRF_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_SERVICE_LOST)) {
            log("*** " & testcasename() & ": PICS_ECRF_IUT and PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_post(
                                                         PICS_ECRF_URI,
                                                         v_headers,
                                                         m_http_message_body_xml(
                                                                                 m_body_xml_find_service_request(
                                                                                                             m_find_service_request(
                                                                                                                                    {
                                                                                                                                      m_location(
                                                                                                                                                 PX_LOST_ID,
                                                                                                                                                 { m_extension_point(encvalue_unichar(valueof(m_point(PX_POINT_IN_E_POLICE_SERVICE_BOUNDARY, PX_SRS_NAME, "point2")))) },
                                                                                                                                                 "someUnknownProfile"
                                                                                                                                                 )
                                                                                                                                      },
                                                                                                                                    { },
                                                                                                                                    PX_E_POLICE_SERVICE_URN,
                                                                                                                                    true,
                                                                                                                                    value_
                                                                                                                                    )))
        )));
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test body
        tc_ac.start;
        alt {
            [] httpPort.receive(
                                mw_http_response(
                                                 mw_http_response_ok(
                                                                     mw_http_message_body_xml(
                                                                                              mw_body_xml_find_service_response_error(
                                                                                                                                      mw_exception_locationProfileUnrecognized(
                                                                                                                                                                               PX_V_POLICE_SOURCE,
                                                                                                                                                                               mw_location_profile_unrecognized
                                                                                                                                                                               )))))) {
              tc_ac.stop;
              log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***");
              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' statement
        
        // Postamble
        f_cf_01_http_down();
    } // End of testcase TC_ECRF_HTTP_POST_BV_04
    
    /**
     * @desc "unsupportedProfiles"
     * @reference
     *           "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)",
     *           "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4",
     *           "https://tools.ietf.org/html/rfc5222"
     * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST
     * <pre>
     * Initial conditions with {
     *   the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing
     *     serviceMappingFor SERVICE_URN_1 containing
     *        URI indicating value SIP_URI_1;
     *   ;
     * }
     * </pre>
     */
    testcase TC_ECRF_HTTP_POST_BV_05() runs on HttpComponent system TestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if (not(PICS_ECRF_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_SERVICE_LOST)) {
            log("*** " & testcasename() & ": PICS_ECRF_IUT and PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_up();
        
        // Test adapter configuration
        
        // Preamble
        f_init_default_headers_list(v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_post(
                                                         PICS_LIS_URI,
                                                         v_headers,
                                                         m_http_message_body_xml(m_body_xml_location_request(
                                                                                                             m_locationRequest(
                                                                                                                               { encvalue_unichar(valueof(m_device({ PX_DEVICE_URI_TEL }))) }
                                                                                                                               )
                                                                                                             )
                                                                                 )
                                                         )
                                     )
                      );
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test body
        tc_ac.start;
        alt {
            [] httpPort.receive(
                                mw_http_response(
                                                 mw_http_response_ok(
                                                                     mw_http_message_body_xml(
                                                                                              mw_body_xml_find_service_response(
                                                                                                                                mw_find_service_response(
                                                                                                                                                         { mw_mapping(
                                                                                                                                                                      mw_expires_date_time(PX_LOST_EXPIRES),
                                                                                                                                                                      PX_LOST_LAST_UPDATED,
                                                                                                                                                                      PX_V_POLICE_SOURCE,
                                                                                                                                                                      PX_V_POLICE_SOURCE_ID,
                                                                                                                                                                      { mw_display_name(-, PX_V_POLICE_DISPLAY_NAME) },
                                                                                                                                                                      { PX_E_POLICE_SIP_URI },
                                                                                                                                                           mw_mapping_service_boundary(?/*TODO*/)
                                                                                                                                                                      )
                                                                                                                                                           },
                                                                                                                                                         -,
                                                                                                                                                         -,
                                                                                                                                                         -,
                                                                                                                                                         -,
                                                                                                                                                         ?
            )))))) {
                tc_ac.stop;
                log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***");
                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' statement
        
        // Postamble
        f_cf_01_http_down();
    } // End of testcase TC_ECRF_HTTP_POST_BV_05
    
  } // End of group ecrf_role
  
} // End of module AtsNg112_TestCases 
+10 −0
Original line number Diff line number Diff line
@@ -29,6 +29,16 @@ module AtsNg112_TestControl {
        if (PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST) {
          execute(TC_ECRF_HTTP_POST_BV_01());
          execute(TC_ECRF_HTTP_POST_BV_02());
          execute(TC_ECRF_HTTP_POST_BV_03());
          execute(TC_ECRF_HTTP_POST_BV_04());
          /*execute(TC_ECRF_HTTP_POST_BV_05());
          execute(TC_ECRF_HTTP_POST_BV_06());
          execute(TC_ECRF_HTTP_POST_BV_07());
          execute(TC_ECRF_HTTP_POST_BV_08());
          execute(TC_ECRF_HTTP_POST_BV_09());
          execute(TC_ECRF_HTTP_POST_BV_10());
          execute(TC_ECRF_HTTP_POST_BV_11());
          execute(TC_ECRF_HTTP_POST_BV_12());*/
        }
      }
    } // End of 'control' statement
+14 −2
Original line number Diff line number Diff line
@@ -101,6 +101,15 @@ module LibNg112_Pixits {
  
  modulepar DoubleList PX_POINT_IN_E_POLICE_SERVICE_BOUNDARY := { 43.616891, 7.053179 };
  
  modulepar XSD.AnyURI PX_E_FIRE_SERVICE_URN := "urn:service:sos.fire";
  
  modulepar XSD.AnyURI PX_V_FIRE_SERVICE_URN := "urn:service:sos.fire";
  
  modulepar DoubleList PX_POINT_IN_E_FIRE_SERVICE_BOUNDARY := { 48.20597092201654, 16.221656799316406 };



  
  modulepar XSD.DateTime PX_LOST_EXPIRES := "2019-08-30T08:48:17+00:00";
  
  modulepar XSD.DateTime PX_LOST_LAST_UPDATED := "2018-08-30T08:48:17+00:00";
@@ -108,11 +117,14 @@ module LibNg112_Pixits {


  
  modulepar XSD.AnyURI PX_E_FIRE_SERVICE_URN := "urn:service:sos.fire";




  
  modulepar XSD.AnyURI PX_E_UNKNOWN_SERVICE_URN := "urn:service:sos.unknown";
  
  

  
} // End of module LibNg112_Pixits
+0 −2
Original line number Diff line number Diff line
@@ -613,7 +613,6 @@ type record LocationProfileUnrecognized
{
	Lang lang optional,
	XSD.Token message_ optional,
	XSD.NMTOKENS unsupportedProfiles,
	record of NotLost notLost_list
}
with {
@@ -624,7 +623,6 @@ with {
  variant (lang) "attribute";
  variant (message_) "name as 'message'";
  variant (message_) "attribute";
  variant (unsupportedProfiles) "attribute";
  variant (notLost_list) "untagged";
};

Loading