Commit 5406edee authored by Yann Garcia's avatar Yann Garcia
Browse files

Finalizing the SA test suite

parent f310658e
Loading
Loading
Loading
Loading
+114 −21
Changes for ItsSaem_TestCases.ttcn: 114 added lines, 21 removed lines.
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-01..03
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_01() runs on ItsSaem system ItsSaemSystem {

@@ -79,7 +79,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-04
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_04() runs on ItsSaem system ItsSaemSystem {

@@ -109,7 +109,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-05/06
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_05_06() runs on ItsSaem system ItsSaemSystem {

@@ -144,7 +144,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-07
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_07() runs on ItsSaem system ItsSaemSystem {

@@ -176,7 +176,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-08/09
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_08_09() runs on ItsSaem system ItsSaemSystem {

@@ -210,7 +210,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-10
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_10() runs on ItsSaem system ItsSaemSystem {

@@ -244,7 +244,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-11
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_11() runs on ItsSaem system ItsSaemSystem {

@@ -279,7 +279,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-12
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_12() runs on ItsSaem system ItsSaemSystem {

@@ -325,7 +325,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-13
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_13() runs on ItsSaem system ItsSaemSystem {

@@ -364,7 +364,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-14/15
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_14_15() runs on ItsSaem system ItsSaemSystem {

@@ -391,13 +391,12 @@ module ItsSaem_TestCases {
             *                 containing body
             *                     containing channelInfos
             *                         containing at least one ChannelInfo

             *         }
             *     }
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-16
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_16() runs on ItsSaem system ItsSaemSystem {

@@ -405,6 +404,100 @@ module ItsSaem_TestCases {

            } // End of TC_SAEM_MSGF_BV_16

            /**
             * @desc Check that the routingAdvertisement component is present if the ITS-S service can be consumed using IPv6 connectivity
             * <pre>
             * Pics Selection: PICS_SAEM_GENERATION and PICS_SAEM_IPv6
             * Initial conditions:
             *     with {
             *         SAS is active
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             SAS generates SAEM
             *         }
             *         then {
             *             the IUT sends a valid SAEM
             *                 containing body
             *                     containing routingAdvertisement
             *         }
             *     }
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-17
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_17() runs on ItsSaem system ItsSaemSystem {

                f_TC_SAEM_MSGF_BV_17();

            } // End of TC_SAEM_MSGF_BV_17

            /**
             * @desc Check that the defaultGateway component provides the 128-bit IPv6 address of the ITS-S Router that provides connectivity to the Service Provider ITS-S
             * <pre>
             * Pics Selection: PICS_SAEM_GENERATION and PICS_SAEM_IPv6
             * Initial conditions:
             *     with {
             *         SAS is active
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             SAS generates SAEM
             *         }
             *         then {
             *             the IUT sends a valid SAEM
             *                 containing body
             *                     containing routingAdvertisement
             *                         containing defaultGateway
             *                             indicating the 128-bit IPv6 address of the ITS-S Router
             *         }
             *     }
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-18
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_18() runs on ItsSaem system ItsSaemSystem {

                f_TC_SAEM_MSGF_BV_18();

            } // End of TC_SAEM_MSGF_BV_18

            /**
             * @desc Check that the defaultGateway component provides the 128-bit IPv6 address of the ITS-S Router that provides connectivity to the Service Provider ITS-S
             * <pre>
             * Pics Selection: PICS_SAEM_GENERATION and PICS_SAEM_IPv6
             * Initial conditions:
             *     with {
             *         SAS is active
             *     }
             * Expected behaviour:
             *     ensure that {
             *         when {
             *             SAS generates SAEM
             *         }
             *         then {
             *             the IUT sends a valid SAEM
             *                 containing body
             *                     containing routingAdvertisement
             *                         containing defaultGateway
             *                             indicating the 128-bit IPv6 address of the ITS-S Router
             *         }
             *     }
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/MSGF/BV-19
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_MSGF_BV_19() runs on ItsSaem system ItsSaemSystem {

                f_TC_SAEM_MSGF_BV_18();

            } // End of TC_SAEM_MSGF_BV_19

        } // End of group saemMessageFormat

        group saemSecurity {
@@ -431,7 +524,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/IFSE/BV-01
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_IFSE_BV_01() runs on ItsSaem system ItsSaemSystem {

@@ -464,7 +557,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/IFNT/BV-01
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_IFNT_BV_01() runs on ItsSaem system ItsSaemSystem {

@@ -493,7 +586,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/IFNT/BV-02
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_IFNT_BV_02() runs on ItsSaem system ItsSaemSystem {

@@ -539,7 +632,7 @@ module ItsSaem_TestCases {
         * </pre>
         *
         * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/DISS/BV-01
         * @reference ETSI TS 104 072 v2.2.1, Annex B
         * @reference ETSI TS 104 091 v2.1.1, Annex B
         */
        testcase TC_SAEM_DISS_BV_01() runs on ItsSaem system ItsSaemSystem {

@@ -587,7 +680,7 @@ module ItsSaem_TestCases {
         * </pre>
         *
         * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/DISS/BV-02
         * @reference ETSI TS 104 072 v2.2.1, Annex B
         * @reference ETSI TS 104 091 v2.1.1, Annex B
         */
        testcase TC_SAEM_DISS_BV_02() runs on ItsSaem system ItsSaemSystem {

@@ -636,7 +729,7 @@ module ItsSaem_TestCases {
         * </pre>
         *
         * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/DISS/BV-03
         * @reference ETSI TS 104 072 v2.2.1, Annex B
         * @reference ETSI TS 104 091 v2.1.1, Annex B
         */
        testcase TC_SAEM_DISS_BV_03() runs on ItsSaem system ItsSaemSystem {

@@ -665,7 +758,7 @@ module ItsSaem_TestCases {
         * </pre>
         *
         * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/DISS/BV-04
         * @reference ETSI TS 104 072 v2.2.1, Annex B
         * @reference ETSI TS 104 091 v2.1.1, Annex B
         */
        testcase TC_SAEM_DISS_BV_04_01() runs on ItsSaem system ItsSaemSystem {

@@ -694,7 +787,7 @@ module ItsSaem_TestCases {
         * </pre>
         *
         * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/DISS/BV-04
         * @reference ETSI TS 104 072 v2.2.1, Annex B
         * @reference ETSI TS 104 091 v2.1.1, Annex B
         */
        testcase TC_SAEM_DISS_BV_04_02() runs on ItsSaem system ItsSaemSystem {

@@ -735,7 +828,7 @@ module ItsSaem_TestCases {
             * </pre>
             *
             * @see       ETSI TS 104 203-2 v2.2.1 TP/SAEM/DISS/BV-06
             * @reference ETSI TS 104 072 v2.2.1, Annex B
             * @reference ETSI TS 104 091 v2.1.1, Annex B
             */
            testcase TC_SAEM_DISS_BV_06() runs on ItsSaem system ItsSaemSystem {

+6
Changes for ItsSaem_TestControl.ttcn: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -31,6 +31,12 @@ module ItsSaem_TestControl {
            execute(TC_SAEM_MSGF_BV_14_15());
            execute(TC_SAEM_MSGF_BV_16());

            if (PICS_SAEM_IPv6) {
                execute(TC_SAEM_MSGF_BV_17());
                execute(TC_SAEM_MSGF_BV_18());
                execute(TC_SAEM_MSGF_BV_19());
            }

            if (PICS_IS_IUT_SECURED) {
                execute(TC_SAEM_IFSE_BV_01());
                execute(TC_SAEM_DISS_BV_06());
+155 −2
Changes for ItsSaem_TpFunctions.ttcn: 155 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -670,7 +670,6 @@ module ItsSaem_TpFunctions {
            function f_TC_SAEM_MSGF_BV_14_15() runs on ItsSaem {

                // Local variables
                var SaemInd v_saem_ind;

                // Test control
                if (not PICS_SAEM_GENERATION) {
@@ -729,7 +728,7 @@ module ItsSaem_TpFunctions {
                                                                                    v_ut_saem_message.channelInfo,
                                                                                    *
                                                                                 }
                                        ))))) -> value v_saem_ind {
                                        ))))) {
                        tc_ac.stop;

                        log("*** " & testcasename() & ": PASS: Expected SAEM received ***");
@@ -840,6 +839,160 @@ module ItsSaem_TpFunctions {

            } // End of function f_TC_SAEM_MSGF_BV_16

            /**
             * @desc    TP Function for TC_SAEM_MSGF_BV_17
             */
            function f_TC_SAEM_MSGF_BV_17() runs on ItsSaem {

                // Local variables

                // Test control
                if (not PICS_SAEM_GENERATION or not PICS_SAEM_IPv6) {
                    log("*** " & testcasename() & ": PICS_SAEM_GENERATION and PICS_SAEM_IPv6 required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }

                // Test component configuration
                f_cfUp();

                // Test adapter configuration
                // Preamble
                f_prInitialState();
                var UtSaemMessage v_ut_saem_message := valueof(
                                                               m_ut_saem_message(
                                                                                 m_service_info(
                                                                                                { content := PX_NEW_SERVICE_ID },
                                                                                                1,
                                                                                                m_channel_options(
                                                                                                                  -, -,
                                                                                                                  {
                                                                                                                    {
                                                                                                                        extensionId := 11, //c_ProviderMACaddress
                                                                                                                        value_      := { ProviderMacAddress := '002e03707334'O } // TODO FSCOM Use PIXITs
                                                                                                                    }
                                                                                                                  }
                                                                ))));
                f_utTriggerEvent(
                                 UtSaemTrigger: { 
                                                 serviceInfoActions := { 
                                                                         trigger_ := { v_ut_saem_message }
                                }});
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);

                // Test Body
                tc_ac.start;
                alt {
                    [] saemPort.receive(
                                        mw_saemInd(
                                                   mw_saemMsg(
                                                              mw_sam(
                                                                     -,
                                                                     mw_sam_body(
                                                                                 mw_srv_adv_change_count,                     
                                                                                 *,
                                                                                 *,
                                                                                 ? // RoutingAdvertisement
                                        ))))) {
                        tc_ac.stop;

                        log("*** " & testcasename() & ": PASS: Expected SAEM received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: SAEM not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }

                // Postamble
                f_utTriggerEvent(
                                 UtSaemTrigger: { 
                                                 serviceInfoActions := { 
                                                                         ends := { v_ut_saem_message }
                }});
                f_poDefault();
                f_cfDown();

            } // End of function f_TC_SAEM_MSGF_BV_17

            /**
             * @desc    TP Function for TC_SAEM_MSGF_BV_18
             */
            function f_TC_SAEM_MSGF_BV_18() runs on ItsSaem {

                // Local variables

                // Test control
                if (not PICS_SAEM_GENERATION or not PICS_SAEM_IPv6) {
                    log("*** " & testcasename() & ": PICS_SAEM_GENERATION and PICS_SAEM_IPv6 required for executing the TC ***");
                    setverdict(inconc);
                    stop;
                }

                // Test component configuration
                f_cfUp();

                // Test adapter configuration
                // Preamble
                f_prInitialState();
                var UtSaemMessage v_ut_saem_message := valueof(
                                                               m_ut_saem_message(
                                                                                 m_service_info(
                                                                                                { content := PX_NEW_SERVICE_ID },
                                                                                                1,
                                                                                                m_channel_options(
                                                                                                                  -, -,
                                                                                                                  {
                                                                                                                    {
                                                                                                                        extensionId := 11, //c_ProviderMACaddress
                                                                                                                        value_      := { ProviderMacAddress := '002e03707334'O } // TODO FSCOM Use PIXITs
                                                                                                                    }
                                                                                                                  }
                                                                ))));
                f_utTriggerEvent(
                                 UtSaemTrigger: { 
                                                 serviceInfoActions := { 
                                                                         trigger_ := { v_ut_saem_message }
                                }});
                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);

                // Test Body
                tc_ac.start;
                alt {
                    [] saemPort.receive(
                                        mw_saemInd(
                                                   mw_saemMsg(
                                                              mw_sam(
                                                                     -,
                                                                     mw_sam_body(
                                                                                 mw_srv_adv_change_count,                     
                                                                                 *,
                                                                                 *,
                                                                                 mw_routing_advertisement
                                        ))))) {
                        tc_ac.stop;

                        log("*** " & testcasename() & ": PASS: Expected SAEM received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
                    }
                    [] tc_ac.timeout {
                        log("*** " & testcasename() & ": INCONC: SAEM not received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
                    }
                }

                // Postamble
                f_utTriggerEvent(
                                 UtSaemTrigger: { 
                                                 serviceInfoActions := { 
                                                                         ends := { v_ut_saem_message }
                }});
                f_poDefault();
                f_cfDown();

            } // End of function f_TC_SAEM_MSGF_BV_18

        } // End of group saemMessageFormat

        group saemSecurity {
+10 −4
Changes for lib/LibItsSaem_Pics.ttcn: 10 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -16,16 +16,22 @@ module LibItsSaem_Pics {
        
        /**
         * @desc Is the IUT running in secured mode?
         * @see  ETSI TS 104 201-1 Table A.7
         * @see  ETSI TS 104 203-1 Table A.2/1
         */
        modulepar boolean PICS_IS_IUT_SECURED := false;
        
        /**
         * @desc Support for SAEM generation
         * @see  ETSI TS 104 201-1 Table A.6
         * @see  ETSI TS 104 203-1 Table A.1/1
         */
        modulepar boolean PICS_SAEM_GENERATION := true;

    } // end saemPics
        /**
         * @desc Support of IPv6 connectivity for the ITS-S service
         * @see  ETSI TS 104 203-1 Table A.3/1
         */
        modulepar boolean PICS_SAEM_IPv6 := true;

    } // End of saemPics

} // end LibItsSaem_Pics
} // End of LibItsSaem_Pics