Commit 1f2a55c1 authored by garciay's avatar garciay
Browse files

First LIS validation against real equipment

parent 93403cbc
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

LibCommon_Time.PX_TAC := 30.0
LibItsHttp_Pics.PICS_HEADER_HOST := "ptsv2.com"
LibItsHttp_Pics.PICS_HEADER_HOST := "location-information-service.azurewebsites.net"
LibNg112_Pixits.PX_DEVICE_URI_TEL := "<uri>+331234567890</uri>"

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -20,7 +21,8 @@ LogEventTypes:= Yes

[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=held:held_codec;html:html_codec;json:json_codec)/TCP(debug=1,server=ptsv2.com,port=80,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0)"
#system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=ptsv2.com,port=80,use_ssl=0)"
#system.SIPP.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192.168.1.253,src_port=5060)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)"

[DEFINE]
@@ -47,8 +49,9 @@ system.httpPort.params := "HTTP(codecs=held:held_codec;html:html_codec;json:json
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_01
AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_02
AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_03
#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_02
#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_03
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+318 −319
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
Package NG112_ECRF {
        Domain {
            pics:
                - PICS_ECRF_IUT
                - PICS_HTTP_POST_REQUEST
                - PICS_SERVICE_LOST
                ;
@@ -149,7 +148,7 @@ Expected behaviour
                            element "location" containing
                                element "Point" inNamespace "http://www.opengis.net/gml" containing
                                    attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326",
                                    element "pos" indicating value POINT_POS;
                                    element "pos" indicating value POINT_IN_SERVICE_BOUNDARY_1;
                            ,
                            element "service" indicating value SERVICE_URN_1;
                        ;
@@ -291,7 +290,7 @@ Expected behaviour
                            element "location" containing
                                element "Point" inNamespace "http://www.opengis.net/gml" containing
                                    attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326",
                                    element "pos" indicating value POINT_POS;
                                    element "pos" indicating value POINT_IN_SERVICE_BOUNDARY_1;
                            ,
                            element "service" indicating value SERVICE_URN_2;
                        ;
+180 −0
Original line number Diff line number Diff line
/* ETSI Software License
* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted,
* free of charge, to use, reproduce and modify this software source code, under the following conditions:
* This source code is provided AS IS with no warranties, express or implied, including but not limited to,
* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement
* of intellectual property rights.
* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without
* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary
* loss) arising out of or related to the use of or inability to use the source code.
* This permission is granted to facilitate the implementation of the related ETSI standard, provided that
* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions
* as the present permission.
* This permission does not apply to any documentation associated with this source code for which ETSI keeps
* all rights reserved.
* The present ETSI Source Code license shall be included in all copies of whole or part of this source code
* and shall not imply any sub-license right.
* (c) ETSI 2018 
*/
 
 
Package NG112_ESRP {
        Domain {
            pics:
                - PICS_SERVICE_ESRP
                ;
            entities:
                - IUT
                - ECRF
                - PSAP
                ;
            events:
                - receives //for packets coming from the network to the IUT
                - sends //for packets sent by the IUT to the network
                - forwards //forwards the previously received message to the next hop
                - isConfiguredWith //IUT is configured to use the ECRF
                - isReachableWith // the PSAP is reachable via the specified URI
                - receivedInitialInviteRequestAndSentLostQueryToEcrf // [ref esrp.txt:RECEIVED_INITITAL_INVITE_AND_SENT_LOST_REQUEST]
                - receivesLostResponseFor // IUT receives a LoST response for the give target URI [ref esrp.txt:RECEIVES_LOST_RESPONSE_FOR]
                ;
        }

//          Const {
//        SDP_AND_PIDF_MULTIPART [ref esrp.txt:SDP_AND_PIDF_MULTIPART];
//        SERVICE_URN_1: "urn:service:sos.police";
//        SIP_URI_1: "sip:police@city.com";
//        LOCATION_1: "12.00, 53.00"
//     }
        
//      Data {
//          type PDU;   
//        }
//        Configuration {
//          Interface Type defaultGT accepts PDU;
//          Component Type NG112Comp with gate g of type defaultGT;
//          Test Configuration CFG_ESRP_01 
//              containing 
//                  Tester component BCF of type NG112Comp
//                  Tester component LIS of type NG112Comp
//                  Tester component ECRF of type NG112Comp
//                  SUT component IUT of type NG112Comp
//                  connection between BCF.g and IUT.g
//                  connection between LIS.g and IUT.g
//                  connection between ECRF.g and IUT.g;
//      }

Test Purpose {
TP Id TP_ESRP_SIP_INVITE_BV_01
Test objective 
    "IUT successfully forwards an incoming SIP INVITE to the correct downstream element, based on the ECRF response" 
Reference 
    "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.3",
    "https://tools.ietf.org/html/rfc5222"
//Config Id CFG_ESRP_01
PICS Selection PICS_SERVICE_ESRP
Initial conditions with {
    the IUT entity isConfiguredWith the ECRF
    and the PSAP entity isReachableWith the SIP_URI_1
    and the IUT entity receivedInitialInviteRequestAndSentLostQueryToEcrf
}
Expected behaviour
    ensure that {
        when {
            the IUT entity receives a SIP_INVITE containing
                Request_URI indicating value SERVICE_URN_1,
                Content_Type indicating value "multipart/mixed",
                body containing
                    SDP_AND_PIDF_MULTIPART
                ;
             ;
             and the IUT entity sends a POST containing
             Content_type indicating value "application/lost+xml;charset=utf-8",
                body containing
                    xmlMessage containing
                        version indicating value "1.0",
                        element "findService" inNamespace "urn:ietf:params:xml:ns:lost1" containing
                            element "location" containing
                                element "Point" inNamespace "http://www.opengis.net/gml" containing
                                    attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326",
                                    element "pos" indicating value LOCATION_1;
                            ,
                            element "service" indicating value SERVICE_URN_1;
                        ;
                    ;
                ;
                ; to the ECRF entity
                and the IUT entity receives a httpResponse containing
                Status_Code indicating value "200 OK",
                version indicating value "1.0",
                Content_type indicating value "application/lost+xml;charset=utf-8",
                body containing
                    xmlMessage containing
                        version indicating value "1.0",
                        element "findServiceResponse" inNamespace "urn:ietf:params:xml:ns:lost1" containing
                            element "mapping" containing
                                attribute "source",
                                attribute "sourceId",
                                attribute "lastUpdated",
                                attribute "expires",
                                element "service" indicating value SERVICE_URN_1,
                                element "uri" indicating value SIP_URI_1;
                            ,
                            element "locationUsed"
                        ;
                    ;
                ;
              ; from the ECRF entity
        }
        then {
            the IUT entity forwards a SIP_INVITE containing
                Request_URI indicating value SERVICE_URN_1,
                Content_Type indicating value "multipart/mixed",
                Route_Header indicating value SIP_URI_1
                body containing
                    SDP_AND_PIDF_MULTIPART
                ;
            ; to the PSAP entity
        }
    }
}  //End of TP_ESRP_SIP_INVITE_BV_01

Test Purpose {
TP Id TP_ESRP_SIP_INVITE_BV_02
Test objective 
    "IUT adds Incident-ID and Call-ID INFO headers" 
Reference 
    "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.3",
    "https://tools.ietf.org/html/rfc5222"
//Config Id CFG_ESRP_01
PICS Selection PICS_SERVICE_ESRP
Initial conditions with {
    the IUT entity isConfiguredWith the ECRF
    and the PSAP entity isReachableWith the SIP_URI_1
    and the IUT entity receivedInitialInviteRequestAndSentLostQueryToEcrf
}
Expected behaviour
    ensure that {
        when {
            the IUT entity receivesLostResponseFor the SIP_URI_1 from the ECRF entity
        }
        then {
            the IUT entity forwards the SIP_INVITE containing
                Request_URI indicating value SERVICE_URN_1,
                Content_Type indicating value "multipart/mixed",
                Route indicating value SIP_URI_1,
                Call_Info containing 
                    uri indicating value valid "Incident Tracking Identifier",
                    purpose "EES-IncidentId"
                ;,
                Call_Info containing 
                    uri indicating value valid "Call Identifier",
                    purpose "EES-CallId"
                ;,
                body containing
                    SDP_AND_PIDF_MULTIPART
                ;
            ; to the PSAP entity
        }
    }
}  //End of TP_ESRP_SIP_INVITE_BV_02
}
+124 −0
Original line number Diff line number Diff line
/* ETSI Software License
* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted,
* free of charge, to use, reproduce and modify this software source code, under the following conditions:
* This source code is provided AS IS with no warranties, express or implied, including but not limited to,
* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement
* of intellectual property rights.
* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without
* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary
* loss) arising out of or related to the use of or inability to use the source code.
* This permission is granted to facilitate the implementation of the related ETSI standard, provided that
* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions
* as the present permission.
* This permission does not apply to any documentation associated with this source code for which ETSI keeps
* all rights reserved.
* The present ETSI Source Code license shall be included in all copies of whole or part of this source code
* and shall not imply any sub-license right.
* (c) ETSI 2018 
*/
 
 
Package NG112_LIS {
        Domain {
            pics:
                - PICS_HTTP_POST_REQUEST
                - PICS_LOCATION_HELD
                ;
            entities:
                - IUT
                - MTC
                ;
            events:
                - receives //for packets coming from the network to the IUT
                - sends //for packets sent by the IUT to the network
                - havingLocationMappingFor //IUT is provisioned with the relevant location data
                - havingReturnedLocationUriFor //[ref lis.txt:havingReturnedLocationUriFor] IUT returned a locationURI for the relevant location data after a HELD request
                ;
        }

//          Const {
//        DEVICE_NUMBER_POINT: "+331234567890";
//        POINT_POS:  "43.616891, 7.053179"; // lat: 43.616891, lon: 7.053179
//        DEVICE_NUMBER_CIRCLE: "+331234567891";
//        CIRCLE_POS: "43.617174, 7.052750"; // lat: 43.617174, lon: 7.052750
//        CIRCLE_RADIUS: "15";
//          }
        
//      Data {
//          type PDU;   
//        }
//        Configuration {
//          Interface Type defaultGT accepts PDU;
//          Component Type NG112Comp with gate g of type defaultGT;
//          Test Configuration CFG_ESRP_01 
//              containing 
//                  Tester component BCF of type NG112Comp
//                  Tester component LIS of type NG112Comp
//                  Tester component ECRF of type NG112Comp
//                  SUT component IUT of type NG112Comp
//                  connection between BCF.g and IUT.g
//                  connection between LIS.g and IUT.g
//                  connection between ECRF.g and IUT.g;
//      }

Test Purpose {
TP Id TP_LIS_HTTP_GET_BV_01
Test objective 
    "IUT successfully returns the location when a locationURI is dereferenced" 
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"
//Config Id CFG_LIS_01
PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD
Initial conditions with {
    the IUT entity havingLocationMappingFor the DEVICE_NUMBER_CIRCLE containing
        "circle" containing
            "position" indicating value CIRCLE_POS,
            "radius"    indicating value CIRCLE_RADIUS
        ;
    ; and the IUT entity havingReturnedLocationUriFor the DEVICE_NUMBER_CIRCLE containing
            element "locationURI" indicating value LOCATION_URI
            ;
}
Expected behaviour
    ensure that {
        when {
            the IUT entity receives a GET containing
                Uri indicating value LOCATION_URI
            ;
        }
        then {
            the IUT entity sends a httpResponse containing
                Status_Code indicating value "200 OK",
                version indicating value "1.0",
                Content_type indicating value "application/pidf+xml;charset=utf-8",
                body containing
                    xmlMessage containing   
                        version indicating value "1.0",
                        element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing
                            attribute "entity" indicating value valid "pres:" uri,
                            element "tuple" containing
                                attribute "id",
                                element "status" containing
                                    element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing
                                        element "location-info" containing
                                            element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing
                                                attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326",
                                                element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_POS,
                                                element "radius" indicating value CIRCLE_RADIUS containing
                                                    attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001"
                                                ;
                                            ;
                                        ;
                                    ;
                                ;
                            ;
                        ;
                    ;
                ;
            ;
        }
    }
} //End of TP_LIS_HTTP_GET_BV_01
}
+462 −264

File changed.

Preview size limit exceeded, changes collapsed.

Loading