Skip to content
Snippets Groups Projects
Commit 2ceb7734 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Merge branch 'STF531-REG-CRE' into Release1

parents cfc21c69 15275058
No related branches found
No related tags found
No related merge requests found
......@@ -1802,12 +1802,13 @@ module OneM2M_Functions {
var PrimitiveContent v_modifiedResource;
var integer v_resourceIndex, v_parentIndex;
var RequestPrimitive v_rp;
var charstring v_action := "Please, register the AE on the Tester";
if(not(ispresent(p_utRequest.primitiveContent))) {
p_utRequest.primitiveContent.aE := m_contentCreateAe(omit, omit, omit, omit);
}
f_sendUtPrimitive(p_utRequest);
f_sendUtPrimitive(p_utRequest, v_action);
tc_ac.start;
alt {
......@@ -1851,12 +1852,13 @@ module OneM2M_Functions {
var PrimitiveContent v_modifiedResource;
var integer v_resourceIndex, v_parentIndex;
var RequestPrimitive v_rp;
var charstring v_action := "Please, create a Container resource on the Tester";
if(not(ispresent(p_utRequest.primitiveContent))) {
p_utRequest.primitiveContent.container := m_contentCreateContainer;
}
f_sendUtPrimitive(p_utRequest);
f_sendUtPrimitive(p_utRequest, v_action);
tc_ac.start;
alt {
......@@ -2718,6 +2720,23 @@ module OneM2M_Functions {
group CommonFunctions {
/**
* @desc Sending of an Adapter Control primitive
* @param event Action to be performed by TA
* @param data Corresponding information for the correct execution of the given action
* @verdict
*/
function f_bool2str(in boolean p_bool) runs on Tester return charstring {
var charstring v_bool;
if (p_bool){
v_bool := "true";
}else{
v_bool := "false";
}
return v_bool;
}
/**
* @desc Sending of an Adapter Control primitive
* @param event Action to be performed by TA
......@@ -2806,27 +2825,37 @@ module OneM2M_Functions {
}
function f_sendUtPrimitive(template UtTriggerPrimitive p_utRequest) runs on Tester {
function f_sendUtPrimitive(template UtTriggerPrimitive p_utRequest, in charstring p_action) runs on Tester {
p_utRequest.from_ := "UNINITIALIZED";
p_utRequest.requestIdentifier := "m_uttriggerPrimitive" & f_rnd(1, 1000000);
utPort.send(valueof(p_utRequest));
tc_wait.start;
alt{
[] utPort.receive(mw_utResponseOK) {
tc_wait.stop;
setverdict(pass, __SCOPE__, " : Triggering message is successfully received!");
}
[] utPort.receive(mw_utResponseKO) {
tc_wait.stop;
setverdict(inconc, __SCOPE__, " : Error while receiving Triggering message!");
}
[] tc_wait.timeout{
setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
if (PX_UT_IMPLEMENTED){
p_utRequest.from_ := "UNINITIALIZED";
p_utRequest.requestIdentifier := "m_uttriggerPrimitive" & f_rnd(1, 1000000);
utPort.send(valueof(p_utRequest));
tc_wait.start;
alt{
[] utPort.receive(mw_utResponseOK) {
tc_wait.stop;
setverdict(pass, __SCOPE__, " : Triggering message is successfully received!");
}
[] utPort.receive(mw_utResponseKO) {
tc_wait.stop;
setverdict(inconc, __SCOPE__, " : Error while receiving Triggering message!");
}
[] tc_wait.timeout{
setverdict(inconc, __SCOPE__, " : Timeout due to no response received from requested SUT!");
}
}
}else{
action(__SCOPE__ & ":" & p_action);
}
}
......
......@@ -27,6 +27,8 @@ module OneM2M_Pixits {
modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080";
modulepar boolean PX_UT_IMPLEMENTED := false;
/**
* @desc IUT CSE Name
*/
......@@ -57,6 +59,14 @@ module OneM2M_Pixits {
*/
modulepar XSD.ID PX_SUPER_CSE_ID := "/admin:admin";
modulepar XSD.IDREFS PX_ALLOWED_C_AE_IDS := {"C"};
modulepar XSD.IDREFS PX_NOT_ALLOWED_C_AE_IDS := {"MyAe"};
modulepar XSD.IDREFS PX_ALLOWED_S_AE_IDS := {"S"};
modulepar XSD.IDREFS PX_NOT_ALLOWED_S_AE_IDS := {"MyAe"};
modulepar AddressingMethod PX_ADDRESSING_METHOD := e_hierarchical;
modulepar PrimitiveScope PX_PRIMITIVE_SCOPE := e_cseRelative;
......@@ -67,7 +77,8 @@ module OneM2M_Pixits {
modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols""";
modulepar ListOfURIs PX_ACOR := {"*"};
modulepar ListOfURIs PX_ACOR := {"*"};
}
group TesterParameters {
......
This diff is collapsed.
......@@ -870,13 +870,19 @@ module OneM2M_Testcases_CSE {
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
//Test control
if(not(PICS_IN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
//Preamble
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "SAE-ID-STEM"));
v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
......@@ -970,7 +976,7 @@ module OneM2M_Testcases_CSE {
//Preamble
v_remoteCseIndex := f_cse_registrationRemoteCse();
vc_ae1 := AeSimu.create("AE1") alive;
//vc_ae1.start(f_a);
vc_ae1.start(f_cse_preamble_registerAe());
}
......@@ -997,8 +1003,9 @@ module OneM2M_Testcases_CSE {
//Test Body
//v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "C"));
v_request := f_getCreateRequestPrimitive(int2, m_createAe(PX_APP_ID, omit, PX_NOT_ALLOWED_C_AE_IDS[0]), -1);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
......@@ -2742,9 +2749,10 @@ module OneM2M_Testcases_CSE {
var ResourceType v_resourceType := int16; //remoteCSE
var template PrimitiveContent v_contentResponse;
var template UtTriggerPrimitive v_utRequest;
var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS;
// Test control
if(not(PICS_MN_CSE)) {
if(not(PICS_MN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
stop;
}
......@@ -2760,7 +2768,7 @@ module OneM2M_Testcases_CSE {
//Send Trigger Message
v_utRequest := m_utRetrieveResource(f_getLocalResourceAddress(vc_remoteCseIndex), PX_CSE_ID);
v_utRequest.from_ := "UNINITIALIZED";
f_sendUtPrimitive(v_utRequest);
f_sendUtPrimitive(v_utRequest, v_action);
tc_ac.start;
alt {
......@@ -3020,10 +3028,11 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_UPD_003_ET() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"expirationTime", omit};
var AttributeAux c_optionalAttribute;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
c_optionalAttribute := {"expirationTime", valueof(v_updateRequest).primitiveContent.remoteCSE.expirationTime};
v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
v_cse1.done;
......@@ -3033,10 +3042,11 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_UPD_003_LBL() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"labels", omit};
var AttributeAux c_optionalAttribute;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_updateRequest.primitiveContent.remoteCSE.labels := {"MyLabel"};
c_optionalAttribute := {"labels", valueof(v_updateRequest).primitiveContent.remoteCSE.labels[0]};
v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
v_cse1.done;
......@@ -3046,10 +3056,11 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_UPD_003_POA() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"pointofAccess", omit};
var AttributeAux c_optionalAttribute;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
c_optionalAttribute := {"pointofAccess", valueof(v_updateRequest).primitiveContent.remoteCSE.pointOfAccess[0]};
v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
v_cse1.done;
......@@ -3059,10 +3070,11 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_UPD_003_NL() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"nodeLink", omit};
var AttributeAux c_optionalAttribute;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_updateRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
c_optionalAttribute := {"nodeLink", valueof(v_updateRequest).primitiveContent.remoteCSE.nodeLink};
v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
v_cse1.done;
......@@ -3072,10 +3084,11 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_REG_UPD_003_RR() runs on Tester system CseSystem {
// Local variables
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"requestReachability", omit};
var AttributeAux c_optionalAttribute;
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_updateRequest.primitiveContent.remoteCSE.requestReachability := true;
c_optionalAttribute := {"requestReachability", f_bool2str(valueof(v_updateRequest).primitiveContent.remoteCSE.requestReachability)};
v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute));
v_cse1.done;
......@@ -3089,6 +3102,7 @@ module OneM2M_Testcases_CSE {
var RequestPrimitive v_request;
var ResourceType v_resourceType := int16; //remoteCSE
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing attribute " & p_Attribute.name & " set to " & p_Attribute.value_;
// Test control
if(not(PICS_MN_CSE)) {
......@@ -3107,7 +3121,7 @@ module OneM2M_Testcases_CSE {
//Send Trigger Message
v_utRequest.to_ := f_getResourceAddress();
v_utRequest.from_ := "UNINITIALIZED";
f_sendUtPrimitive(v_utRequest);
f_sendUtPrimitive(v_utRequest, v_action);
// Test Body
v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive);
......@@ -3312,6 +3326,7 @@ module OneM2M_Testcases_CSE {
var template UtTriggerPrimitive v_utRequest := m_utDeleteRequest;
var UtTriggerAckPrimitive v_trigger_response;
var integer v_auxInteger;
var charstring v_action := "Please, send a valid DELETE Request containing To set to " & PX_CSE1_ADDRESS;
// Test control
// Test component configuration
......@@ -3326,7 +3341,7 @@ module OneM2M_Testcases_CSE {
v_auxInteger := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentCreateRemoteCSE(omit,omit,omit,omit))), int16);
v_utRequest.to_ := f_getResourceAddress(v_auxInteger);
v_utRequest.from_ := "UNINITIALIZED";
f_sendUtPrimitive(v_utRequest);
f_sendUtPrimitive(v_utRequest, v_action);
// Test Body
tc_ac.start;
......@@ -7789,7 +7804,12 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) { //ResourceType != AE
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -8096,7 +8116,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) { //ResourceType != AE
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -8265,7 +8287,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) { //ResourceType != AE
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -8275,9 +8299,9 @@ module OneM2M_Testcases_CSE {
}
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
......@@ -8518,7 +8542,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) { //ResourceType != AE
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -8528,9 +8554,9 @@ module OneM2M_Testcases_CSE {
}
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
......@@ -8659,7 +8685,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) { //ResourceType != AE
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -8669,9 +8697,9 @@ module OneM2M_Testcases_CSE {
}
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
......@@ -8796,7 +8824,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) { //ResourceType != AE
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -8806,9 +8836,9 @@ module OneM2M_Testcases_CSE {
}
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
}else{
vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
......@@ -14074,7 +14104,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) {
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -14707,7 +14739,9 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(p_resourceType != int2) {
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
}
if(p_resourceType != int1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment