ItsMapem_TestCases.ttcn 13.3 KB
Newer Older
1
/**
garciay's avatar
garciay committed
2
 *    @author   ETSI / STF517
3
4
 *    @version  $URL$
 *              $Id$
garciay's avatar
garciay committed
5
 *    @desc     MAPEM Testcases (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.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 *
 */

module ItsMapem_TestCases {
    
    // LibItsMapemSpatem
    import from LibItsMapemSpatem_TestSystem all;
    
    // ItsMapemSpatem
    import from ItsMapem_TpFunctions all;
    
    group mapeMessageDissemination { 
        
        group mapeMessageFormat { 
            
            /**
             * @desc Check that protocolVersion is set to 1 and messageID is set to 4
             * <pre>
garciay's avatar
garciay committed
28
             * Pics Selection: PICS_MAPEM_GENERATION
29
30
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"
             *        and the IUT sending MAPEM
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            a MAPEM is generated
             *        }
             *        then {
             *            the IUT sends a valid MAPEM
             *                containing ITS PDU header
             *                    containing protocolVersion
             *                        indicating value '1'
             *                    and containing messageID
             *                        indicating value '5'
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
51
52
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_MSGF_BV_01
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.3
53
54
55
56
57
58
59
60
61
             */
            testcase TC_IS_RLT_MSGF_BV_01 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_MSGF_BV_01();
                
            } // End of testcase TC_IS_RLT_MSGF_BV_01
            
        } // End of group mapeMessageFormat
        
garciay's avatar
garciay committed
62
        group mapeEventGeneration { 
63
64
65
66
            
            /**
             * @desc Check that IVI Service generates a new MAPEM on reception of a valid AppMAPEM_Trigger request
             * <pre>
garciay's avatar
garciay committed
67
             * Pics Selection: PICS_MAPEM_GENERATION
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT sending MAPEM
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            a MAPEM is generated
             *        }
             *        then {
             *            the IUT sends a valid MAPEM
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
85
86
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_EVGN_BV_01
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.1
87
88
89
90
91
92
93
94
             */
            testcase TC_IS_RLT_EVGN_BV_01 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_EVGN_BV_01();
                
            } // End of testcase TC_IS_RLT_EVGN_BV_01
            
            /**
garciay's avatar
garciay committed
95
             * @desc Check that RLT Service transmits new content
96
             * <pre>
garciay's avatar
garciay committed
97
             * Pics Selection: PICS_MAPEM_GENERATION
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT sending MAPEM
             *            containing map
             *                not containing LayerType
             *                and not containing LayerID
             *                and containing restrictionList
             *                    indicating the value RL_1
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            the IUT is alerted about a new restrictionList indicating the value RL_2
             *        }
             *        then {
             *            the IUT sends a valid MAPEM
             *                containing map
             *                    not containing LayerType
             *                    and not containing LayerID
             *                    and containing restrictionList
             *                        indicating indicating the value R_2
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
125
126
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_EVGN_BV_02
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.1
127
128
129
130
131
132
133
             */
            testcase TC_IS_RLT_EVGN_BV_02 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_EVGN_BV_02();
                
            } // End of testcase TC_IS_RLT_EVGN_BV_02
            
garciay's avatar
garciay committed
134
135
136
            /**
             * @desc Check that RLT Service transmits fragmented MAPEM when the message size exceeds the allowed message length 
             * <pre>
garciay's avatar
garciay committed
137
             * Pics Selection: PICS_MAPEM_GENERATION
garciay's avatar
garciay committed
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
163
164
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT has sent a MAPEM
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            the IUT is alerted about a new content
             *                indicating a new value which exceeds the allowed message length 
             *        }
             *        then {
             *            the IUT sends a first valid MAPEM
             *            containing map
             *                containing LayerType
             *                and containing LayerID
             *                    indication a value LID_1
             *            and the IUT sends a second valid MAPEM
             *                containing map
             *                    containing LayerType
             *                    and containing LayerID
             *                        indication a value LID_2 = LID_1 + 1
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
165
166
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_EVGN_BV_03
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.1
garciay's avatar
garciay committed
167
168
169
170
171
172
173
             */
            testcase TC_IS_RLT_EVGN_BV_03 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_EVGN_BV_03();
                
            } // End of testcase TC_IS_RLT_EVGN_BV_03
            
garciay's avatar
garciay committed
174
        } // End of group mapeEventGeneration
175
176
177
178
179
180
        
        group mapeCommunication {
            
            /**
             * @desc Check that the RLT Service transmits continuously both MAPEM and SPATEM
             * <pre>
garciay's avatar
garciay committed
181
             * Pics Selection: PICS_MAPEM_GENERATION and PICS_SPATEM_GENERATION
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT sending MAPEM
             *        and the IUT has not sent any SPATEM yet
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            the IUT receives an AppSPATEM_Start request from the application layer
             *        }
             *        then {
             *            the IUT sends a valid SPATEM
             *            and the IUT sends a valid MAPEM
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
201
202
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_COMM_BV_01
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.3.1
203
204
205
206
207
208
209
210
211
212
             */
            testcase TC_IS_RLT_COMM_BV_01 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_COMM_BV_01();
                
            } // End of testcase TC_IS_RLT_COMM_BV_01
            
            /**
             * @desc Check that MAPEM uses BTP_B packet
             * <pre>
garciay's avatar
garciay committed
213
             * Pics Selection: PICS_MAPEM_GENERATION
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT sending MAPEM 
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            a MAPEM is generated
             *        }
             *        then {
             *            the IUT sends a valid MAPEM
             *                encapsulated in a BTP-B packet
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
232
233
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_COMM_BV_02_01
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.3.2
234
235
236
237
238
239
240
241
242
243
             */
            testcase TC_IS_RLT_COMM_BV_02_01 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_COMM_BV_02_01();
                
            } // End of testcase TC_IS_RLT_COMM_BV_02_01
            
            /**
             * @desc Check that the destination port for MAPEM is set to 2003
             * <pre>
garciay's avatar
garciay committed
244
             * Pics Selection: PICS_MAPEM_GENERATION
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT sending MAPEM 
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            a MAPEM is generated
             *        }
             *        then {
             *            the IUT sends a valid MAPEM
             *                encapsulated in a BTP packet
             *                   containing a destination port value set to 2003
             *                   and containing a destination port info value set to 0
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
265
266
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_COMM_BV_02_02
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.3.2
267
268
269
270
271
272
273
274
275
276
             */
            testcase TC_IS_RLT_COMM_BV_02_02 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_COMM_BV_02_02();
                
            } // End of testcase TC_IS_RLT_COMM_BV_02_02
            
            /**
             * @desc Check that TLM service encapsulates MAPEM in a GBC with the HeaderType field set to the value of 4
             * <pre>
garciay's avatar
garciay committed
277
             * Pics Selection: PICS_MAPEM_GENERATION
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
             * Initial conditions: 
             *   with {
             *        the IUT being in the "initial state"
             *        and the IUT sending MAPEM
             *    }
             * Expected behaviour:
             *    ensure that {
             *        when { 
             *            a MAPEM is generated
             *        }
             *        then {
             *            the IUT sends a valid MAPEM
             *                encapsulated in a GBC packet
             *                    containing a correctly formatted Common Header
             *                        containing HeaderType field
             *                            indicating the value '4'
             *        }
             *    }
             * </pre>
             * 
             * @version   1.0.4
garciay's avatar
garciay committed
299
300
             * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_COMM_BV_03
             * @reference ETSI TS 103 301 v1.0.4 Clause 6.4.3.1
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
             */
            testcase TC_IS_RLT_COMM_BV_03 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
                
                f_IS_RLT_COMM_BV_03();
                
            } // End of testcase TC_IS_RLT_COMM_BV_03
            
        } // End of group mapeCommunication 
        
    } // End of group mapeMessageDissemination
    
    group mapeMessageProcessing {
        
        /**
         * @desc Check that the IUT can successfully process all mandatory fields of MAPEM received
         * <pre>
garciay's avatar
garciay committed
317
         * Pics Selection: PICS_MAPEM_RECEPTION
318
319
320
         * Initial conditions: 
         *   with {
         *        the IUT being in the "initial state"
321
         *        and the IUT having receive a valid MAPEM
322
323
324
325
326
327
328
329
330
331
332
333
334
335
         *    }
         * Expected behaviour:
         *    ensure that {
         *        when { 
         *            the IUT receives a valid MAPEM
         *        }
         *        then {
         *            the IUT forwards the MAPEM content to upper layers
         *            and the IUT forwards the MAPEM content to other facilities
         *        }
         *    }
         * </pre>
         * 
         * @version   1.0.4
garciay's avatar
garciay committed
336
337
         * @see       ETSI TS 103 191-2 v1.2.1 TP_IS_RLT_MSGF_BV_02
         * @reference ETSI TS 103 301 v1.0.4 Clause 6.3
338
339
340
341
342
343
344
345
346
347
         */
        testcase TC_IS_RLT_MSGF_BV_02 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
            
            f_IS_RLT_MSGF_BV_02();
            
        } // End of testcase TC_IS_RLT_MSGF_BV_02
        
    } // End of group mapeMessageProcessing
    
} // End of module ItsMapem_TestCases