Commit 7f46ef3e authored by Garcia's avatar Garcia
Browse files

Start TTCN-3 development

parent b315c7ef
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -87,10 +87,14 @@ RUN echo "docker-titan" > /etc/hostname \
    && ./build_titan.bash \
    && cd /home/stf549 \
    && . /home/stf549/devenv.bash \
    && cd /home/stf549/dev/STF549_Ng112/scripts 
    && cd /home/stf549/dev/STF549_Ng112/scripts \
    && ./update_emcom_project.bash \
    && ls -ltr /home/stf549/dev/STF549_Ng112 \
    && cd /home/stf549/dev/STF549_Ng112/etsi_emcom/src/AtsNg112/objs \
    && ../bin/ng112.bash



CMD ["/bin/bash"]
CMD ["/bin/bash", "-c", "su - stf549"]

# That's all Floks
+3 −2
Original line number Diff line number Diff line
@@ -19,8 +19,8 @@ LogEventTypes:= Yes

[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.sipPort.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)"
#system.pemeaPort.params := "PEMEA/HTTP/TCP(debug=1,server=httpbin.org,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)"
system.httpPort.params := "HTTP/TCP(debug=1,server=httpbin.org,port=80,use_ssl=0)"

[DEFINE]
# In this section you can create macro definitions,
@@ -46,6 +46,7 @@ system.sipPort.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192.
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsNg112_TestCases.TC_1
AtsNg112_TestCases.TC_2

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+66 −1
Original line number Diff line number Diff line
@@ -11,7 +11,16 @@
 */
module AtsNg112_TestCases {
    
    // LibCommon
    // Libcommon
    import from LibCommon_Time all;
    import from LibCommon_VerdictControl all;
    import from LibCommon_Sync all;
    
    // LibHttp
    import from LibItsHttp_TypesAndValues all;
    import from LibItsHttp_Functions all;
    import from LibItsHttp_Templates all;
    import from LibItsHttp_TestSystem all;
    
    // LibSip
    import from LibSip_Interface all;
@@ -19,7 +28,9 @@ module AtsNg112_TestCases {
    // LibNg112
    import from LibNg112_TypesAndValues all;
    import from LibNg112_Templates all;
    import from LibNg112_Functions all;
    import from LibNg112_TestSystem all;
    import from LibNg112_Pics all;
    
    testcase TC_1() runs on SipComponent system TestAdapter {
        
@@ -29,4 +40,58 @@ module AtsNg112_TestCases {
        unmap(self:SIPP, system:SIPP);
    }
    
    /**
     * @desc "IUT successfully processes all mandatory HTTP headers when it receives a HTTP POST request" 
     * @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"
     */
    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 ***");
            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_get(
                                                        PICS_LISP_URI,
                                                        v_headers
        )));
        f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success);
        
        // Test body
        tc_ac.start;
        alt {
            [] httpPort.receive(
                                mw_http_response
            ) {
                tc_ac.stop;
                log("*** " & testcasename() & ": PASS: Security protocol version set to 3 ***");
                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_01
    
} // End of module AtsNg112_TestCases 
+0 −3
Original line number Diff line number Diff line
module LibNg112_Templates {

} // End of module LibNg112_Templates
+0 −12
Original line number Diff line number Diff line
module LibNg112_TestSystem {
    
    // LibCommon
    
    // LibSip
    import from LibSip_Interface all;
    
    type component TestAdapter {
        port SipPort SIPP;
    }
    
} // End of module LibNg112_TestSystem
Loading