Commit 2d09c4e1 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Implemented changes according to TDE-2019-0043R01 for:



TC_CSE_REG_CRE_001, TC_CSE_REG_CRE_002 and TC_CSE_REG_CRE_003
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 2679037f
......@@ -1720,6 +1720,114 @@ module OneM2M_PermutationFunctions {
group Create{
function f_CSE_REG_CRE_001(in XSD.ID v_aeIdStem) runs on AeSimu {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
var universal charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & PX_ALLOWED_C_AE_IDS[0];
//Test control
if(v_aeIdStem[0] == "S") {
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
action(v_action);
f_sleepIgnoreDef(PX_TCONFIG_IUT);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, PX_CSE_ID & "/" & v_aeIdStem));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2);
setverdict(pass, __SCOPE__ & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
function f_CSE_REG_CRE_002(in XSD.ID v_aeIdStem) runs on AeSimu {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
//Test control
if(v_aeIdStem[0] == "S") {
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, v_aeIdStem));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{
tc_ac.stop;
f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2);
setverdict(pass, __SCOPE__ & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
function f_CSE_REG_CRE_012(in template RequestPrimitive p_createAe) runs on AeSimu {
//Local variables
......
......@@ -436,167 +436,115 @@ module OneM2M_Testcases_CSE_Release_1 {
group Create{
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_ AE_ID.
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_RELATIVE_ AE_ID.
*
*/
testcase TC_CSE_REG_CRE_001() runs on Tester system CseSystem {
testcase TC_CSE_REG_CRE_001_CAE() runs on Tester system CseSystem {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_ae1.start(f_CSE_REG_CRE_001());
v_ae1.start(f_CSE_REG_CRE_001(PX_ALLOWED_C_AE_IDS[0]));
v_ae1.done;
}
function f_CSE_REG_CRE_001() runs on AeSimu {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
var universal charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & PX_ALLOWED_C_AE_IDS[0];
//Test control
if(not(PICS_IN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
stop;
}
testcase TC_CSE_REG_CRE_001_SAE() runs on Tester system CseSystem {
// Test component configuration
f_cf01Up();
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
//Preamble
action(v_action);
f_sleepIgnoreDef(PX_TCONFIG_IUT);
v_ae1.start(f_CSE_REG_CRE_001(PX_ALLOWED_S_AE_IDS[0]));
v_ae1.done;
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, PX_CSE_ID & "/" & PX_ALLOWED_C_AE_IDS[0]));
}
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned AE_ID_STEM of AE-ID-Stem format.
*
*/
testcase TC_CSE_REG_CRE_002_CAE() runs on Tester system CseSystem {
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2);
v_ae1.start(f_CSE_REG_CRE_002(PX_ALLOWED_C_AE_IDS[0]));
v_ae1.done;
setverdict(pass, __SCOPE__ & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
testcase TC_CSE_REG_CRE_002_SAE() runs on Tester system CseSystem {
// Tear down
f_cf01Down();
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_ae1.start(f_CSE_REG_CRE_002(PX_ALLOWED_S_AE_IDS[0]));
v_ae1.done;
}
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned AE_ID of AE-ID-Stem format.
*
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned S-AE-ID-STEM.
*/
testcase TC_CSE_REG_CRE_002() runs on Tester system CseSystem {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
testcase TC_CSE_REG_CRE_003() runs on Tester system CseSystem {
v_ae1.start(f_CSE_REG_CRE_002());
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_ae1.done;
v_cse1.start(f_CSE_REG_CRE_003());
v_cse1.done;
}
function f_CSE_REG_CRE_002() runs on AeSimu {
function f_CSE_REG_CRE_003() runs on CseSimu {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
//Local variables
var MsgIn v_request;
var template RequestPrimitive v_requestPrimitive;
//Test control
// Test component configuration
f_cf01Up();
f_cf02UpCseSimuMaster(int1);
//Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, PX_ALLOWED_C_AE_IDS[0]));
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_ALLOWED_S_AE_IDS[0])));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
v_requestPrimitive := mw_createAEAnnc_s_ae_id(PX_CSE_ID & PX_ALLOWED_S_AE_IDS[0], -, -, PX_CSE_ID & PX_ALLOWED_S_AE_IDS[0]);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{
alt{
[] mccPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2);
setverdict(pass, __SCOPE__ & ": AE successfully created.");
setverdict(pass, __SCOPE__ & ": AE creation redirected.");
f_cse_sendResponse_cseSimu(v_request);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
[] mccPortIn.receive(mw_request(mw_createAEAnnc())) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
setverdict(fail, __SCOPE__ & ": AE creation redirected but wrong parameters");
f_cse_sendResponse_cseSimu(v_request);
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
// Postamble
f_cse_postamble_deleteResources();
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf01Down();
}
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_AE_ID.
*/
testcase TC_CSE_REG_CRE_003() runs on Tester system CseSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_CSE_REG_CRE_003());
v_cse1.done;
}
function f_CSE_REG_CRE_003() runs on CseSimu {
var integer v_remoteCseIndex := -1;
//Test Configuration
//f_cf02Up();
//Preamble
v_remoteCseIndex := f_cse_registrationRemoteCse();
vc_ae1 := AeSimu.create("AE1") alive;
vc_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
vc_ae1.done;
vc_ae1.start(f_cse_preamble_registerAe());
vc_ae1.done;
f_cf02DownCseSimuMaster();
}
......@@ -688,6 +636,7 @@ module OneM2M_Testcases_CSE_Release_1 {
function f_CSE_REG_CRE_005() runs on CseSimu {
//Local variables
var MsgIn v_request;
var template RequestPrimitive v_requestPrimitive;
const charstring v_cseId := PX_CSE_ID;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment