ItsSrem_TestCases.ttcn 14.3 KB
Newer Older
garciay's avatar
garciay committed
/**
 *    @author   ETSI / STF517
 *    @version  $URL$
 *              $Id$
 *    @desc     SREM Testcases (ETSI TS 103 191-2 v1.2.1)
garciay's avatar
garciay committed
 *    @copyright   ETSI Copyright Notification
 *                 No part may be reproduced except as authorized by written permission.
 *                 The copyright and the foregoing restriction extend to reproduction in all media.
 *                 All rights reserved.
garciay's avatar
garciay committed
    
    // LibItsMapemSpatem
    import from LibItsSremSsem_TestSystem all;
    
    // ItsMapemSpatem
    import from ItsSrem_TpFunctions all;
    
garciay's avatar
garciay committed
                 * @desc Check that protocolVersion is set to 1 and messageID is set to 9
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SREM_GENERATION
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            the IUT is requested to generate a new SREM
                 *        }
                 *        then {
                 *            the IUT sends a valid SREM
                 *                containing ITS PDU header
                 *                    containing protocolVersion
                 *                        indicating value '1'
                 *                    and containing messageID
                 *                        indicating value '9'
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_MSGF_BV_01
garciay's avatar
garciay committed
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.3
garciay's avatar
garciay committed
                testcase TC_IS_RLT_MSGF_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem {
garciay's avatar
garciay committed
                } // End of testcase TC_IS_RLT_MSGF_BV_01
garciay's avatar
garciay committed
            group sreEventGeneration {
                
garciay's avatar
garciay committed
                 * @desc Check that IVI Service generates a new SREM on reception of a valid AppSREM_Trigger request
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SREM_GENERATION
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            the IUT receives an AppSREM_Trigger request from the application layer
                 *        }
                 *        then {
                 *            the IUT sends a valid SREM
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_EVGN_BV_01
garciay's avatar
garciay committed
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.1
                 */
garciay's avatar
garciay committed
                testcase TC_IS_TLC_EVGN_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem {
garciay's avatar
garciay committed
                    
                    f_IS_TLC_EVGN_BV_01();
                    
garciay's avatar
garciay committed
                } // End of testcase TC_IS_TLC_EVGN_BV_01
garciay's avatar
garciay committed
                
garciay's avatar
garciay committed
                 * @desc Check that the IUT identifies SREM with a unique request identifier
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SREM_GENERATION
garciay's avatar
garciay committed
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *        and the IUT having generated several SREM 
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            the IUT is requested to generate a new SREM 
                 *        }
                 *        then {
                 *            the IUT sends a valid SREM
                 *                containing srm
                 *                    containing requests[0]
                 *                        containing requestID
                 *                            indicating an unused value
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_EVGN_BV_02
garciay's avatar
garciay committed
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.1
                 */
garciay's avatar
garciay committed
                testcase TC_IS_TLC_EVGN_BV_02 () runs on ItsSremSsem system ItsSremSsemSystem {
garciay's avatar
garciay committed
                    
                    f_IS_TLC_EVGN_BV_02();
                    
garciay's avatar
garciay committed
                } // End of testcase TC_IS_TLC_EVGN_BV_02
garciay's avatar
garciay committed
                
            } // End of group sreEventGeneration
            
            group sreEventUpdate {
                
                /**
                 * @desc Check that the IUT increments the sequenceNumber when a SREM update is generated
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SREM_GENERATION
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *        and the IUT having generate a SREM
                 *            containing srm
                 *                containing sequenceNumber
                 *                    indicating SREM_SN_1
                 *                and containing requests[0]
                 *                    containing request
                 *                        containing requestID
                 *                            indicating SREM_RID_1
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            the IUT receives an AppSREM_update request
                 *        }
                 *        then {
                 *            the IUT sends a valid SREM
                 *            containing ssm
                 *                containing sequenceNumber
                 *                    indicating SREM_SN_1+ 1
                 *                and containing requests[0]
                 *                    containing request
                 *                        containing requestID
                 *                            indicating SREM_RID_1
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_EVUP_BV_01
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.1
                 */
                testcase TC_IS_TLC_EVUP_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem {
                    
                    f_IS_TLC_EVUP_BV_01();
                    
                } // End of testcase TC_IS_TLC_EVUP_BV_01
                
            } // End of group sreEventUpdate
            
            group sreCommunication {
                
                /**
                 * @desc Check that SREM uses BTP_B packet
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SREM_GENERATION
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *        and the IUT sending SREM 
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            a SREM is generated
                 *        }
                 *        then {
                 *            the IUT sends a valid SREM
                 *                encapsulated in a BTP-B packet
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_COMM_BV_01_01
garciay's avatar
garciay committed
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.3.3
                 */
                testcase TC_IS_TLC_COMM_BV_01_01 () runs on ItsSremSsem system ItsSremSsemSystem {
                    
                    f_IS_TLC_COMM_BV_01_01();
                    
                } // End of testcase TC_IS_TLC_COMM_BV_01_01
                
                /**
                 * @desc Check that the destination port for SREM is set to 2007
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SREM_GENERATION
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *        and the IUT sending SREM 
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            a SREM is generated
                 *        }
                 *        then {
                 *            the IUT sends a valid SREM
                 *                encapsulated in a BTP packet
                 *                   containing a destination port value set to 2007
                 *                   and containing a destination port info value set to 0
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_COMM_BV_01_02
garciay's avatar
garciay committed
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.3.3
                 */
                testcase TC_IS_TLC_COMM_BV_01_02 () runs on ItsSremSsem system ItsSremSsemSystem {
                    
                    f_IS_TLC_COMM_BV_01_02();
                    
                } // End of testcase TC_IS_TLC_COMM_BV_01_02
                
            } // End of group sreCommunication 
            
        } // End of group sreMessageDissemination 
        
        group sreMessageProcessing {
            
            /**
garciay's avatar
garciay committed
             * @desc Check that the IUT can successfully process all mandatory fields of SSEM received
garciay's avatar
garciay committed
             * <pre>
garciay's avatar
garciay committed
             * Pics Selection: PICS_SSEM_RECEPTION
garciay's avatar
garciay committed
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT having send a valid SREM
garciay's avatar
garciay committed
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
garciay's avatar
garciay committed
             *        }
             *        then {
             *            the IUT forwards the SSEM content to upper layers
             *            and the IUT forwards the SSEM content to other facilities
garciay's avatar
garciay committed
             *        }
             *    }
             * </pre>
             * 
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_MSGF_BV_03
             * @reference ETSI TS 103 301 V1.0.4 Clause 8.3
            testcase TC_IS_TLC_MSGF_BV_03 () runs on ItsSremSsem system ItsSremSsemSystem {
            } // End of testcase TC_IS_TLC_MSGF_BV_03
        } // End of group sreMessageProcessing
        
    } // End of group iTS_SRole
    
    group rsuRole {
        
        group sreMessageDisseminationRsu { 
            
            group sreMessageFormatRsu { 
                
                 * @desc Check that protocolVersion is set to 1 and messageID is set to 10 (TLC-S)
                 * <pre>
garciay's avatar
garciay committed
                 * Pics Selection: PICS_SSEM_GENERATION
                 * Initial conditions: 
                 *   with {
                 *        the IUT being in the "initial state"
                 *    }
                 * Expected behaviour:
                 *    ensure that {
                 *        when { 
                 *            the IUT having receive a valid SREM
                 *        }
                 *        then {
garciay's avatar
garciay committed
                 *            the IUT sends a valid SSEM
                 *                containing ITS PDU header
                 *                    containing protocolVersion
                 *                        indicating value '1'
                 *                    and containing messageID
                 *                        indicating value '10'
                 *        }
                 *    }
                 * </pre>
                 * 
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_MSGF_BV_04
garciay's avatar
garciay committed
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.3
garciay's avatar
garciay committed
                testcase TC_IS_TLC_MSGF_BV_04 () runs on ItsSremSsem system ItsSremSsemSystem {
                    
                    f_IS_TLC_MSGF_BV_04();
                    
                } // End of testcase TP_IS_TLC_MSGF_BV_04
                
            } // End of group sreMessageFormatRsu 
            
            group sreCommunicationRsu {
                
            } // End of group sreCommunicationRsu
            
        } // End of group sreMessageDisseminationRsu
            /**
             * @desc Check that the IUT can successfully process all mandatory fields of SREM received (TLC-S)
             * <pre>
garciay's avatar
garciay committed
             * Pics Selection: PICS_SREM_RECEPTION
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            the IUT having receive a valid SREM
             *        }
             *        then {
             *            the IUT forwards the SSEM content to upper layers
             *            and the IUT forwards the SSEM content to other facilities
             *        }
             *    }
             * </pre>
             * 
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_MSGF_BV_02
             * @reference ETSI TS 103 301 V1.0.4 Clause 6.3
             */
            testcase TC_IS_TLC_MSGF_BV_02 () runs on ItsSremSsem system ItsSremSsemSystem {
                f_IS_TLC_MSGF_BV_02();
                
            } // End of testcase TP_IS_TLC_MSGF_BV_02
            
        } // End of group sreMessageProcessing
} // End of module ItsSrem_TestCases