ItsSrem_TestCases.ttcn 14.5 KB
Newer Older
garciay's avatar
garciay committed
1 2 3 4
/**
 *    @author   ETSI / STF517
 *    @version  $URL$
 *              $Id$
5
 *    @desc     SREM Testcases (ETSI TS 103 191-2 v1.2.1)
garciay's avatar
garciay committed
6 7 8 9
 *    @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
10 11 12
 *
 */

13
module ItsSrem_TestCases {
garciay's avatar
garciay committed
14 15 16 17 18 19 20
    
    // LibItsMapemSpatem
    import from LibItsSremSsem_TestSystem all;
    
    // ItsMapemSpatem
    import from ItsSrem_TpFunctions all;
    
21
    group iTS_SRole {
garciay's avatar
garciay committed
22
        
23
        group sreMessageDissemination { 
garciay's avatar
garciay committed
24
            
25 26
            group sreMessageFormat { 
                
27
                /**
garciay's avatar
garciay committed
28
                 * @desc Check that protocolVersion is set to 1 and messageID is set to 9
29
                 * <pre>
garciay's avatar
garciay committed
30
                 * Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
                 * 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>
                 * 
51
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_MSGF_BV_01
garciay's avatar
garciay committed
52
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.3
53
                 */
garciay's avatar
garciay committed
54
                testcase TC_IS_RLT_MSGF_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem {
55 56 57
                    
                    f_IS_TLC_MSGF_BV_01();
                    
garciay's avatar
garciay committed
58
                } // End of testcase TC_IS_RLT_MSGF_BV_01
59 60 61
                
            } // End of group sreMessageFormat 
            
garciay's avatar
garciay committed
62 63
            group sreEventGeneration {
                
64
                /**
garciay's avatar
garciay committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
                 * @desc Check that IVI Service generates a new SREM on reception of a valid AppSREM_Trigger request
                 * <pre>
                 * Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
                 * 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>
                 * 
83
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_EVGN_BV_01
garciay's avatar
garciay committed
84 85
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.1
                 */
garciay's avatar
garciay committed
86
                testcase TC_IS_TLC_EVGN_BV_01 () runs on ItsSremSsem system ItsSremSsemSystem {
garciay's avatar
garciay committed
87 88 89
                    
                    f_IS_TLC_EVGN_BV_01();
                    
garciay's avatar
garciay committed
90
                } // End of testcase TC_IS_TLC_EVGN_BV_01
garciay's avatar
garciay committed
91
                
92
                /**
garciay's avatar
garciay committed
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
                 * @desc Check that the IUT identifies SREM with a unique request identifier
                 * <pre>
                 * Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
                 * 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>
                 * 
116
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_EVGN_BV_02
garciay's avatar
garciay committed
117 118
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.1
                 */
garciay's avatar
garciay committed
119
                testcase TC_IS_TLC_EVGN_BV_02 () runs on ItsSremSsem system ItsSremSsemSystem {
garciay's avatar
garciay committed
120 121 122
                    
                    f_IS_TLC_EVGN_BV_02();
                    
garciay's avatar
garciay committed
123
                } // End of testcase TC_IS_TLC_EVGN_BV_02
garciay's avatar
garciay committed
124 125 126
                
            } // End of group sreEventGeneration
            
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
            group sreEventUpdate {
                
                /**
                 * @desc Check that the IUT increments the sequenceNumber when a SREM update is generated
                 * <pre>
                 * Pics Selection: not PICS_RSU and 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>
                 * 
163
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_EVUP_BV_01
164 165 166 167 168 169 170 171 172 173
                 * @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
            
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
            group sreCommunication {
                
                /**
                 * @desc Check that SREM uses BTP_B packet
                 * <pre>
                 * Pics Selection: not PICS_RSU and 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>
                 * 
197
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_COMM_BV_01_01
garciay's avatar
garciay committed
198
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.3.3
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
                 */
                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>
                 * Pics Selection: not PICS_RSU and 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>
                 * 
229
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_COMM_BV_01_02
garciay's avatar
garciay committed
230
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.4.3.3
231 232 233 234 235 236 237 238 239 240 241 242 243 244
                 */
                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
245
             * @desc Check that the IUT can successfully process all mandatory fields of SSEM received
garciay's avatar
garciay committed
246
             * <pre>
247
             * Pics Selection: not PICS_RSU and PICS_SSEM_RECEPTION
garciay's avatar
garciay committed
248 249 250
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
251
             *        and the IUT having send a valid SREM
garciay's avatar
garciay committed
252 253 254 255
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
256
             *            the IUT receives a valid SSEM
garciay's avatar
garciay committed
257 258
             *        }
             *        then {
259 260
             *            the IUT forwards the SSEM content to upper layers
             *            and the IUT forwards the SSEM content to other facilities
garciay's avatar
garciay committed
261 262 263 264
             *        }
             *    }
             * </pre>
             * 
265
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_MSGF_BV_03
266
             * @reference ETSI TS 103 301 V1.0.4 Clause 8.3
garciay's avatar
garciay committed
267
             */
268
            testcase TC_IS_TLC_MSGF_BV_03 () runs on ItsSremSsem system ItsSremSsemSystem {
garciay's avatar
garciay committed
269
                
270
                f_IS_TLC_MSGF_BV_03();
garciay's avatar
garciay committed
271
                
272
            } // End of testcase TC_IS_TLC_MSGF_BV_03
garciay's avatar
garciay committed
273
            
274 275 276 277 278 279
        } // End of group sreMessageProcessing
        
    } // End of group iTS_SRole
    
    group rsuRole {
        
280 281 282 283
        group sreMessageDisseminationRsu { 
            
            group sreMessageFormatRsu { 
                
284
                /**
285 286
                 * @desc Check that protocolVersion is set to 1 and messageID is set to 10 (TLC-S)
                 * <pre>
garciay's avatar
garciay committed
287
                 * Pics Selection: PICS_RSU and PICS_SSEM_GENERATION
288 289 290 291 292 293 294 295 296 297
                 * 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
298
                 *            the IUT sends a valid SSEM
299 300 301 302 303 304 305 306 307
                 *                containing ITS PDU header
                 *                    containing protocolVersion
                 *                        indicating value '1'
                 *                    and containing messageID
                 *                        indicating value '10'
                 *        }
                 *    }
                 * </pre>
                 * 
308
                 * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_MSGF_BV_04
garciay's avatar
garciay committed
309
                 * @reference ETSI TS 103 301 V1.0.4 Clause 8.3
310
                 */
garciay's avatar
garciay committed
311
                testcase TC_IS_TLC_MSGF_BV_04 () runs on ItsSremSsem system ItsSremSsemSystem {
312 313 314 315 316 317 318 319 320 321 322 323
                    
                    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
324
        
325 326
        group sreMessageProcessing {
            
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
            /**
             * @desc Check that the IUT can successfully process all mandatory fields of SREM received (TLC-S)
             * <pre>
             * Pics Selection: PICS_RSU and PICS_SREM_GENERATION
             * 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>
             * 
347
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_TLC_MSGF_BV_02
348 349 350
             * @reference ETSI TS 103 301 V1.0.4 Clause 6.3
             */
            testcase TC_IS_TLC_MSGF_BV_02 () runs on ItsSremSsem system ItsSremSsemSystem {
351
                
352 353 354 355
                f_IS_TLC_MSGF_BV_02();
                
            } // End of testcase TP_IS_TLC_MSGF_BV_02
            
356
        } // End of group sreMessageProcessing
garciay's avatar
garciay committed
357
        
358
    } // End of group rsuRole
garciay's avatar
garciay committed
359
    
360
} // End of module ItsSrem_TestCases