Commit 43acd4042e184ee8a0349f8dc85b4d0b997691d4

Authored by Miguel Angel Reina Ortega
1 parent 14dc291f

New GMG test cases added and pre validation of GMG group

Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
... ... @@ -7,7 +7,7 @@
7 7 *
8 8 * @author ETSI
9 9 * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
10   - * $Id: OneM2M_Functions.ttcn 170 2016-11-21 15:53:54Z reinaortega $
  10 + * $Id: OneM2M_Functions.ttcn 174 2016-11-22 11:36:56Z carres $
11 11 * @desc Module containing functions for oneM2M
12 12 *
13 13 */
... ... @@ -714,7 +714,7 @@ module OneM2M_Functions {
714 714 */
715 715 function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request := m_create, integer p_parentIndex) runs on CseTester return RequestPrimitive {
716 716 var integer p_locresourceIndex := p_parentIndex;
717   - var template ListOfURIs v_notificationURI := {"Not Initialized"};
  717 + var template ListOfURIs v_defaultListOfURIs := {"Not Initialized"};
718 718  
719 719 p_request.from_ := f_getOriginator(p_parentIndex);
720 720 p_request.to_ := f_getResourceAddress(p_parentIndex);
... ... @@ -723,7 +723,9 @@ module OneM2M_Functions {
723 723 }
724 724  
725 725 if (p_resourceType == int9) {//group
726   - p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)};
  726 + if(match(valueof(p_request.primitiveContent.any_1[0].Group_optional.memberIDs), v_defaultListOfURIs )){
  727 + p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)};
  728 + }
727 729 }
728 730  
729 731 if(p_resourceType == int3){//container
... ... @@ -743,7 +745,7 @@ module OneM2M_Functions {
743 745 }
744 746  
745 747 if (p_resourceType == int23) {//subscription
746   - if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI), v_notificationURI )){
  748 + if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI), v_defaultListOfURIs )){
747 749 p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)};
748 750 }
749 751 /*if(PX_FROM_IS_AE_ID) {
... ...
... ... @@ -7,7 +7,7 @@
7 7 *
8 8 * @author ETSI
9 9 * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
10   - * $Id: OneM2M_Templates.ttcn 170 2016-11-21 15:53:54Z reinaortega $
  10 + * $Id: OneM2M_Templates.ttcn 179 2016-11-24 10:39:02Z carres $
11 11 * @desc Module containing templates for oneM2M
12 12 *
13 13 */
... ... @@ -470,13 +470,13 @@ module OneM2M_Templates {
470 470 }
471 471 };
472 472  
473   - template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) modifies m_create := {
  473 + template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultResourceName) modifies m_create := {
474 474 to_ := p_parentResourceAddress,
475 475 from_ := PX_AE_ID_STEM,
476 476 requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
477 477 resourceType := int3,
478 478 primitiveContent := {
479   - any_1 := {{Container_optional := m_contentCreateContainer}}
  479 + any_1 := {{Container_optional := m_contentCreateContainer(p_resourceName)}}
480 480 }
481 481 };
482 482  
... ... @@ -498,17 +498,21 @@ module OneM2M_Templates {
498 498 requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
499 499 resourceType := int9,
500 500 primitiveContent := {
501   - any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & "NotInitialized"}, omit)}} //TODO: p_resourceId
  501 + any_1 := {{Group_optional := m_contentCreateGroup (1, {"Not Initialized"}, omit, omit)}} //TODO: p_resourceId
502 502 }
503 503 };
504 504  
505   - template (value) RequestPrimitive m_createGroup(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.AnyURI p_memberId ) modifies m_create := {
506   - to_ := p_parentResourceAddress,
507   - from_ := PX_AE_ID_STEM,
  505 + template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
  506 + in template (value) ListOfURIs p_memberIds := {"Not Initialized"},
  507 + in template (omit) AcpType p_accessControlPolicyIDs,
  508 + in template (omit) MemberType p_memberType := omit,
  509 + in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
  510 + in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
  511 + in template (omit) XSD.String p_name := "MyGroup") modifies m_create := {
508 512 requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
509 513 resourceType := int9,
510 514 primitiveContent := {
511   - any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}} //TODO: p_resourceId
  515 + any_1 := {{Group_optional := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIDs, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}} //TODO: p_resourceId
512 516 }
513 517 };
514 518  
... ... @@ -882,6 +886,9 @@ module OneM2M_Templates {
882 886 template (value) Group_optional m_contentCreateGroup ( in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
883 887 in template (value) ListOfURIs p_memberIds,
884 888 in template (omit) AcpType p_accessControlPolicyIDs,
  889 + in template (omit) MemberType p_memberType := omit,
  890 + in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
  891 + in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
885 892 in template (omit) XSD.String p_name := c_defaultResourceName) := {
886 893 resourceName := p_name,//O
887 894 resourceType := omit,//NP
... ... @@ -896,13 +903,13 @@ module OneM2M_Templates {
896 903 announceTo := omit,//O
897 904 announcedAttribute := omit,//O
898 905 creator := omit,//O
899   - memberType := omit,//O
  906 + memberType := p_memberType,//O
900 907 currentNrOfMembers := omit,//NP
901 908 maxNrOfMembers := p_maxNrOfMembers,//M
902 909 memberIDs := p_memberIds,//M
903   - membersAccessControlPolicyIDs := omit,//O
  910 + membersAccessControlPolicyIDs := p_membersAccessControlPolicyIDs,//O
904 911 memberTypeValidated := omit,//NP
905   - consistencyStrategy := omit,//O
  912 + consistencyStrategy := p_consistencyStrategy,//O
906 913 groupName := omit,//O
907 914 choice := omit//NP
908 915 };
... ...
... ... @@ -7,7 +7,7 @@
7 7 *
8 8 * @author ETSI
9 9 * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
10   - * $Id: OneM2M_Testcases.ttcn 170 2016-11-21 15:53:54Z reinaortega $
  10 + * $Id: OneM2M_Testcases.ttcn 182 2016-11-25 10:27:11Z reinaortega $
11 11 * @desc Module containing test cases for oneM2M
12 12 *
13 13 */
... ... @@ -5407,29 +5407,26 @@ module OneM2M_Testcases {
5407 5407 group g_CSE_GMG_BV_001 {
5408 5408  
5409 5409 testcase TC_CSE_GMG_BV_001() runs on CseTester system CseSystem {
5410   -
5411   - // Local variables
5412   - var MsgIn v_response;
5413   - var RequestPrimitive v_request;
5414   - var integer v_aeIndex := -1;
5415   - var integer v_resourceIndex := -1;
5416   -
5417   -
5418   - var template RequestPrimitive v_createRequest := m_createGroupBase;
5419   - var ResponsePrimitive v_responsePrimitive;
5420   -
5421   - //v_createRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
  5410 + // Local constants
5422 5411 const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESOURCE_ADDRESS_1";
5423 5412 const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESOURCE_ADDRESS_2";
5424 5413 const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESOURCE_ADDRESS_3";
5425 5414 const XSD.AnyURI c_memberResourceAddress4 := "MEMBER_RESOURCE_ADDRESS_4";
5426 5415 const XSD.AnyURI c_memberResourceAddress5 := "MEMBER_RESOURCE_ADDRESS_5";
5427 5416 const XSD.AnyURI c_memberResourceAddress6 := "MEMBER_RESOURCE_ADDRESS_6";
  5417 + const XSD.NonNegativeInteger c_maxNrOfMembers := 5;
  5418 + const ListOfURIs c_memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};
5428 5419  
5429   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};
5430   - v_createRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
  5420 + // Local variables
  5421 + var MsgIn v_response;
  5422 + var integer v_aeIndex := -1;
  5423 + var integer v_resourceIndex := -1;
  5424 + var RequestPrimitive v_request;
  5425 + var template RequestPrimitive v_createRequest;
  5426 + var ResponsePrimitive v_responsePrimitive;
  5427 +
  5428 + v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, c_memberIDs, omit));
5431 5429  
5432   -
5433 5430 // Test control
5434 5431  
5435 5432 // Test component configuration
... ... @@ -5441,7 +5438,7 @@ module OneM2M_Testcases {
5441 5438 v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
5442 5439  
5443 5440 // Test Body
5444   - v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
  5441 + v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
5445 5442  
5446 5443  
5447 5444 mcaPort.send(m_request(v_request));
... ... @@ -5453,10 +5450,14 @@ module OneM2M_Testcases {
5453 5450 }
5454 5451 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5455 5452 tc_ac.stop;
5456   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  5453 + setverdict(fail, testcasename() & ": Error while creating resource");
5457 5454 }
  5455 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
  5456 + tc_ac.stop;
  5457 + setverdict(fail, testcasename() & ": Error resource created while member ID exceed max number of member");
  5458 + }
5458 5459 [] tc_ac.timeout {
5459   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  5460 + setverdict(inconc, testcasename() & ": No answer while creating resource");
5460 5461 }
5461 5462 }
5462 5463  
... ... @@ -5469,36 +5470,29 @@ module OneM2M_Testcases {
5469 5470 }
5470 5471  
5471 5472 } // end group g_CSE_GMG_BV_001
5472   -
5473   -
5474   -
  5473 +
5475 5474  
5476 5475 // Test objective:
5477 5476 // Check that the IUT rejects the creation of the group resource when the memberType cannot
5478 5477 // be retrieved due to lack of privilege.
5479 5478 group g_CSE_GMG_BV_002 {
5480 5479  
5481   - testcase TC_CSE_GMG_BV_002() runs on CseTester system CseSystem
5482   - {
5483   - // Local constants
5484   - const ResourceType c_ResourceTypeGroup := int9; // <group> ?
5485   - const ResourceType c_ResourceTypeAcp := int1; // <ACP>
5486   - const XSD.String c_acpName := "ACP_NAME";
5487   - const ListOfURIs c_acor := {"NA"};
5488   - const AccessControlOperations c_allowedOperations := int63;
5489   -
  5480 + testcase TC_CSE_GMG_BV_002() runs on CseTester system CseSystem {
5490 5481 // Local variables
5491 5482 var MsgIn v_response;
5492   - var RequestPrimitive v_request;
5493 5483 var integer v_aeIndex := -1;
  5484 + var integer v_containerIndex := -1;
5494 5485 var integer v_acpIndex := -1;
5495   -
5496   -
5497   - var template RequestPrimitive v_createRequest := m_createGroupBase;
5498   - var template RequestPrimitive v_createAcp := m_createAcp(c_acpName, c_acpName, c_acor, c_allowedOperations);
5499   -
  5486 + var RequestPrimitive v_request;
  5487 + var template RequestPrimitive v_containerCreateRequest := m_createContainerBase;
  5488 + var template RequestPrimitive v_createRequest;
  5489 + var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, int61); //c_CUDNDi
5500 5490  
5501 5491 // Test control
  5492 + if(not(PICS_ACP_SUPPORT)) {
  5493 + setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
  5494 + stop;
  5495 + }
5502 5496  
5503 5497 // Test component configuration
5504 5498 f_cf01Up();
... ... @@ -5506,15 +5500,17 @@ module OneM2M_Testcases {
5506 5500 // Test adapter configuration
5507 5501  
5508 5502 // Preamble
5509   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5510   - v_request := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // creating group
5511   -
5512   - v_acpIndex := f_cse_createResource(c_ResourceTypeAcp, v_createAcp, v_aeIndex);
5513   - v_request.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)};
5514   -
  5503 +
  5504 + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
  5505 + v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource
  5506 + v_containerCreateRequest.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)};
  5507 + v_containerIndex := f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex); // AE child resource
  5508 +
  5509 + v_createRequest := m_createGroup(1, {f_getResourceAddress(v_containerIndex)}, omit, int3);
  5510 + v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); // creating group
  5511 +
5515 5512 // Test Body
5516 5513  
5517   -
5518 5514 mcaPort.send(m_request(v_request));
5519 5515 tc_ac.start;
5520 5516 alt {
... ... @@ -5524,8 +5520,12 @@ module OneM2M_Testcases {
5524 5520 }
5525 5521 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5526 5522 tc_ac.stop;
5527   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  5523 + setverdict(fail, testcasename() & ": Error while creating resource");
5528 5524 }
  5525 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
  5526 + tc_ac.stop;
  5527 + setverdict(fail, testcasename() & ": Error creation successful while doesn't have privileges for retrieving resource");
  5528 + }
5529 5529 [] tc_ac.timeout {
5530 5530 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
5531 5531 }
... ... @@ -5539,76 +5539,75 @@ module OneM2M_Testcases {
5539 5539 }
5540 5540  
5541 5541 } // end group g_CSE_GMG_BV_002
5542   -
5543   -
  5542 +
5544 5543  
5545 5544 // Test objective:
5546 5545 // Check that the IUT rejects the update of the group resource when the
5547 5546 // memberType cannot be retrieved due to lack of privilege.
5548 5547 group g_CSE_GMG_BV_003 {
5549 5548  
5550   - testcase TC_CSE_GMG_BV_003() runs on CseTester system CseSystem
5551   - {
5552   - // Local constants
5553   - const ResourceType c_ResourceTypeGroup := int9; // <group> ?
5554   - const ResourceType c_ResourceTypeAcp := int1; // <ACP>
5555   - const XSD.String c_acpName := "ACP_NAME";
5556   - const ListOfURIs c_acor := {"NA"};
5557   - const AccessControlOperations c_allowedOperations := int63;
5558   -
5559   - // Local variables
5560   - var MsgIn v_response;
5561   - var RequestPrimitive v_request;
5562   - var integer v_aeIndex := -1;
5563   - var integer v_acpIndex := -1;
5564   - var integer v_groupResourceIndex := -1;
5565   -
5566   -
5567   - var template RequestPrimitive v_createRequest := m_createGroupBase;
5568   - var template RequestPrimitive v_updateRequest := m_updateGroupBase;
5569   - var template RequestPrimitive v_createAcp := m_createAcp(c_acpName, c_acpName, c_acor, c_allowedOperations);
5570   -
5571   -
5572   - // Test control
5573   -
5574   - // Test component configuration
5575   - f_cf01Up();
5576   -
5577   - // Test adapter configuration
5578   -
5579   - // Preamble
5580   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5581   - v_groupResourceIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // create group resource
5582   -
5583   - v_acpIndex := f_cse_createResource(c_ResourceTypeAcp, v_createAcp, v_groupResourceIndex);
  5549 + testcase TC_CSE_GMG_BV_003() runs on CseTester system CseSystem {
  5550 + // Local variables
  5551 + var MsgIn v_response;
  5552 + var integer v_aeIndex := -1;
  5553 + var integer v_containerIndex1 := -1;
  5554 + var integer v_containerIndex2 := -1;
  5555 + var integer v_acpIndex := -1;
  5556 + var integer v_groupIndex := -1;
  5557 + var RequestPrimitive v_request;
  5558 + var template RequestPrimitive v_containerCreateRequest := m_createContainer("NotInitialized", "MyContainer2");
  5559 + var template RequestPrimitive v_updateRequest := m_updateGroupBase;
  5560 + var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, int61); //c_CUDNDi
  5561 +
  5562 + // Test control
  5563 + if(not(PICS_ACP_SUPPORT)) {
  5564 + setverdict(inconc, testcasename() & ": AccessControlPolicy support is required to run this test case");
  5565 + stop;
  5566 + }
5584 5567  
5585   -
5586   - // Test Body
5587   - v_request := f_getUpdateRequestPrimitive(int9, v_groupResourceIndex, v_updateRequest);
5588   - v_request.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)};
5589   -
5590   -
5591   - mcaPort.send(m_request(v_request));
5592   - tc_ac.start;
5593   - alt {
5594   - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
5595   - tc_ac.stop;
5596   - setverdict(pass, testcasename() & ": creation failed due to lack of privilege");
5597   - }
5598   - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5599   - tc_ac.stop;
5600   - setverdict(fail, testcasename() & ": Error while retrieving resource");
5601   - }
5602   - [] tc_ac.timeout {
5603   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
5604   - }
5605   - }
5606   -
5607   - // Postamble
5608   - f_cse_postamble_deleteResources();
5609   -
5610   - // Tear down
5611   - f_cf01Down();
  5568 + // Test component configuration
  5569 + f_cf01Up();
  5570 +
  5571 + // Test adapter configuration
  5572 +
  5573 + // Preamble
  5574 + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
  5575 + v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource
  5576 + v_containerCreateRequest.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)};
  5577 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  5578 + v_containerIndex2 := f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex); // AE child resource
  5579 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceAddress(v_containerIndex1)}, omit, int3), v_aeIndex);
  5580 +
  5581 + v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(v_containerIndex2)};
  5582 + v_request := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // creating group
  5583 +
  5584 + // Test Body
  5585 +
  5586 + mcaPort.send(m_request(v_request));
  5587 + tc_ac.start;
  5588 + alt {
  5589 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
  5590 + tc_ac.stop;
  5591 + setverdict(pass, testcasename() & ": Update failed due to lack of privilege");
  5592 + }
  5593 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  5594 + tc_ac.stop;
  5595 + setverdict(fail, testcasename() & ": Error while updating resource");
  5596 + }
  5597 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
  5598 + tc_ac.stop;
  5599 + setverdict(fail, testcasename() & ": Error update successful while doesn't have privileges for retrieving resource");
  5600 + }
  5601 + [] tc_ac.timeout {
  5602 + setverdict(inconc, testcasename() & ": No answer while updating resource");
  5603 + }
  5604 + }
  5605 +
  5606 + // Postamble
  5607 + f_cse_postamble_deleteResources();
  5608 +
  5609 + // Tear down
  5610 + f_cf01Down();
5612 5611 }
5613 5612  
5614 5613 } // end group g_CSE_GMG_BV_003
... ... @@ -5618,18 +5617,8 @@ module OneM2M_Testcases {
5618 5617 // resource when member ID exceed max number of members.
5619 5618 group g_CSE_GMG_BV_004 {
5620 5619  
5621   - testcase TC_CSE_GMG_BV_004() runs on CseTester system CseSystem
5622   - {
5623   -
5624   - var MsgIn v_response;
5625   - var RequestPrimitive v_request;
5626   - var integer v_aeIndex := -1;
5627   - var integer v_resourceIndex := -1;
5628   -
5629   - var template RequestPrimitive v_createRequest := m_createGroupBase;
5630   - var template RequestPrimitive v_updateRequest := m_updateGroupBase;
5631   -
5632   - //v_updateRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
  5620 + testcase TC_CSE_GMG_BV_004() runs on CseTester system CseSystem {
  5621 + // Local constants
5633 5622 const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESOURCE_ADDRESS_1";
5634 5623 const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESOURCE_ADDRESS_2";
5635 5624 const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESOURCE_ADDRESS_3";
... ... @@ -5637,10 +5626,16 @@ module OneM2M_Testcases {
5637 5626 const XSD.AnyURI c_memberResourceAddress5 := "MEMBER_RESOURCE_ADDRESS_5";
5638 5627 const XSD.AnyURI c_memberResourceAddress6 := "MEMBER_RESOURCE_ADDRESS_6";
5639 5628  
  5629 + // Local variables
  5630 + var MsgIn v_response;
  5631 + var integer v_aeIndex := -1;
  5632 + var integer v_resourceIndex := -1;
  5633 + var RequestPrimitive v_request;
  5634 + var template RequestPrimitive v_createRequest := m_createGroup(5, -, omit);
  5635 + var template RequestPrimitive v_updateRequest := m_updateGroupBase;
  5636 +
5640 5637 v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};
5641   - v_updateRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
5642   -
5643   -
  5638 +
5644 5639 // Test control
5645 5640  
5646 5641 // Test component configuration
... ... @@ -5659,7 +5654,7 @@ module OneM2M_Testcases {
5659 5654 mcaPort.send(m_request(v_request));
5660 5655 tc_ac.start;
5661 5656 alt {
5662   - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
  5657 + [] mcaPort.receive(mw_response(mw_responsePrimitive(int6010))) -> value v_response {
5663 5658 tc_ac.stop;
5664 5659 setverdict(pass, testcasename() & ": Update failed because member ID exceed max number of member");
5665 5660 }
... ... @@ -5667,6 +5662,10 @@ module OneM2M_Testcases {
5667 5662 tc_ac.stop;
5668 5663 setverdict(fail, testcasename() & ": Error while retrieving resource");
5669 5664 }
  5665 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
  5666 + tc_ac.stop;
  5667 + setverdict(fail, testcasename() & ": Error resource updated while member ID exceed max number of member");
  5668 + }
5670 5669 [] tc_ac.timeout {
5671 5670 setverdict(inconc, testcasename() & ": No answer while retrieving resource");
5672 5671 }
... ... @@ -5687,27 +5686,17 @@ module OneM2M_Testcases {
5687 5686 // fanOutPoint in group resource.
5688 5687 group g_CSE_GMG_BV_005 {
5689 5688  
5690   - testcase TC_CSE_GMG_BV_005() runs on CseTester system CseSystem
5691   - {
5692   -
5693   - // TODO: use right values for c_fanoutPointAddress and c_RessourceType1
5694   - var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
5695   - var ResourceType c_RessourceType1 := int1;
5696   -
  5689 + testcase TC_CSE_GMG_BV_005() runs on CseTester system CseSystem {
5697 5690 // Local variables
5698 5691 var MsgIn v_response;
5699   - var RequestPrimitive v_request;
  5692 + var RequestPrimitive v_createRequest := valueof(m_createContainerBase);
5700 5693 var integer v_aeIndex := -1;
5701   - var integer v_resourceIndex := -1;
5702   -
5703   -
5704   - var RequestPrimitive v_createRequest := valueof(m_createGroupBase);
5705   -
5706   -
5707   - //v_createRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress; TODO <---------------------------------------
5708   - v_createRequest.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
5709   -
5710   -
  5694 + var integer v_containerIndex1 := -1;
  5695 + var integer v_containerIndex2 := -1;
  5696 + var integer v_groupIndex := -1;
  5697 + var ListOfURIs v_memberIDs;
  5698 + var integer i;
  5699 +
5711 5700 // Test control
5712 5701  
5713 5702 // Test component configuration
... ... @@ -5716,11 +5705,15 @@ module OneM2M_Testcases {
5716 5705 // Test adapter configuration
5717 5706  
5718 5707 // Preamble
5719   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5720   - //v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex); // not used anymore -> Issue #4
  5708 + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
  5709 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  5710 + v_containerIndex2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource
  5711 + v_memberIDs := {f_getResourceAddress(v_containerIndex1), f_getResourceAddress(v_containerIndex2)};
  5712 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3), v_aeIndex); // AE child resource
5721 5713  
5722   - v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
5723   -
  5714 + v_createRequest.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; // short name of fanOutPoint
  5715 + v_createRequest.from_ := f_getOriginator(v_groupIndex);
  5716 +
5724 5717 // Test Body
5725 5718  
5726 5719 mcaPort.send(m_request(v_createRequest));
... ... @@ -5732,14 +5725,21 @@ module OneM2M_Testcases {
5732 5725  
5733 5726 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
5734 5727 setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
5735   - }
  5728 + }
  5729 + else {
  5730 + for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list); i := i+1){
  5731 + if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){
  5732 + setverdict(fail, testcasename(), ": Error, one responsePrimitve of aggregatedResponse_list is not successful");
  5733 + }
  5734 + }
  5735 + }
5736 5736 }
5737 5737 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5738 5738 tc_ac.stop;
5739   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  5739 + setverdict(fail, testcasename() & ": Error while creating resource");
5740 5740 }
5741 5741 [] tc_ac.timeout {
5742   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  5742 + setverdict(inconc, testcasename() & ": No answer while creating resource");
5743 5743 }
5744 5744 }
5745 5745  
... ... @@ -5758,27 +5758,16 @@ module OneM2M_Testcases {
5758 5758 // fanOutPoint in group resource.
5759 5759 group g_CSE_GMG_BV_006 {
5760 5760  
5761   - testcase TC_CSE_GMG_BV_006() runs on CseTester system CseSystem
5762   - {
5763   -
5764   -
5765   -
5766   - // TODO: use right values for c_fanoutPointAddress and c_RessourceType1
5767   - var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
5768   - var ResourceType c_RessourceType1 := int1;
5769   -
5770   - // Local variables
5771   - var XSD.ID v_resourceId := "NonExisting";
5772   - var RequestPrimitive v_request := valueof(m_createGroupBase);
5773   - var MsgIn v_response;
5774   - var integer v_aeIndex := -1;
5775   - var integer v_resourceIndex := -1;
5776   -
5777   -
5778   -
5779   - //v_request.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress; TODO <---------------------------------------
5780   -
5781   -
  5761 + testcase TC_CSE_GMG_BV_006() runs on CseTester system CseSystem {
  5762 + var MsgIn v_response;
  5763 + var integer v_aeIndex := -1;
  5764 + var integer v_containerIndex1 := -1;
  5765 + var integer v_containerIndex2 := -1;
  5766 + var integer v_groupIndex := -1;
  5767 + var XSD.AnyURI v_fanoutPointAddress;
  5768 + var ListOfURIs v_memberIDs;
  5769 + var integer i;
  5770 +
5782 5771 // Test control
5783 5772  
5784 5773 // Test component configuration
... ... @@ -5787,12 +5776,16 @@ module OneM2M_Testcases {
5787 5776 // Test adapter configuration
5788 5777  
5789 5778 // Preamble
5790   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5791   - v_resourceIndex := f_cse_createResource(int9, v_request, v_aeIndex);
5792   -
  5779 + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
  5780 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  5781 + v_containerIndex2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource
  5782 + v_memberIDs := {f_getResourceAddress(v_containerIndex1), f_getResourceAddress(v_containerIndex2)};
  5783 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3), v_aeIndex); // AE child resource
  5784 +
  5785 + v_fanoutPointAddress := f_getResourceAddress(v_groupIndex) & "/fopt"; // short name of fanOutPoint
  5786 +
5793 5787 // Test Body
5794   - v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex) & "/" & v_resourceId, f_getOriginator(v_resourceIndex)));
5795   - mcaPort.send(m_request(valueof(v_request)));
  5788 + mcaPort.send(m_request(m_retrieveResource(v_fanoutPointAddress, f_getOriginator(v_groupIndex))));
5796 5789 tc_ac.start;
5797 5790 alt {
5798 5791 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value v_response {
... ... @@ -5802,7 +5795,14 @@ module OneM2M_Testcases {
5802 5795 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
5803 5796 setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
5804 5797 }
5805   - }
  5798 + else {
  5799 + for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list); i := i+1){
  5800 + if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){
  5801 + setverdict(fail, testcasename(), ": Error, one responsePrimitve of aggregatedResponse_list is not successful");
  5802 + }
  5803 + }
  5804 + }
  5805 + }
5806 5806 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5807 5807 tc_ac.stop;
5808 5808 setverdict(fail, testcasename() & ": Error while retrieving resource");
... ... @@ -5827,27 +5827,20 @@ module OneM2M_Testcases {
5827 5827 // fanOutPoint in group resource.
5828 5828 group g_CSE_GMG_BV_007 {
5829 5829  
5830   - testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem
5831   - {
5832   -
5833   - const ResourceType c_RessourceType1 := int9; // <group> ?
5834   -
  5830 + testcase TC_CSE_GMG_BV_007() runs on CseTester system CseSystem {
5835 5831 // Local variables
5836   - var MsgIn v_response;
5837   - var RequestPrimitive v_request;
5838   - var integer v_aeIndex := -1;
5839   - var integer v_resourceIndex := -1;
5840   -
5841   - var template RequestPrimitive v_createRequest := m_createGroupBase;
5842   - var template RequestPrimitive v_updateRequest := m_updateGroupBase;
5843   -
5844   - const XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
5845   - const XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
5846   - const XSD.AnyURI c_memberRessourceAddress3 := "MEMBER_RESSOURCE_ADDRESS_3";
5847   - const XSD.AnyURI c_memberRessourceAddress4 := "MEMBER_RESSOURCE_ADDRESS_4";
5848   - const XSD.AnyURI c_memberRessourceAddress5 := "MEMBER_RESSOURCE_ADDRESS_5";
5849   - const XSD.AnyURI c_memberRessourceAddress6 := "MEMBER_RESSOURCE_ADDRESS_6";
5850   -
  5832 + var MsgIn v_response;
  5833 + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
  5834 + var integer v_aeIndex := -1;
  5835 + var integer v_containerIndex1 := -1;
  5836 + var integer v_containerIndex2 := -1;
  5837 + var integer v_groupIndex := -1;
  5838 + var ListOfURIs v_memberIDs;
  5839 + var Labels v_labels_1:= {"VALUE_1"};
  5840 + var integer i;
  5841 +
  5842 + v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
  5843 +
5851 5844 // Test control
5852 5845  
5853 5846 // Test component configuration
... ... @@ -5856,27 +5849,33 @@ module OneM2M_Testcases {
5856 5849 // Test adapter configuration
5857 5850  
5858 5851 // Preamble
  5852 + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
  5853 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  5854 + v_containerIndex2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource
  5855 + v_memberIDs := {f_getResourceAddress(v_containerIndex1), f_getResourceAddress(v_containerIndex2)};
  5856 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3), v_aeIndex); // AE child resource
  5857 +
  5858 + v_updateRequest.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; // short name of fanOutPoint
  5859 + v_updateRequest.from_ := f_getOriginator(v_groupIndex);
5859 5860  
5860   - //var XSD.AnyURI c_memberRessourceAddress6 := "MEMBER_RESSOURCE_ADDRESS_6";
5861   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberRessourceAddress1, c_memberRessourceAddress2, c_memberRessourceAddress3, c_memberRessourceAddress4, c_memberRessourceAddress5, c_memberRessourceAddress6};
5862   -
5863   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5864   - v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
5865   -
5866   - // Test Body
5867   - v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_updateRequest);
5868   -
5869   -
5870   - mcaPort.send(m_request(v_request));
  5861 + // Test Body
  5862 + mcaPort.send(m_request(v_updateRequest));
5871 5863 tc_ac.start;
5872 5864 alt {
5873 5865 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
5874 5866 tc_ac.stop;
5875   - setverdict(pass, testcasename() & ": update successfull by using fanOutPoint in group resource");
  5867 + setverdict(pass, testcasename() & ": update successful by using fanOutPoint in group resource");
5876 5868  
5877 5869 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
5878 5870 setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
5879   - }
  5871 + }
  5872 + else {
  5873 + for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list); i := i+1){
  5874 + if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){
  5875 + setverdict(fail, testcasename(), ": Error, one responsePrimitve of aggregatedResponse_list is not successful");
  5876 + }
  5877 + }
  5878 + }
5880 5879 }
5881 5880 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5882 5881 tc_ac.stop;
... ... @@ -5902,26 +5901,17 @@ module OneM2M_Testcases {
5902 5901 // fanOutPoint in group resource.
5903 5902 group g_CSE_GMG_BV_008 {
5904 5903  
5905   - testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem
5906   - {
5907   - // TODO: use right values for c_fanoutPointAddress and c_deleteAddress
5908   - var XSD.AnyURI c_fanoutPointAddress := "FANOUTPOINT_ADDRESS";
5909   - var XSD.ID c_deleteAddress := "DELETE";
5910   -
  5904 + testcase TC_CSE_GMG_BV_008() runs on CseTester system CseSystem {
5911 5905 //Local variables
5912   - var RequestPrimitive v_request;
5913   - var integer v_aeIndex := -1;
5914   - var integer v_resourceIndex := -1;
5915   - var MsgIn v_response;
5916   -
5917   -
5918   - var template RequestPrimitive v_createRequest := m_createGroupBase;
5919   - var template RequestPrimitive v_deleteRequest := m_deleteRequest(c_deleteAddress);
5920   -
  5906 + var MsgIn v_response;
  5907 + var integer v_aeIndex := -1;
  5908 + var integer v_containerIndex1 := -1;
  5909 + var integer v_containerIndex2 := -1;
  5910 + var integer v_groupIndex := -1;
  5911 + var XSD.AnyURI v_fanoutPointAddress;
  5912 + var ListOfURIs v_memberIDs;
  5913 + var integer i;
5921 5914  
5922   - //v_deleteRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress; TODO <---------------------------------------
5923   -
5924   -
5925 5915 // Test control
5926 5916  
5927 5917 // Test component configuration
... ... @@ -5930,30 +5920,39 @@ module OneM2M_Testcases {
5930 5920 // Test adapter configuration
5931 5921  
5932 5922 // Preamble
5933   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5934   - v_resourceIndex := f_cse_createResource(int9, v_createRequest, v_aeIndex);
5935   -
5936   - // Test Body
5937   - v_request := f_getUpdateRequestPrimitive(int9, v_resourceIndex, v_deleteRequest);
5938   -
5939   -
5940   - mcaPort.send(m_request(v_request));
  5923 + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
  5924 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  5925 + v_containerIndex2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource
  5926 + v_memberIDs := {f_getResourceAddress(v_containerIndex1), f_getResourceAddress(v_containerIndex2)};
  5927 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3), v_aeIndex); // AE child resource
  5928 +
  5929 + v_fanoutPointAddress := f_getResourceAddress(v_groupIndex) & "/fopt"; // short name of fanOutPoint
  5930 +
  5931 + // Test Body
  5932 + mcaPort.send(m_request(m_deleteRequest(v_fanoutPointAddress))); //TODO see if we set AE_ID or PX_SUPER_USER to from_ attribute
5941 5933 tc_ac.start;
5942 5934 alt {
5943 5935 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response {
5944 5936 tc_ac.stop;
5945   - setverdict(pass, testcasename() & ": delete successfull by using fanOutPoint in group resource");
  5937 + setverdict(pass, testcasename() & ": delete successful by using fanOutPoint in group resource");
5946 5938  
5947 5939 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list)){
5948 5940 setverdict(fail, testcasename(), ": Error, aggregatedResponse attribute not provided");
5949 5941 }
  5942 + else {
  5943 + for(i:=0; i<lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list); i := i+1){
  5944 + if(not match(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AggregatedResponse.responsePrimitive_list[i], mw_responsePrimitiveOK)){
  5945 + setverdict(fail, testcasename(), ": Error, one responsePrimitve of aggregatedResponse_list is not successful");
  5946 + }
  5947 + }
  5948 + }
5950 5949 }
5951 5950 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
5952 5951 tc_ac.stop;
5953   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  5952 + setverdict(fail, testcasename() & ": Error while deleting resource");
5954 5953 }
5955 5954 [] tc_ac.timeout {
5956   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  5955 + setverdict(inconc, testcasename() & ": No answer while deleting resource");
5957 5956 }
5958 5957 }
5959 5958  
... ... @@ -5972,17 +5971,13 @@ module OneM2M_Testcases {
5972 5971 // group resource and removes the duplicate member IDs prior to creation of the group resource.
5973 5972 group g_CSE_GMG_BV_009 {
5974 5973  
5975   - testcase TC_CSE_GMG_BV_009() runs on CseTester system CseSystem
5976   - {
5977   -
5978   - // TODO: use right values for c_memberRessourceAddress
5979   - var XSD.AnyURI c_memberRessourceAddress := "MEMBER_RESSOURCE_ADDRESS";
5980   -
  5974 + testcase TC_CSE_GMG_BV_009() runs on CseTester system CseSystem {
5981 5975 // Local variables
5982 5976 var MsgIn v_response;
5983 5977 var integer v_aeIndex := -1;
5984   - var integer v_resourceIndex := -1;
5985   - var template RequestPrimitive v_createRequest := m_createGroupBase;
  5978 + var integer v_containerIndex := -1;
  5979 + var RequestPrimitive v_createRequest;
  5980 + var XSD.AnyURI v_memberID;
5986 5981  
5987 5982 // Test control
5988 5983  
... ... @@ -5992,28 +5987,26 @@ module OneM2M_Testcases {
5992 5987 // Test adapter configuration
5993 5988  
5994 5989 // Preamble
5995   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
5996   -
  5990 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi.
  5991 + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource
  5992 + v_memberID := f_getResourceAddress(v_containerIndex);
  5993 + v_createRequest := valueof(m_createGroup(2, {v_memberID, v_memberID}, omit, int3));
5997 5994 v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
5998   -
5999   - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {c_memberRessourceAddress, c_memberRessourceAddress}, omit);
6000   -
6001   - mcaPort.send(m_request(valueof(v_createRequest)));
  5995 +
  5996 + // Test Body
  5997 + mcaPort.send(m_request(v_createRequest));
6002 5998 tc_ac.start;
6003 5999 alt {
6004 6000 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
6005 6001 tc_ac.stop;
6006 6002 setverdict(pass, testcasename() & ": Resource created successfuly");
6007   -
6008   - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
6009   - setverdict(fail, testcasename(), ": Error, memberID attribute not provided");
6010   - } else {
6011   - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberRessourceAddress){
6012   - setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
6013   - }
  6003 +
  6004 + if(not match({v_memberID}, v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
  6005 + setverdict(fail, testcasename(), ": Error, presence of duplicate member IDs ");
6014 6006 }
6015   -
6016   -
  6007 + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) {
  6008 + setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute");
  6009 + }
6017 6010 }
6018 6011 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
6019 6012 tc_ac.stop;
... ... @@ -6039,24 +6032,13 @@ module OneM2M_Testcases {
6039 6032 // group resource when memberType attribute is not ‘mixed’.
6040 6033 group g_CSE_GMG_BV_010 {
6041 6034  
6042   - testcase TC_CSE_GMG_BV_010() runs on CseTester system CseSystem
6043   - {
6044   -// Local variables
  6035 + testcase TC_CSE_GMG_BV_010() runs on CseTester system CseSystem {
  6036 + // Local variables
6045 6037 var MsgIn v_response;
6046   - var RequestPrimitive v_request;
  6038 + var RequestPrimitive v_createRequest;
6047 6039 var integer v_aeIndex := -1;
6048   - var integer v_resourceIndex := -1;
6049   -
6050   -
6051   - // TODO: use right values for c_RessourceType1
6052   - var ResourceType c_RessourceType1 := int1;
6053   -
6054   - var ResponsePrimitive.primitiveContent v_responsePrimitive;
6055   -
6056   - var template RequestPrimitive v_createRequest := m_createGroupBase;
  6040 + var integer v_containerIndex := -1;
6057 6041  
6058   -
6059   -
6060 6042 // Test control
6061 6043  
6062 6044 // Test component configuration
... ... @@ -6066,29 +6048,25 @@ module OneM2M_Testcases {
6066 6048  
6067 6049 // Preamble
6068 6050 v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
6069   -
6070   -
6071   - v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
6072   -
6073   - v_request.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
6074   -
6075   -
6076   -
6077   - mcaPort.send(m_request(v_request));
  6051 + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource
  6052 + v_createRequest := valueof(m_createGroup(2, {f_getResourceAddress(v_containerIndex)}, omit, int3)); //Member type is set to Container
  6053 + v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
  6054 +
  6055 + // Test Body
  6056 + mcaPort.send(m_request(v_createRequest));
6078 6057 tc_ac.start;
6079 6058 alt {
6080 6059 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
6081 6060 tc_ac.stop;
6082 6061 setverdict(pass, testcasename() & ": Resource created successfuly");
6083   -
6084   - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
  6062 + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
6085 6063 setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
6086   - } else {
  6064 + }
  6065 + else {
6087 6066 if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false){
6088 6067 setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
6089 6068 }
6090   - }
6091   -
  6069 + }
6092 6070 }
6093 6071 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
6094 6072 tc_ac.stop;
... ... @@ -6114,52 +6092,39 @@ module OneM2M_Testcases {
6114 6092 // group resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is SET_MIXED.
6115 6093 group g_CSE_GMG_BV_011 {
6116 6094  
6117   - testcase TC_CSE_GMG_BV_011() runs on CseTester system CseSystem
6118   - {
6119   -
6120   - // TODO: use right values for c_RessourceType1 and c_RessourceType2
6121   - var MemberType c_RessourceType1 := int1;
6122   - var MemberType c_RessourceType2 := int2;
6123   -
6124   - // Local variables
6125   - var ResponsePrimitive.primitiveContent v_responsePrimitive;
6126   - var MsgIn v_response;
6127   - var integer v_aeIndex := -1;
6128   - var integer v_resourceIndex := -1;
6129   - var RequestPrimitive v_request;
6130   -
6131   - var template RequestPrimitive v_createRequest := m_createGroupBase;
6132   -
6133   - // Test control
  6095 + testcase TC_CSE_GMG_BV_011() runs on CseTester system CseSystem {
  6096 + //Local variables
  6097 + var MsgIn v_response;
  6098 + var RequestPrimitive v_createRequest;
  6099 + var integer v_aeIndex := -1;
  6100 + var integer v_containerIndex := -1;
  6101 +
  6102 + // Test control
6134 6103  
6135   - // Test component configuration
6136   - f_cf01Up();
  6104 + // Test component configuration
  6105 + f_cf01Up();
6137 6106  
6138   - // Test adapter configuration
  6107 + // Test adapter configuration
6139 6108  
6140   - // Preamble
6141   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
6142   -
6143   -
6144   -
6145   - v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
6146   -
6147   - v_request.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType2;
6148   - v_request.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int3; // MIXED
6149   -
6150   -
6151   - mcaPort.send(m_request(v_request));
  6109 + // Preamble
  6110 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
  6111 + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); // AE child resource
  6112 + v_createRequest := valueof(m_createGroup(2, {f_getResourceAddress(v_containerIndex)}, omit, int2, int3)); //Member type is set to AE and consistencyStrategy is set to MIXED
  6113 + v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
  6114 +
  6115 + // Test Body
  6116 + mcaPort.send(m_request(v_createRequest));
6152 6117 tc_ac.start;
6153 6118 alt {
6154 6119 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
6155 6120 tc_ac.stop;
6156 6121 setverdict(pass, testcasename() & ": Resource created successfuly");
6157   -
6158   -
  6122 +
6159 6123 // check for memberTypeValidated
6160 6124 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
6161 6125 setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
6162   - } else {
  6126 + }
  6127 + else {
6163 6128 if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false){
6164 6129 setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
6165 6130 }
... ... @@ -6167,12 +6132,12 @@ module OneM2M_Testcases {
6167 6132 // check for memberType (MIXED)
6168 6133 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)){
6169 6134 setverdict(fail, testcasename(), ": Error, memberType attribute not provided");
6170   - } else {
6171   - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int3){
  6135 + }
  6136 + else {
  6137 + if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int0){ //Mixed is int0 in release 2 and int24 in release 1
6172 6138 setverdict(fail, testcasename(), ": Error, memberType attribute not correct");
6173 6139 }
6174 6140 }
6175   -
6176 6141 }
6177 6142 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
6178 6143 tc_ac.stop;
... ... @@ -6198,44 +6163,39 @@ module OneM2M_Testcases {
6198 6163 // ABANDON_MEMBER,.
6199 6164 group g_CSE_GMG_BV_012 {
6200 6165  
6201   - testcase TC_CSE_GMG_BV_012() runs on CseTester system CseSystem
6202   - {
6203   -
6204   - // TODO: use right values for c_RessourceType1 and c_RessourceType2 and c_memberRessourceAddress1 and c_memberRessourceAddress2
6205   - var MemberType c_RessourceType1 := int1;
6206   - var MemberType c_RessourceType2 := int2;
6207   - var XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
6208   - var XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
  6166 + testcase TC_CSE_GMG_BV_012() runs on CseTester system CseSystem {
  6167 + //Local variables
  6168 + var MsgIn v_response;
  6169 + var RequestPrimitive v_createRequest;
  6170 + var integer v_aeIndex := -1;
  6171 + var integer v_containerIndex := -1;
  6172 + var integer v_groupIndex := -1;
  6173 + var ListOfURIs v_memberIDs;
6209 6174  
6210   -// Local variables
6211   - var MsgIn v_response;
6212   - var integer v_aeIndex := -1;
6213   - var integer v_resourceIndex := -1;
6214   - var template RequestPrimitive v_createRequest := m_createGroupBase;
6215   - //var ResponsePrimitive.primitiveContent v_responsePrimitive; // not used anymore -> issue #5
6216   -
6217   - // Test control
  6175 + // Test control
6218 6176  
6219   - // Test component configuration
6220   - f_cf01Up();
  6177 + // Test component configuration
  6178 + f_cf01Up();
6221 6179  
6222   - // Test adapter configuration
  6180 + // Test adapter configuration
6223 6181  
6224   - // Preamble
6225   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
6226   -
6227   - v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
6228   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType1;
6229   - v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int1; // ABANDON_MEMBER
6230   -
6231   - mcaPort.send(m_request(valueof(v_createRequest)));
  6182 + // Preamble
  6183 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
  6184 + v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex);
  6185 + v_groupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex);
  6186 + v_memberIDs := {f_getResourceAddress(v_groupIndex), f_getResourceAddress(v_containerIndex)};
  6187 + v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, omit)); //Member type is set to container and consistencyStrategy is set to ABANDON MEMBER (default value)
  6188 + v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
  6189 +
  6190 + // Test Body
  6191 + mcaPort.send(m_request(v_createRequest));
6232 6192 tc_ac.start;
6233 6193 alt {
6234 6194 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
6235 6195 tc_ac.stop;
6236 6196 setverdict(pass, testcasename() & ": Resource created successfuly");
6237   -
6238   -// check for memberTypeValidated
  6197 +
  6198 + // check for memberTypeValidated
6239 6199 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)){
6240 6200 setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
6241 6201 } else {
... ... @@ -6246,9 +6206,10 @@ module OneM2M_Testcases {
6246 6206 // check for membersId
6247 6207 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
6248 6208 setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
6249   - } else {
6250   - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberRessourceAddress1){
6251   - setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not correct");
  6209 + }
  6210 + else {
  6211 + if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != f_getResourceAddress(v_containerIndex)){
  6212 + setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
6252 6213 }
6253 6214 }
6254 6215 }
... ... @@ -6277,53 +6238,48 @@ module OneM2M_Testcases {
6277 6238 // ABANDON_GROUP.
6278 6239 group g_CSE_GMG_BV_013 {
6279 6240  
6280   - testcase TC_CSE_GMG_BV_013() runs on CseTester system CseSystem
6281   - {
6282   -
  6241 + testcase TC_CSE_GMG_BV_013() runs on CseTester system CseSystem {
  6242 + //Local variables
  6243 + var MsgIn v_response;
  6244 + var RequestPrimitive v_createRequest;
  6245 + var integer v_aeIndex := -1;
  6246 + var integer v_containerIndex := -1;
  6247 + var integer v_groupIndex := -1;
  6248 + var ListOfURIs v_memberIDs;
6283 6249  
6284   - // TODO: use right values for c_RessourceType1 and c_RessourceType2 and c_memberRessourceAddress1 and c_memberRessourceAddress2
6285   - var MemberType c_RessourceType1 := int1;
6286   - var MemberType c_RessourceType2 := int2;
6287   - var XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
6288   - var XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
6289   -
6290   -// Local variables
6291   - var MsgIn v_response;
6292   - var RequestPrimitive v_request;
6293   - var integer v_aeIndex := -1;
6294   - var integer v_resourceIndex := -1;
6295   -
6296   - var template RequestPrimitive v_createRequest := m_createGroupBase;
6297   -
6298   -
6299   - // Test control
6300   -
6301   - // Test component configuration
6302   - f_cf01Up();
  6250 + // Test control
  6251 +
  6252 + // Test component configuration
  6253 + f_cf01Up();
  6254 +
  6255 + // Test adapter configuration
  6256 +
  6257 + // Preamble
  6258 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
  6259 + v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex);
  6260 + v_groupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex);
  6261 + v_memberIDs := {f_getResourceAddress(v_groupIndex), f_getResourceAddress(v_containerIndex)};
  6262 + v_createRequest := valueof(m_createGroup(2, v_memberIDs, omit, int3, int2)); //Member type is set to container and consistencyStrategy is set to ABANDON GROUP
  6263 + v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
6303 6264  
6304   - // Test adapter configuration
6305   -
6306   - // Preamble
6307   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
6308   -
6309   - v_createRequest := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex);
6310   - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {c_memberRessourceAddress1, c_memberRessourceAddress2}, omit);
6311   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_RessourceType1;
6312   - v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := int2; // ABANDON_GROUP
6313   -
6314   - mcaPort.send(m_request(valueof(v_createRequest)));
  6265 + // Test Body
  6266 + mcaPort.send(m_request(v_createRequest));
6315 6267 tc_ac.start;
6316 6268 alt {
6317 6269 [] mcaPort.receive(mw_response(mw_responsePrimitive(int4110))) -> value v_response {//TODO Double check ResponseStatusCode
6318 6270 tc_ac.stop;
6319 6271 setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group");
6320 6272 }
  6273 + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
  6274 + tc_ac.stop;
  6275 + setverdict(fail, testcasename() & ": Error create succesfull while the operation should be aborted");
  6276 + }
6321 6277 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
6322 6278 tc_ac.stop;
6323   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  6279 + setverdict(fail, testcasename() & ": Error while creating resource");
6324 6280 }
6325 6281 [] tc_ac.timeout {
6326   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  6282 + setverdict(inconc, testcasename() & ": No answer while creating resource");
6327 6283 }
6328 6284 }
6329 6285  
... ... @@ -6341,26 +6297,17 @@ module OneM2M_Testcases {
6341 6297 // Check that the IUT detects the presence of duplicate member IDs during the creation of the
6342 6298 // group resource and removes the duplicate member IDs prior to updating of the group resource.
6343 6299 group g_CSE_GMG_BV_014 {
6344   - testcase TC_CSE_GMG_BV_014() runs on CseTester system CseSystem
6345   - {
6346   - //Local constants
6347   - const ResourceType c_ResourceTypeGroup := int9; // "group": TS-0004, Table 6.3.4.2.1-1
6348   - const ResourceType c_ResourceType1 := int4; // "contentInstance": TS-0004, Table 6.3.4.2.1-1
6349   - const XSD.String c_primitiveContent := "any content instance value"; // embedded value of a contentInstance
6350   -// const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS"; // resource type can be <CSEBase>, <AE>, <remoteCSE>
6351   - const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1"; // any resource type
6352   - const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2"; // any resource type
6353   -
  6300 + testcase TC_CSE_GMG_BV_014() runs on CseTester system CseSystem {
6354 6301 // Local variables
6355 6302 var MsgIn v_response;
6356   - var RequestPrimitive v_request;
6357   - var integer v_aeIndex := -1; // initialization with dummy value
6358   - var integer v_groupIndex := -1; // initialization with dummy value
6359   -
6360   - var template RequestPrimitive v_createRequest := m_createGroupBase;
6361   - var template RequestPrimitive v_updateRequest := m_updateGroupBase;
6362   - var template RequestPrimitive v_createMember;
6363   -
  6303 + var integer v_aeIndex := -1;
  6304 + var integer v_containerIndex1 := -1;
  6305 + var integer v_containerIndex2 := -1;
  6306 + var integer v_groupIndex := -1;
  6307 + var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
  6308 + var XSD.AnyURI v_memberID1;
  6309 + var XSD.AnyURI v_memberID2;
  6310 +
6364 6311 // Test control
6365 6312  
6366 6313 // Test component configuration
... ... @@ -6369,61 +6316,43 @@ module OneM2M_Testcases {
6369 6316 // Test adapter configuration
6370 6317  
6371 6318 // Preamble
  6319 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
  6320 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  6321 + v_containerIndex2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource
  6322 + v_memberID1 := f_getResourceAddress(v_containerIndex1);
  6323 + v_memberID2 := f_getResourceAddress(v_containerIndex2);
  6324 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberID1, v_memberID2}, omit, int3), v_aeIndex); // AE child resource
  6325 +
  6326 + v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {v_memberID2, v_memberID2};
  6327 + v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest);
6372 6328  
6373   - // and the IUT having registered the AE
6374   - v_aeIndex := f_cse_preamble_registerAe(); // create auxiliar AE
6375   -
6376   - // and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
6377   - // containing memberIDs attribute
6378   - // set to MEMBER_RESOURCE_ADDRESS_1
6379   - // and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
6380   - v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // build request primitive
6381   - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
6382   - v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // create resource
6383   -
6384   - // and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
6385   - // having resourceType attribute RESOURCE_TYPE_1
6386   - // and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
6387   - // having resourceType attribute RESOURCE_TYPE_1
6388   - v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1"); // build request primitive
6389   - f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex); // request new member
6390   - v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2"); // build request primitive
6391   - f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex); // request new member
6392   -
6393   -
6394 6329 //Test Body
6395   - v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
6396   -// v_request.to_ := c_targetResourceAddress;
6397   - v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(2, {c_memberResourceAddress2, c_memberResourceAddress2}, omit));
6398   -
6399   - mcaPort.send(m_request(v_request));
  6330 + mcaPort.send(m_request(v_updateRequest));
6400 6331 tc_ac.start;
6401 6332 alt {
6402 6333 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
6403 6334 tc_ac.stop;
6404 6335 setverdict(pass, testcasename() & ": update successful");
6405   -
6406   -
  6336 +
6407 6337 // check for membersId
6408 6338 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs)){
6409 6339 setverdict(fail, testcasename(), ": Error, memberIDs attribute not provided");
6410   - } else {
6411   -
  6340 + }
  6341 + else {
6412 6342 if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs) != 1) {
6413 6343 setverdict(fail, testcasename() & ": Error, wrong number of memberIDs attribute");
6414 6344 }
6415   - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != c_memberResourceAddress2){
  6345 + if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberIDs[0] != v_memberID2){
6416 6346 setverdict(fail, testcasename(), ": Error, memberIDs attribute not correct");
6417 6347 }
6418 6348 }
6419   -
6420 6349 }
6421 6350 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
6422 6351 tc_ac.stop;
6423   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  6352 + setverdict(fail, testcasename() & ": Error while updating resource");
6424 6353 }
6425 6354 [] tc_ac.timeout {
6426   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  6355 + setverdict(inconc, testcasename() & ": No answer while updating resource");
6427 6356 }
6428 6357 }
6429 6358  
... ... @@ -6435,68 +6364,36 @@ module OneM2M_Testcases {
6435 6364 }
6436 6365 } // end group g_CSE_GMG_BV_014
6437 6366  
6438   - /**
6439   - * @desc Check that the IUT validates the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’.
6440   - */
  6367 + //Test objective:
  6368 + //Check that the IUT validates the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’.
6441 6369 group g_CSE_GMG_BV_015 {
6442   - testcase TC_CSE_GMG_BV_015() runs on CseTester system CseSystem
6443   - {
6444   - //Local constants
6445   - const ResourceType c_ResourceTypeGroup := int9;
6446   - const ResourceType c_ResourceType1 := int4;
6447   - const MemberType c_memberType1 := int4; // should be set same type as c_ResourceType1
6448   - const XSD.String c_primitiveContent := "any content instance value"; // embedded value of a contentInstance
6449   -// const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
6450   - const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
6451   - const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
6452   -
  6370 + testcase TC_CSE_GMG_BV_015() runs on CseTester system CseSystem {
6453 6371 // Local variables
6454   - var MsgIn v_response;
6455   - var RequestPrimitive v_request;
6456   - var integer v_aeIndex := -1;
6457   - var integer v_groupIndex := -1;
6458   -
6459   - var template RequestPrimitive v_createRequest := m_createGroupBase;
6460   - var template RequestPrimitive v_updateRequest := m_updateGroupBase;
6461   - var template RequestPrimitive v_createMember;
6462   -
6463   - // Test control
6464   -
6465   - // Test component configuration
6466   - f_cf01Up();
6467   -
6468   - // Test adapter configuration
6469   -
6470   - // Preamble
6471   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
6472   -
6473   - // and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
6474   - // containing
6475   - // memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1
6476   - // memberType attribute set to RESOURCE_TYPE_1
6477   - // and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
6478   - v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
6479   - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
6480   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
6481   - v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
6482   -
6483   -
6484   - // and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
6485   - // having resourceType attribute RESOURCE_TYPE_1
6486   - // and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
6487   - // having resourceType attribute RESOURCE_TYPE_1
6488   - v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
6489   - f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
6490   - v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
6491   - f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
6492   -
6493   -
6494   - //Test Body
6495   - v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
6496   -// v_request.to_ := c_targetResourceAddress;
6497   - v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(1, {c_memberResourceAddress2}, omit));
6498   -
6499   - mcaPort.send(m_request(v_request));
  6372 + var MsgIn v_response;
  6373 + var integer v_aeIndex := -1;
  6374 + var integer v_containerIndex1 := -1;
  6375 + var integer v_containerIndex2 := -1;
  6376 + var integer v_groupIndex := -1;
  6377 + var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
  6378 +
  6379 + // Test control
  6380 +
  6381 + // Test component configuration
  6382 + f_cf01Up();
  6383 +
  6384 + // Test adapter configuration
  6385 +
  6386 + // Preamble
  6387 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
  6388 + v_containerIndex1 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer1"), v_aeIndex); // AE child resource
  6389 + v_containerIndex2 := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer2"), v_aeIndex); // AE child resource
  6390 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceAddress(v_containerIndex1)}, omit, int3), v_aeIndex);
  6391 +
  6392 + v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(v_containerIndex2)};
  6393 + v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest);
  6394 +
  6395 + // Test Body
  6396 + mcaPort.send(m_request(v_updateRequest));// TODO see if the memberTypeValidated is present in the update response
6500 6397 tc_ac.start;
6501 6398 alt {
6502 6399 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
... ... @@ -6505,7 +6402,8 @@ module OneM2M_Testcases {
6505 6402  
6506 6403 if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
6507 6404 setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
6508   - } else {
  6405 + }
  6406 + else {
6509 6407 if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated == false) {
6510 6408 setverdict(fail, testcasename(), ": Error, memberTypeValidated wrong value");
6511 6409 }
... ... @@ -6513,10 +6411,10 @@ module OneM2M_Testcases {
6513 6411 }
6514 6412 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
6515 6413 tc_ac.stop;
6516   - setverdict(fail, testcasename() & ": Error while retrieving resource");
  6414 + setverdict(fail, testcasename() & ": Error while updating resource");
6517 6415 }
6518 6416 [] tc_ac.timeout {
6519   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  6417 + setverdict(inconc, testcasename() & ": No answer while updating resource");
6520 6418 }
6521 6419 }
6522 6420  
... ... @@ -6528,33 +6426,21 @@ module OneM2M_Testcases {
6528 6426 }
6529 6427 } // end group g_CSE_GMG_BV_015
6530 6428  
  6429 + //Test objective:
  6430 + //Check that the IUT handles unsuccessful validation of the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is SET_MIXED.
6531 6431 group g_CSE_GMG_BV_016 {
6532   - // Check that the IUT handles unsuccessful validation of the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is SET_MIXED.
6533   - testcase TC_CSE_GMG_BV_016() runs on CseTester system CseSystem
6534   - {
6535   - //Local constants
6536   - const ResourceType c_ResourceTypeGroup := int9;
6537   - const ResourceType c_ResourceType1 := int4;
6538   - const ResourceType c_ResourceType2 := int5;
6539   - const MemberType c_memberType1 := int4; // should be set same type as c_ResourceType1
6540   - const MemberType c_memberType2 := int5; // should be set same type as c_ResourceType2
6541   - const MemberType c_memberType_MIXED := int0; // "mixed": TS-0004, Table 6.3.4.2.11-1
6542   - const XSD.String c_primitiveContent := "any embedded primitive_content";
6543   - const ConsistencyStrategy c_consistentcyStrategy := int3; // "SET_MIXED": TS-0004, Table 6.3.4.2.12-1
6544   -// const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
6545   - const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
6546   - const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
6547   -
  6432 +
  6433 + testcase TC_CSE_GMG_BV_016() runs on CseTester system CseSystem {
6548 6434 // Local variables
6549 6435 var MsgIn v_response;
6550   - var RequestPrimitive v_request;
6551   - var integer v_aeIndex := -1;
6552   - var integer v_groupIndex := -1;
6553   -
6554   - var template RequestPrimitive v_createRequest := m_createGroupBase;
6555   - var template RequestPrimitive v_updateRequest := m_updateGroupBase;
6556   - var template RequestPrimitive v_createMember;
6557   -
  6436 + var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
  6437 + var integer v_aeIndex := -1;
  6438 + var integer v_containerIndex := -1;
  6439 + var integer v_groupIndex := -1;
  6440 + var integer v_subGroupIndex := -1;
  6441 + var XSD.AnyURI v_memberID1;
  6442 + var XSD.AnyURI v_memberID2;
  6443 +
6558 6444 // Test control
6559 6445  
6560 6446 // Test component configuration
... ... @@ -6563,77 +6449,53 @@ module OneM2M_Testcases {
6563 6449 // Test adapter configuration
6564 6450  
6565 6451 // Preamble
6566   - v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
6567   -
6568   - // and the IUT having a resource at TARGET_RESOURCE_ADDRESS of type <group>
6569   - // containing
6570   - // memberIDs attribute set to MEMBER_RESOURCE_ADDRESS_1
6571   - // memberType attribute set to RESOURCE_TYPE_1
6572   - // memberTypeValidated attribute set to TRUE
6573   - // consistencyStrategy attribute set to SET_MIXED
6574   - // and the AE having privileges to perform UPDATE operation on the TARGET_RESOURCE_ADDRESS
6575   - v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
6576   - v_createRequest.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup(1, {c_memberResourceAddress1}, omit);
6577   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberType := c_memberType1;
6578   - v_createRequest.primitiveContent.any_1[0].Group_optional.memberTypeValidated := true;
6579   - v_createRequest.primitiveContent.any_1[0].Group_optional.consistencyStrategy := c_consistentcyStrategy;
6580   - v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
6581   -
6582   - // and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_1
6583   - // having resourceType attribute RESOURCE_TYPE_1
6584   - // and the IUT having a resource at MEMBER_RESOURCE_ADDRESS_2
6585   - // having resourceType attribute RESOURCE_TYPE_2
6586   - v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
6587   - f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
6588   - v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_2");
6589   - f_cse_createResource(c_ResourceType2, v_createMember, v_aeIndex);
6590   -
6591   -
6592   - //Test Body
6593   -
6594   - // the IUT receives an valid UPDATE request from AE containing
6595   - // To set to TARGET_RESOURCE_ADDRESS and
6596   - // From set to AE-ID and
6597   - // Content set to <group> resource containing
6598   - // memberIDs attribute set to
6599   - // MEMBER_RESOURCE_ADDRESS_1,
6600   - // MEMBER_RESOURCE_ADDRESS_2
6601   - v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
6602   -// v_request.to_ := c_targetResourceAddress;
6603   - v_request.primitiveContent.any_1[0].Group_optional := valueof(m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit));
6604   -
6605   - mcaPort.send(m_request(v_request));
  6452 + v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
  6453 + v_containerIndex := f_cse_createResource(int3, m_createContainer("NotInitialized", "MyContainer"), v_aeIndex);
  6454 + v_subGroupIndex := f_cse_createResource(int9, m_createGroupBase, v_aeIndex);
  6455 + v_memberID1 := f_getResourceAddress(v_containerIndex);
  6456 + v_memberID2 := f_getResourceAddress(v_subGroupIndex);
  6457 + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {v_memberID1}, omit, int3, int3), v_aeIndex); //Member type is set to Container (int3) and consistencyStrategy is set to MIXED (int3)
  6458 +
  6459 + v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {v_memberID1, v_memberID2};
  6460 + v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest);
  6461 +
  6462 + // Test Body
  6463 + mcaPort.send(m_request(v_updateRequest));// TODO see if the memberTypeValidated is present in the update response
6606 6464 tc_ac.start;
6607 6465 alt {
6608 6466 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
6609   - tc_ac.stop;
  6467 + tc_ac.stop;
6610 6468 setverdict(pass, testcasename() & ": update successful");
6611 6469  
6612   - //memberTypeValidated attribute set to FALSE
6613   - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
6614   - setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
6615   - } else {
6616   - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false) {
6617   - setverdict(fail, testcasename(), ": Error, memberTypeValidated must be FALSE");
6618   - }}
  6470 + //memberTypeValidated attribute set to FALSE
  6471 + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated)) {
  6472 + setverdict(fail, testcasename(), ": Error, memberTypeValidated attribute not provided");
  6473 + }
  6474 + else {
  6475 + if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberTypeValidated != false) {
  6476 + setverdict(fail, testcasename(), ": Error, memberTypeValidated must be FALSE");
  6477 + }
  6478 + }
6619 6479  
6620 6480 //memberType attribute set to MIXED
6621   - if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)) {
  6481 + if(not ispresent(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType)) {
6622 6482 setverdict(fail, testcasename(), ": Error, memberType attribute not provided");
6623   - } else {
6624   - if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != c_memberType_MIXED) {
  6483 + }
  6484 + else {
  6485 + if(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].Group_optional.memberType != int0) { //Mixed is int0 in release 2 and int24 in release 1
6625 6486 setverdict(fail, testcasename(), ": Error, memberType was not set to MIXED");
6626   - }}
  6487 + }
  6488 + }
6627 6489  
6628   - }
6629   - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
6630   - tc_ac.stop;
6631   - setverdict(fail, testcasename() & ": Error while retrieving resource");
6632   - }
6633   - [] tc_ac.timeout {
6634   - setverdict(inconc, testcasename() & ": No answer while retrieving resource");
6635   - }
6636   - }
  6490 + }
  6491 + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  6492 + tc_ac.stop;
  6493 + setverdict(fail, testcasename() & ": Error while retrieving resource");
  6494 + }
  6495 + [] tc_ac.timeout {
  6496 + setverdict(inconc, testcasename() & ": No answer while retrieving resource");
  6497 + }
  6498 + }
6637 6499  
6638 6500 //Postamble
6639 6501 f_cse_postamble_deleteResources();
... ... @@ -6642,108 +6504,77 @@ module OneM2M_Testcases {
6642 6504 f_cf01Down();
6643 6505 }
6644 6506 } // end group g_CSE_GMG_BV_016
6645   -
6646   - group g_CSE_GMG_BV_017 {
6647   - // Test objective: Check that the IUT handles unsuccessful validation of the resource type during an UPDATE of the <group> resource when memberType attribute is not ‘mixed’ and the consistencyStrategy attribute is ABANDON_MEMBER.
6648   - testcase TC_CSE_GMG_BV_017() runs on CseTester system CseSystem
6649   - {
6650   - //Local constants
6651   - const ResourceType c_ResourceTypeGroup := int9;
6652   - const ResourceType c_ResourceType1 := int4;
6653   - const ResourceType c_ResourceType2 := int5;
6654   - const MemberType c_memberType1 := int4; // should be set same type as c_ResourceType1
6655   - const MemberType c_memberType2 := int5; // should be set same type as c_ResourceType2
6656   - const XSD.String c_primitiveContent := "primitive_content";
6657   - const ConsistencyStrategy c_consistentcyStrategy := int1; // ABANDOND_MEMBER: TS-0004, Table 6.3.4.2.12-1
6658   -// const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
6659   - const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
6660   - const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
6661   -
6662   - // Local variables
6663   - var MsgIn v_response;
6664   - var RequestPrimitive v_request;
6665   - var integer v_aeIndex := -1;
6666   - var integer v_groupIndex := -1;