Skip to content
Snippets Groups Projects
Commit 70a19058 authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Merge branch 'STF531-REG-CRE' of https://git.onem2m.org/TST/ATS into STF531-REG-CRE

parents c9bfa940 ef00b150
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
*/
......
......@@ -2749,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;
}
......@@ -2767,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 {
......@@ -3027,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;
......@@ -3040,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;
......@@ -3053,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;
......@@ -3066,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;
......@@ -3079,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;
......@@ -3096,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)) {
......@@ -3114,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);
......@@ -3319,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
......@@ -3333,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;
......
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