OneM2M_Testcases_CSE_Release_2.ttcn 155 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
 *  @author     ETSI
 *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
 *              $Id: OneM2M_Testcases.ttcn 347 2017-08-11 08:48:20Z reinaortega $
 *  @desc       Module containing test cases for oneM2M
 *
 */
module OneM2M_Testcases_CSE_Release_2 {

	import from OneM2M_TestSystem all;
	import from OneM2M_Templates all;
	import from OneM2M_Types all;//{type XSD.ID};
	import from OneM2M_TypesAndValues all;
	import from OneM2M_Pixits all;
	import from LibCommon_Time all;
	import from OneM2M_Pics all;
	import from OneM2M_Functions all;
	import from OneM2M_PermutationFunctions all;
	import from XSD all;
	
	//Demos used for validation purposes
	group oneM2M_demos {
	
		group helpingTestCases {//These are not part of the test suite, just for verification purposes
			
			testcase TC_DELETE_RESOURCES() runs on AeSimu system CseSystem {
				
				timer t_ac := 5.0;
				var integer i; 
				var XSD.ID v_resourceAddress;
				var RequestPrimitive v_request;
				map(self:mcaPort, system:mcaPort); 
					
				for (i:=0; i<lengthof(PX_RESOURCES_TO_BE_DELETED); i:= i+1) {  
					
					v_resourceAddress := f_getResourceAddress() & "/" & PX_RESOURCES_TO_BE_DELETED[i]; 
						
					v_request := valueof(m_delete(v_resourceAddress, PX_SUPER_AE_ID));
					    
46
					mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
					
					t_ac.start;
					alt {
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
							t_ac.stop;
							log(__SCOPE__ & ":Resource deleted");
							setverdict(pass);
						}
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
							t_ac.stop;
							log(__SCOPE__ & ":Error while deleting resource");
							setverdict(fail);
						}
						[] mcaPort.receive {
							t_ac.stop;
							log(__SCOPE__ & ":Unexpected message received");
							setverdict(inconc);
						}
						[] t_ac.timeout {
							log(__SCOPE__ & ":No answer while deleting resource");
							setverdict(inconc);
						}	
					}	
				}
			
				unmap(self:mcaPort, system:mcaPort); 
				stop;
			}	
		
		}//end group helpingTestCases
	
	}//end group oneM2M_demos
	
	group CSE {
		
		group Generic {
			
			group Create {
				
			} // end of group Create
			
			group Retrieve {
			} // end of group Retrieve
			
			group Update {
			} // end of group Update
			
			group Delete {
			} // end of group Delete
		
		} // end of group Generic
		
		group Registration {
			
			group Create{
				
				/**
				 * @desc Check that IUT accepts  a CSE registration request with OPTIONAL_ATTRIBUTE attribute
				 * 
				 */
				group g_CSE_REG_CRE_028 {
				
					testcase TC_CSE_REG_CRE_028_RN() runs on Tester system CseSystem {
						 //Local variables
						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
112
						
113 114
						 var RequestPrimitive v_request;
						 var template PrimitiveContent v_contentResponse;
115 116
						 v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
						 v_request := valueof(m_createRemoteCSEBase);
						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
						 v_request.primitiveContent.remoteCSE.resourceName := c_defaultRemoteCSEResourceName;
	
						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
					     v_contentResponse.remoteCSE.resourceName := c_defaultRemoteCSEResourceName;
	
						 v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse));
						 v_cse1.done;
						
					}
					
					testcase TC_CSE_REG_CRE_028_ET() runs on Tester system CseSystem {
						 //Local variables
						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
133
						
134 135
						 var RequestPrimitive v_request;
						 var template PrimitiveContent v_contentResponse;
136 137
						 v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
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 165 166 167 168 169 170 171 172
						 v_request := valueof(m_createRemoteCSEBase);
						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
						 v_request.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
	
						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
						 v_contentResponse.remoteCSE.expirationTime := "20301231T012345";
	
						 v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse));
						 v_cse1.done;
		
					}
					
				}//end g_CSE_REG_CRE_028
			
			}	//end group Create
			
			group Retrieve{
				
				
			}//end group Retrieve
			
			group Update{
			
				/**
				 * @desc Check that the IUT accepts an update request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE.
				 * 
				 */
				 
				group g_CSE_REG_UPD_002 {
					
					testcase TC_CSE_REG_UPD_002_ET() runs on Tester system CseSystem {
						// Local variables
						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
173 174
						v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
175 176 177 178 179 180 181 182 183 184 185 186
    						
						v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
	
						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
						v_cse1.done;
						
					}
					
					testcase TC_CSE_REG_UPD_002_RR() runs on Tester system CseSystem {
						// Local variables
						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
187 188
						v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208

						v_updateRequest.primitiveContent.remoteCSE.requestReachability := true;

						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
						v_cse1.done;

					}
							
				} //end g_CSE_REG_UPD_002
			    
			}// end group Update
			
			group Delete{
			
			}// end group Delete
	  	  	
		}//end Registration
		
		group Data_Management_and_Repository {
						
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
			group g_CSE_DMR_001 {
		
				/**
				 * @desc Check that the IUT rejects a Non-Blocking Synchronous Request if the IUT does not support the <request> resource
				 * 
				 */
				testcase TC_CSE_DMR_001_CRE() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_cse1.start(f_CSE_DMR_001(v_createRequest)); //Create Container
					v_cse1.done;
			
				}
				
				testcase TC_CSE_DMR_001_UPD() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var template RequestPrimitive v_updateRequest := m_updateContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
					var Labels v_labels_1 := {"VALUE_1"};
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_updateRequest.primitiveContent.container.labels := v_labels_1;
			
					v_cse1.start(f_CSE_DMR_001(v_updateRequest)); //Update Container
					v_cse1.done;
	  
				}

				testcase TC_CSE_DMR_001_RET() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_cse1.start(f_CSE_DMR_001(m_retrieve("NotInitialized", "NotInitialized"))); //Retrieve Container
					v_cse1.done;
	
				}
		
				testcase TC_CSE_DMR_001_DEL() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_cse1.start(f_CSE_DMR_001(m_delete("NotInitialized", "NotInitialized"))); //Delete Container
					v_cse1.done;

				}

			}// end group g_CSE_DMR_001
			
			group g_CSE_DMR_002 {
				
				/**
				 * @desc Check that the IUT rejects a Non-Blocking Synchronous Request if the IUT does not support the <request> resource
				 * 
				 */
				testcase TC_CSE_DMR_002_CRE() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_ae1.start(f_CSE_DMR_002(v_createRequest)); //Create Container
					v_ae1.done;
				
				}
					
				testcase TC_CSE_DMR_002_UPD() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var template RequestPrimitive v_updateRequest := m_updateContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
					var Labels v_labels_1 := {"VALUE_1"};
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_updateRequest.primitiveContent.container.labels := v_labels_1;
				
					v_ae1.start(f_CSE_DMR_002(v_updateRequest)); //Update Container
					v_ae1.done;
		  
				}
	
				testcase TC_CSE_DMR_002_RET() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_ae1.start(f_CSE_DMR_002(m_retrieve("NotInitialized", "NotInitialized"))); //Retrieve Container
					v_ae1.done;
		
				}
			
				testcase TC_CSE_DMR_002_DEL() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_ae1.start(f_CSE_DMR_002(m_delete("NotInitialized", "NotInitialized"))); //Delete Container
					v_ae1.done;
	
				}
			}// end group g_CSE_DMR_002
			
328 329 330 331 332 333 334 335
			group Create {
				
				group g_CSE_DMR_CRE_001 {
					
					/**
					 * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource on the TARGET_RESOURCE_ADDRESS of type PARENT_RESOURCE_TYPE with resource name not provided
					 * 
					 */
336
					testcase TC_CSE_DMR_CRE_001_PCH_AE() runs on Tester system CseSystem {
337
						// Local variables
338
						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
339 340
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
341 342
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
343
						
344 345 346 347
						
						v_createRequest.primitiveContent.pollingChannel.resourceName := omit;

						v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit)));//PollingChannel
348 349 350
						v_ae1.done;
						
						 
351
												
352
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
353
							if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
354
								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
355 356 357 358 359
							}
						}
						
					}
					
360 361 362 363 364 365 366 367 368
				} // end g_CSE_DMR_CRE_001
								
				group g_CSE_DMR_CRE_002 {
					
					/**
					 * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with a non-existing resource name provided by AE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_002_PCH() runs on Tester system CseSystem {
369 370 371
						// Local variables
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
372 373
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
374 375
			
						v_ae1.start(f_CSE_DMR_CRE_002(int15, m_createPollingChannelBase));//Pollingchannel
376 377 378
						v_ae1.done;
						
						 
379
												
380
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
381
							if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
382
								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
383 384 385 386
							} else {
								if(v_responsePrimitive.primitiveContent.pollingChannel.resourceName != c_defaultPollingChannelResourceName){
									setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not correct");
								}
387 388 389
							}
						}
					}
390 391
					
				}// end group g_CSE_DMR_CRE_002
392
				
393 394 395 396 397 398 399 400
				group g_CSE_DMR_CRE_003 {
					
					/**
					 * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource with an existing resource name provided by AE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_003_PCH() runs on Tester system CseSystem {
						// Local variables                        
401
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
402 403
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
404 405

						v_ae1.start(f_CSE_DMR_CRE_003(int15, m_createPollingChannelBase));//Pollingchannel
406 407 408
						v_ae1.done;
					}
					
409 410 411 412 413 414 415 416 417
				}// end group g_CSE_DMR_CRE_003
				
				group g_CSE_DMR_CRE_004 {
					
					/**
					 * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource when AE has no privileges
					 * 
					 */
					testcase TC_CSE_DMR_CRE_004_PCH() runs on Tester system CseSystem {
418
						// Local variables
419
                        
420
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
421 422
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
423

424
						v_ae1.start(f_CSE_DMR_CRE_004(int15, m_createPollingChannelBase));//Pollingchannel
425 426 427
						v_ae1.done;
					}
					
428 429 430 431 432 433 434 435 436
				}// end group g_CSE_DMR_CRE_004
				
				group g_CSE_DMR_CRE_006 {
					
					/**
					 * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a RESOURCE_TYPE resource CREATE Request where no a RW ATTRIBUTE is provided by AE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_006_CNT_MNI() runs on Tester system CseSystem {
437
						// Local variables
438
						var template RequestPrimitive v_createRequest := m_createContainerBase;
439 440
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
441
		
442 443
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
444 445 446
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));		
						v_ae1.done;		 
														
447
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
448 449 450 451
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){
								setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided");
							} 
						}	
452
					}
453 454
	
					testcase TC_CSE_DMR_CRE_006_CNT_MBS() runs on Tester system CseSystem {
455
						// Local variables
456
						var template RequestPrimitive v_createRequest := m_createContainerBase;
457 458
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
459
		
460 461
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
462
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));
463
						v_ae1.done;
464
																				
465
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
466 467 468 469 470
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){
								setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided");
							} 
						}	
		  
471
					}
472
	
473 474
					testcase TC_CSE_DMR_CRE_006_CNT_MIA() runs on Tester system CseSystem {
						// Local variables
475 476
						var template RequestPrimitive v_createRequest := m_createContainerBase;
						var ResponsePrimitive v_responsePrimitive;
477 478 479 480
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
								
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
481
						
482 483 484 485 486 487 488 489
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));
						v_ae1.done;		 
														
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){
								setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided");
							} 
						}	
490 491
					}
					
492 493 494 495 496 497 498 499 500 501 502 503 504 505
				}// end group g_CSE_DMR_CRE_006
				
				group g_CSE_DMR_CRE_007 {
					
					/**
					 * @desc Checks that the IUT accepts a newly created RESOURCE_TYPE when the currentNrOfInstances exceeds the field value set in maxNrOfInstances in the PARENT_RESOURCE_TYPE resource by removing enough of the oldest RESOURCE_TYPE resources to allow the creation of the new RESOURCE_TYPE resource
					 * 
					 */
					testcase TC_CSE_DMR_CRE_007_CNT_CIN() runs on Tester system CseSystem {
						// Local variables		
						var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
						var template RequestPrimitive v_createRequestContentInstance1 := m_createContentInstanceBase;
						var template RequestPrimitive v_createRequestContentInstance2 := m_createContentInstanceBase;
						const integer c_maxNumberOfInstances := 1;	
506
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
507
						
508 509
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
510 511
						v_createRequestContainer.primitiveContent.container.maxNrOfInstances := c_maxNumberOfInstances;
						v_createRequestContentInstance2.primitiveContent.contentInstance.resourceName := c_defaultContentInstanceResourceName & "2";	//Resource 2
512

513 514
						v_ae1.start(f_CSE_DMR_CRE_007(int3, v_createRequestContainer, int4, v_createRequestContentInstance1, v_createRequestContentInstance2, c_defaultContentInstanceResourceName));//ContentInstance under Container
						v_ae1.done;
515
					}
516 517 518 519
	
				}// end group g_CSE_DMR_CRE_007
				
				group g_CSE_DMR_CRE_008 {
520
					
521 522 523 524 525 526 527 528 529 530 531 532
					/**
					 * @desc Checks that the IUT accepts a newly created RESOURCE_TYPE when the currentNrOfInstances exceeds the field value set in maxNrOfInstances in the PARENT_RESOURCE_TYPE resource by removing enough of the oldest RESOURCE_TYPE resources to allow the creation of the new RESOURCE_TYPE resource
					 * 
					 */
					testcase TC_CSE_DMR_CRE_008_CNT_CIN() runs on Tester system CseSystem {
						// Local variables		
						var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
						var template RequestPrimitive v_createRequestContentInstance1 := m_createContentInstanceBase;
						var template RequestPrimitive v_createRequestContentInstance2 := m_createContentInstanceBase;
						const integer c_maxByteSize := 10;	
						const XSD.String c_primitiveContent1 := "Content1";
						const XSD.String c_primitiveContent2 := "Content2";		
533
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
534
		
535 536
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
537 538 539 540 541 542 543
						v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;
						v_createRequestContentInstance1.primitiveContent.contentInstance.content := c_primitiveContent1;	//ContentInstance 1
						v_createRequestContentInstance2.primitiveContent.contentInstance.content := c_primitiveContent2;	//ContentInstance 2
						v_createRequestContentInstance2.primitiveContent.contentInstance.resourceName := c_defaultContentInstanceResourceName & "2";	//ContentInstance 2

						v_ae1.start(f_CSE_DMR_CRE_007(int3, v_createRequestContainer, int4, v_createRequestContentInstance1, v_createRequestContentInstance2, c_defaultContentInstanceResourceName));//ContentInstance under Container
						v_ae1.done;
544
					}
545 546 547 548 549

				}// end group g_CSE_DMR_CRE_008
				
				
				group g_CSE_DMR_CRE_013 {
550
					
551 552 553 554 555 556 557 558 559
					/**
					 * @desc Check that the IUT rejects the CREATE Request of a RESOURCE_TYPE resource with error “NOT_ACCEPTABLE” when contentSize exceeds maxByteSize of the PARENT_RESOURCE_TYPE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_013_CNT_CIN() runs on Tester system CseSystem {
						// Local variables		
						var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
						var template RequestPrimitive v_createRequestContentInstance := m_createContentInstanceBase;
						const integer c_maxByteSize := 1;		
560
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
561
		
562 563
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
564 565 566
						v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;

						v_ae1.start(f_CSE_DMR_CRE_013(int3, v_createRequestContainer, int4, v_createRequestContentInstance));//ContentInstance under Container
567 568
						v_ae1.done;
					}
569 570 571 572

				}// end group g_CSE_DMR_CRE_013
				
				group g_CSE_DMR_CRE_015 {
573
					
574 575 576 577 578
					/**
					 * @desc Check that the IUT returns successfully after a CREATE request an empty content of created resource when the ResultContent set to 0 (Nothing)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_015_CNT() runs on Tester system CseSystem {
579 580
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
581 582
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
583 584
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int3, m_createContainerBase));//Container
585 586
						v_ae1.done;
					}
587 588

					testcase TC_CSE_DMR_CRE_015_GRP() runs on Tester system CseSystem {
589
						// Local variables
590
						
591
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
592 593
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
594 595
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int9, m_createGroupBase));//Group
596 597 598
						v_ae1.done;
					}
					
599
					testcase TC_CSE_DMR_CRE_015_ACP() runs on Tester system CseSystem {
600
						// Local variables
601
							
602
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
603 604
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
605 606
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int1, m_createAcpBase));//AccessControlPolicy
607 608
						v_ae1.done;
					}
609 610
				
					testcase TC_CSE_DMR_CRE_015_SUB() runs on Tester system CseSystem {
611
						// Local variables
612
						
613
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
614 615
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
616 617
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int23, m_createSubscriptionBase));//Subscription
618 619
						v_ae1.done;
					}
620 621 622 623
				
				} // end g_CSE_DMR_CRE_015							

				group g_CSE_DMR_CRE_016 {
624
					
625 626 627 628 629
					/**
					 * @desc Check that the IUT returns successfully after a CREATE request only hierarchichal address of the created resource when the Result Content is set to 2 (hierarchical address)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_016_CNT() runs on Tester system CseSystem {
630
						// Local variables
631
						var template PrimitiveContent v_contentResponse;
632
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
633 634
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
635
					
636 637 638 639 640 641 642
						v_contentResponse.uRI := mw_contentContainer_rc2;
					                        
						v_ae1.start(f_CSE_DMR_CRE_016(int3, m_createContainerBase, v_contentResponse));//Container
						v_ae1.done;
					}

					testcase TC_CSE_DMR_CRE_016_GRP() runs on Tester system CseSystem {
643
						// Local variables
644 645
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
646 647
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
648
					
649
						v_contentResponse.uRI := mw_contentGroup_rc2;
650
					
651 652
						v_ae1.start(f_CSE_DMR_CRE_016(int9, m_createGroupBase, v_contentResponse));//Group
						v_ae1.done;
653 654
					}
					
655
					testcase TC_CSE_DMR_CRE_016_ACP() runs on Tester system CseSystem {
656
						// Local variables
657
						var template PrimitiveContent v_contentResponse;
658
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
659 660
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
661 662 663 664 665
											
						v_contentResponse.uRI := mw_contentAcp_rc2;
						
						v_ae1.start(f_CSE_DMR_CRE_016(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
						v_ae1.done;
666
					}
667 668
				
					testcase TC_CSE_DMR_CRE_016_SUB() runs on Tester system CseSystem {
669
						// Local variables
670
						var template PrimitiveContent v_contentResponse;
671
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
672 673
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
674 675 676 677
											
						v_contentResponse.uRI := mw_contentSubscription_rc2;

						v_ae1.start(f_CSE_DMR_CRE_016(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
678 679
						v_ae1.done;
					}
680
					
681 682 683 684 685 686 687 688 689
				} // end g_CSE_DMR_CRE_016	
							
				group g_CSE_DMR_CRE_017 {
					
					/**
					 * @desc Check that the IUT returns successfully after a CREATE request only attributes and hierarchichal address of the created resource when Result Content is set 3 (attributes and hierarchichal address)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_017_CNT() runs on Tester system CseSystem {
690
						// Local variables
691
						var template PrimitiveContent v_contentResponse;
692
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
693 694
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
695 696 697 698
					
						v_contentResponse.resource := mw_contentContainer_rc3;
					                        
						v_ae1.start(f_CSE_DMR_CRE_017(int3, m_createContainerBase, v_contentResponse));//Container
699 700
						v_ae1.done;
					}
701 702

					testcase TC_CSE_DMR_CRE_017_GRP() runs on Tester system CseSystem {
703
						// Local variables
704
						var template PrimitiveContent v_contentResponse;
705
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
706 707
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
708
					
709
						v_contentResponse.resource := mw_contentGroup_rc3;
710
					
711 712 713 714 715
						v_ae1.start(f_CSE_DMR_CRE_017(int9, m_createGroupBase, v_contentResponse));//Group
						v_ae1.done;
					}
					
					testcase TC_CSE_DMR_CRE_017_ACP() runs on Tester system CseSystem {
716
						// Local variables
717
						var template PrimitiveContent v_contentResponse;
718
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
719 720
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
721 722 723 724
					
						v_contentResponse.resource := mw_contentAcp_rc3;
						
						v_ae1.start(f_CSE_DMR_CRE_017(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
725 726
						v_ae1.done;
					}
727 728 729 730

					testcase TC_CSE_DMR_CRE_017_SUB() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
731
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
732 733
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
734 735
					
						v_contentResponse.resource := mw_contentSubscription_rc3;
736

737
						v_ae1.start(f_CSE_DMR_CRE_017(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
738 739
						v_ae1.done;
					}
740 741 742 743 744 745 746 747 748
				
				} // end g_CSE_DMR_CRE_017

				
			}//end group Create
			
			group Retrieve {
				
				group g_CSE_DMR_RET_001 {
749
					
750 751 752 753 754 755 756 757 758
					/**
					 * @desc Check that the IUT returns successfully the TARGET_RESOURCE_ADDRESS resource 
					 * 
					 */
					testcase TC_CSE_DMR_RET_001_PCH() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;						
						var ResponsePrimitive v_responsePrimitive;
						var template PrimitiveContent v_contentResponse;
759 760
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
761 762 763
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
						
						v_ae1.start(f_CSE_DMR_RET_001(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
764
						v_ae1.done;
765
						
766 767
					}
					
768
				} // end g_CSE_DMR_RET_001
769
				
770 771
								
				group g_CSE_DMR_RET_020 {
772 773
					
					/**
774
					 * @desc Check that the IUT rejects a RETRIEVE Request target to TARGET_RESOURCE_ADDRESS resource  when the Result Content set to RESULT_CONTENT
775 776
					 * 
					 */
777
					testcase TC_CSE_DMR_RET_020_RCN_0() runs on Tester system CseSystem {
778 779
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
780 781
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
782
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int0));//ResultContent = 0 (nothing)
783 784
						v_ae1.done;
					}
785 786
	
					testcase TC_CSE_DMR_RET_020_RCN_2() runs on Tester system CseSystem {
787 788
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
789 790
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
791
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int2));//ResultContent = 2 (hierarchical address)
792 793
						v_ae1.done;
					}
794 795
	
					testcase TC_CSE_DMR_RET_020_RCN_3() runs on Tester system CseSystem {
796 797
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
798 799
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
800
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int3));//ResultContent = 3 (attributes and hierarchichal address)
801 802
						v_ae1.done;
					}
803 804 805 806 807
	
				} // end g_CSE_DMR_RET_020

				group g_CSE_DMR_RET_021 {
		
808
					/**
809
					 * @desc Check that the IUT returns successfully only attributes of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 1 (attributes)
810 811
					 * 
					 */
812
					testcase TC_CSE_DMR_RET_021_CNT() runs on Tester system CseSystem {
813 814
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
815 816
						
						var template PrimitiveContent v_contentResponse;
817 818
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
819 820 821 822
						v_contentResponse.container := mw_contentContainer_rc1;
		                        
						v_ae1.start(f_CSE_DMR_RET_021(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
						v_ae1.done;
823
					}
824 825

					testcase TC_CSE_DMR_RET_021_GRP() runs on Tester system CseSystem {
826 827
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
828 829
						
						var template PrimitiveContent v_contentResponse;
830 831
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
832 833 834
						v_contentResponse.group_ := mw_contentGroup_rc1;
		
						v_ae1.start(f_CSE_DMR_RET_021(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
835 836
						v_ae1.done;
					}
837 838
		
					testcase TC_CSE_DMR_RET_021_ACP() runs on Tester system CseSystem {
839 840
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
841 842
						
						var template PrimitiveContent v_contentResponse;
843 844
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
845 846 847 848
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
			
						v_ae1.start(f_CSE_DMR_RET_021(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
						v_ae1.done;
849
					}
850 851
	
					testcase TC_CSE_DMR_RET_021_PCH() runs on Tester system CseSystem {
852 853
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
854 855
						
						var template PrimitiveContent v_contentResponse;
856 857
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
858 859 860 861
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
			
						v_ae1.start(f_CSE_DMR_RET_021(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel
						v_ae1.done;
862
					}
863 864
		
					testcase TC_CSE_DMR_RET_021_SUB() runs on Tester system CseSystem {
865 866
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
867 868
						
						var template PrimitiveContent v_contentResponse;
869 870
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
871
						v_contentResponse.subscription := mw_contentSubscription_rc1;
872

873
						v_ae1.start(f_CSE_DMR_RET_021(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
874
						v_ae1.done;
875
					}
876 877
					
				} // end g_CSE_DMR_RET_021
878

879 880
				group g_CSE_DMR_RET_022 {
		
881
					/**
882
					 * @desc Check that the IUT returns successfully only attributes and child resources of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 4 (attributes and child resources)
883 884
					 * 
					 */
885 886
					testcase TC_CSE_DMR_RET_022_CNT() runs on Tester system CseSystem {
						// Local variables
887 888
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
889
						var template PrimitiveContent v_contentResponse;
890 891
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
892 893 894 895 896
						v_contentResponse.container := mw_contentContainer_rc4;
		                        
						v_ae1.start(f_CSE_DMR_RET_022(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
						v_ae1.done;
					}
897

898 899 900 901 902 903 904 905 906 907
					testcase TC_CSE_DMR_RET_022_GRP() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_contentResponse.group_ := mw_contentGroup_rc4;
		
						v_ae1.start(f_CSE_DMR_RET_022(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
908 909
						v_ae1.done;
					}
910 911 912
		
					testcase TC_CSE_DMR_RET_022_ACP() runs on Tester system CseSystem {
						// Local variables
913 914
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
915
						var template PrimitiveContent v_contentResponse;
916 917
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
918 919 920
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc4;
			
						v_ae1.start(f_CSE_DMR_RET_022(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
921 922 923
						v_ae1.done;
					}
	
924 925
					testcase TC_CSE_DMR_RET_022_PCH() runs on Tester system CseSystem {
						// Local variables
926
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
927 928
						
						var template PrimitiveContent v_contentResponse;
929 930
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
931 932 933
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
			
						v_ae1.start(f_CSE_DMR_RET_022(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel
934 935
						v_ae1.done;
					}
936 937 938
		
					testcase TC_CSE_DMR_RET_022_SUB() runs on Tester system CseSystem {
						// Local variables
939
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
940 941
						
						var template PrimitiveContent v_contentResponse;
942 943
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
944
						v_contentResponse.subscription := mw_contentSubscription_rc4;
945

946
						v_ae1.start(f_CSE_DMR_RET_022(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
947 948
						v_ae1.done;
					}
949
					
950 951 952 953
				} // end g_CSE_DMR_RET_022

				group g_CSE_DMR_RET_023 {
		
954
					/**
955
					 * @desc Check that the IUT returns successfully only attributes and child resource references of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 5 (attributes and child resource references)
956 957
					 * 
					 */
958
					testcase TC_CSE_DMR_RET_023_CNT() runs on Tester system CseSystem {
959
						// Local variables
960 961 962
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
963 964
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
965 966 967
						v_contentResponse.container := mw_contentContainer_rc5;
		                        
						v_ae1.start(f_CSE_DMR_RET_023(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
968 969
						v_ae1.done;
					}
970 971

					testcase TC_CSE_DMR_RET_023_GRP() runs on Tester system CseSystem {
972
						// Local variables
973 974 975
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
976 977
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
978 979 980
						v_contentResponse.group_ := mw_contentGroup_rc5;
		
						v_ae1.start(f_CSE_DMR_RET_023(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
981 982
						v_ae1.done;
					}
983 984
		
					testcase TC_CSE_DMR_RET_023_ACP() runs on Tester system CseSystem {
985
						// Local variables
986 987 988
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
989 990
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
991 992 993
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc5;
			
						v_ae1.start(f_CSE_DMR_RET_023(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
994 995
						v_ae1.done;
					}
996 997
	
					testcase TC_CSE_DMR_RET_023_PCH() runs on Tester system CseSystem {
998
						// Local variables
999 1000
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1001 1002
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1003 1004 1005
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
			
						v_ae1.start(f_CSE_DMR_RET_023(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel
1006 1007
						v_ae1.done;
					}
1008 1009
		
					testcase TC_CSE_DMR_RET_023_SUB() runs on Tester system CseSystem {
1010
						// Local variables
1011 1012
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1013 1014
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1015 1016 1017
						v_contentResponse.subscription := mw_contentSubscription_rc5;

						v_ae1.start(f_CSE_DMR_RET_023(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
1018 1019 1020
						v_ae1.done;
					}