Commit 2c815f32 authored by Garcia's avatar Garcia
Browse files

Add support of OpenGIS

parent a90476b9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
Package NG112_ECRF {
        Domain {
            pics:
                - PICS_ECRF_IUT
                - PICS_HTTP_POST_REQUEST
                - PICS_SERVICE_LOST
                ;
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
Package NG112_LIS {
        Domain {
            pics:
                - PICS_LIS_IUT
                - PICS_HTTP_POST_REQUEST
                - PICS_LOCATION_HELD
                ;
+217 −34
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ module AtsNg112_TestCases {
  import from LibNg112_Pics all;
  import from LibNg112_Pixits all;
  
  group lis_role {
    
    /**
     * @desc "IUT successfully responds with a Point when it receives a HTTP POST location request without location type" 
     * @reference
@@ -46,14 +48,23 @@ module AtsNg112_TestCases {
     *           "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10",
     *           "https://tools.ietf.org/html/rfc5985"
     * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD
     * <pre>
     * Initial conditions with {
     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
     *     "point" containing
     *       "position" indicating value POINT_POS
     *     ;
     *   ;
     * }
     * </pre>
     */
    testcase TC_LIS_HTTP_POST_BV_01() runs on HttpComponent system TestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if ((not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) {
            log("*** " & testcasename() & ": PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***");
        if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) {
            log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
@@ -90,7 +101,8 @@ module AtsNg112_TestCases {
                                                                                                                            mw_locationResponse
            ))))) {
                tc_ac.stop;
                log("*** " & testcasename() & ": PASS: Security protocol version set to 3 ***");
                // TODO Need to decode content
                log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***");
                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
                
            }
@@ -111,14 +123,24 @@ module AtsNg112_TestCases {
     *           Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10
     *           https://tools.ietf.org/html/rfc5985
     * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD
     * <pre>
     * Initial conditions with {
     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
     *     "circle" containing
     *       "position" indicating value CIRCLE_POS,
     *       "radius"    indicating value CIRCLE_RADIUS
     *     ;
     *   ;
     * }
     * </pre>
     */
    testcase TC_LIS_HTTP_POST_BV_02() runs on HttpComponent system TestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if ((not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) {
            log("*** " & testcasename() & ": PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***");
        if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) {
            log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
@@ -155,7 +177,8 @@ module AtsNg112_TestCases {
                                                                                                                            mw_locationResponse
            ))))) {
                tc_ac.stop;
                log("*** " & testcasename() & ": PASS: Security protocol version set to 3 ***");
                // TODO Need to decode content
                log("*** " & testcasename() & ": PASS: IUT successfully responds with a Circle ***");
                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
                
            }
@@ -169,4 +192,164 @@ module AtsNg112_TestCases {
        f_cf_01_http_down();
    } // End of testcase TC_LIS_HTTP_POST_BV_02
    
    /**
     * @desc "IUT successfully responds with an error response when it receives a HTTP POST location request for an unknown device" 
     * @reference
     *           "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)",
     *           "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10",
     *           "https://tools.ietf.org/html/rfc5985"
     * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD
     * <pre>
     * Initial conditions with {
     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
     *     "circle" containing
     *       "position" indicating value CIRCLE_POS,
     *       "radius"    indicating value CIRCLE_RADIUS
     *     ;
     *   ;
     * }
     * </pre>
     */
    testcase TC_LIS_HTTP_POST_BV_03() runs on HttpComponent system TestAdapter {
        // Local variables
        var HeaderLines v_headers;
        
        // Test control
        if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) {
            log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD 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);
        f_remove_headears_list({ c_header_accept }, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_LISP_URI,
                                                        v_headers,
                                                        m_http_message_body_xml(
                                                                                m_body_xml_location_request(
                                                                                                            m_locationRequest(
                                                                                                                              m_device({PX_UNKNOWN_DEVICE_URI}).elem_list
                                                                               )))
        )));
        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_location_response(
                                                                                                                            mw_locationResponse
            ))))) {
                tc_ac.stop;
                // TODO Need to decode content
                log("*** " & testcasename() & ": PASS: IUT successfully responds with 'locationUnknoew' error response ***");
                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_LIS_HTTP_POST_BV_03
    
  } // End of group lis_role
  
  group ecrf_role {
    
    /**
     * @desc "IUT successfully responds with a service URI for a Point in the service boundary" 
     * @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;
     *   ;
     *   and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing
     *     serviceMappingFor SERVICE_URN_2 containing
     *        URI indicating value SIP_URI_2;
     *   ;
     * }
     * </pre>
     */
    testcase TC_ECRF_HTTP_POST_BV_01() 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);
        f_remove_headears_list({ c_header_accept }, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_ECRF_URI,
                                                        v_headers,
                                                        m_http_message_body_xml(
                                                                                m_body_xml_location_request(
                                                                                                            m_locationRequest(
                                                                                                                              m_device({PX_DEVICE_URI}).elem_list
                                                                               )))
        )));
        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_location_response(
                                                                                                                            mw_locationResponse
            ))))) {
                tc_ac.stop;
                // TODO Need to decode content
                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_01
    
  } // End of group ecrf_role
  
} // End of module AtsNg112_TestCases 
+10 −2
Original line number Diff line number Diff line
@@ -8,9 +8,17 @@ module AtsNg112_TestControl {
    
    // Test Execution
    control {
      if (PICS_LIS_IUT) {
        if (PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD) {
          execute(TC_LIS_HTTP_POST_BV_01());
          execute(TC_LIS_HTTP_POST_BV_02());
          execute(TC_LIS_HTTP_POST_BV_03());
        }
      }
      if (PICS_ECRF_IUT) {
        if (PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST) {
          execute(TC_ECRF_HTTP_POST_BV_01());
        }
      }
    } // End of 'control' statement
    
+20 −3
Original line number Diff line number Diff line
module LibNg112_Pics {
    
    modulepar boolean PICS_LIS_IUT := true;
    
    /**
     * @desc 
     * @desc Has the IUT the role of ECRF?
     */
    modulepar boolean PICS_ECRF_IUT := false;
    
    /**
     * @desc Does the IUT support HTTP POST request?
     */
    modulepar boolean PICS_HTTP_POST_REQUEST := true;
    
    /**
     * @desc 
     * @desc Does the IUT support HELD protocol?
     */
    modulepar boolean PICS_LOCATION_HELD := true;
    
    /**
     * @desc Does the IUT support LoST protocol?
     */
    modulepar boolean PICS_SERVICE_LOST := true;
    
    /**
     * @desc 
     */
    modulepar charstring PICS_LISP_URI := "/location";
    
    /**
     * @desc 
     */
    modulepar charstring PICS_LISP_URI := "http://www.lisp.com";
    modulepar charstring PICS_ECRF_URI := "/service";
    
} // End of module LibNg112_Pics
Loading