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

Registration test cases renaming

parent acfc0239
No related branches found
No related tags found
1 merge request!25Ae fixes
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TestControl.ttcn $
* $Id: OneM2M_TestControl.ttcn 321 2017-07-14 18:16:07Z reinaortega $
* $Id: OneM2M_TestControl.ttcn 322 2017-07-14 19:53:18Z reinaortega $
* @desc Test control module for oneM2M
*
*/
......@@ -29,14 +29,25 @@ module OneM2M_TestControl {
execute(TC_CSE_GEN_DEL_001_CSR());
execute(TC_CSE_GEN_DEL_001_SPR());
execute(TC_CSE_GEN_DEL_001_ABS());
execute(TC_CSE_REG_BV_001());
execute(TC_CSE_REG_BV_002());
execute(TC_CSE_REG_BV_003());
execute(TC_CSE_REG_BV_004());
execute(TC_CSE_REG_BV_005());
execute(TC_CSE_REG_BV_006());
execute(TC_CSE_REG_BV_007());
execute(TC_CSE_DMR_BV_001_01());
execute(TC_CSE_REG_CRE_001());
execute(TC_CSE_REG_CRE_002());
execute(TC_CSE_REG_CRE_004());
execute(TC_CSE_REG_CRE_005());
execute(TC_CSE_REG_CRE_008());
execute(TC_CSE_REG_CRE_009());
execute(TC_CSE_REG_CRE_010());
execute(TC_CSE_REG_CRE_015());
execute(TC_CSE_REG_CRE_018());
execute(TC_CSE_REG_CRE_021());
execute(TC_CSE_REG_CRE_022());
execute(TC_CSE_REG_CRE_024());
execute(TC_CSE_REG_CRE_026());
execute(TC_CSE_REG_RET_001());
execute(TC_CSE_REG_RET_005());
execute(TC_CSE_REG_RET_008());
execute(TC_CSE_REG_UPD_001());
execute(TC_CSE_REG_DEL_001());
execute(TC_CSE_DMR_CRE_001_01());
execute(TC_CSE_DMR_BV_001_02());
execute(TC_CSE_DMR_BV_001_03());
execute(TC_CSE_DMR_BV_002_01());
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 321 2017-07-14 18:16:07Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 322 2017-07-14 19:53:18Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -787,399 +787,440 @@ module OneM2M_Testcases {
} // end of group Generic
group Registration {
testcase TC_CSE_REG_BV_001() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preamble
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
group Create{
// Tear down
f_cf01Down();
/**
* @desc Check that the IUT accepts an AE registration (allowed App-ID, C-AE-ID-STEM not provided by AE)
*
*/
testcase TC_CSE_REG_CRE_001() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preamble
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
}
testcase TC_CSE_REG_BV_002() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
}
testcase TC_CSE_REG_BV_003() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi);
// Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation rejected.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
}
testcase TC_CSE_REG_BV_004() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation rejected.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
mcaPort.send(m_request(v_request));
// Tear down
f_cf01Down();
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
}
testcase TC_CSE_REG_BV_005() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
// Tear down
f_cf01Down();
}
/**
* @desc Check that the IUT sends a registration CREATE Request with the value of the attribute ATTRIBUTE_NAME of the AE resource
*
*/
testcase TC_CSE_REG_CRE_002() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createAEAnnc(-, -, -))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE successfully created.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
}
testcase TC_CSE_REG_BV_006() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var ResourceType v_resourceType := int2;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAeWithId("C-AE-ID-STEM");//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_aeIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation rejected.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4105))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
/**
* @desc Check that the IUT rejects an AE registration (not allowed App-ID)
*
*/
testcase TC_CSE_REG_CRE_018() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
// Tear down
f_cf01Down();
}
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi);
// Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation rejected.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
/**
* @desc Check that the IUT rejects an AE registration (allowed App-ID, not allowed C-AE-ID-STEM provided by AE)
*
*/
testcase TC_CSE_REG_CRE_004() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf01Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(-);//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
testcase TC_CSE_REG_BV_007() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation rejected.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
/**
* @desc Check that the IUT accepts an AE registration (allowed App-ID, S-AE-ID-STEM not provided by AE)
*
*/
testcase TC_CSE_REG_CRE_005() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));
v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createAEAnnc("/S", "CSE_ID", -))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
alt {
[] mccPort.receive(mw_request(mw_createAEAnnc(-, -, -))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
// Tear down
f_cf02Down();
/**
* @desc Check that the IUT rejects registration of already registered AE (C-AE-ID-STEM provided by AE)
*
*/
testcase TC_CSE_REG_CRE_026() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var ResourceType v_resourceType := int2;
}
testcase TC_CSE_REG_BV_008() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_registerAe();
f_cse_postamble_deleteResources(); //to deregister the AE, I don't know if it's correct like this?
//Test Body
v_request := valueof(m_createAEAnnc(-, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM")); //TODO to double check all parameters
v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
mccPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
//continue to test the content
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAeWithId("C-AE-ID-STEM");//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_aeIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation rejected.");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4105))) -> value v_response{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
// Tear down
f_cf02Down();
}
/**
* @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), transfer request to the IN-CSE
*
*/
testcase TC_CSE_REG_CRE_008() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));
v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createAEAnnc("/S", "CSE_ID", -))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
}
testcase TC_CSE_REG_BV_009() runs on CseTester system CseSystem {
var MsgIn v_response;
var ResponsePrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
// Tear down
f_cf02Down();
}
/**
* @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), communication between MN-CSE and IN-CSE
*
*/
testcase TC_CSE_REG_CRE_009() runs on CseTester system CseSystem {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_registerAe();
f_cse_postamble_deleteResources(); //to deregister the AE, I don't know if it's correct like this?
//Test Body
v_request := valueof(m_createAEAnnc(-, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM")); //TODO to double check all parameters
v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
mccPort.send(m_request(v_request));
tc_ac.start;
//Test Body
v_request := valueof(m_responsePrimitive(int2001, "To_be_defined", {aEAnnc := m_contentCreateAEAnnc({"Credential-ID:None"}, omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")}));
mccPort.send(m_response(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation success.");
//continue to test the content
}
[] mcaPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
//continue to test the content
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf02Down();
}
// Tear down
f_cf02Down();
/**
* @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), transfer response to the AE
*
*/
testcase TC_CSE_REG_CRE_010() runs on CseTester system CseSystem {
var MsgIn v_response;
var ResponsePrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test component configuration
f_cf02Up();
//Preambule
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_responsePrimitive(int2001, "To_be_defined", {aEAnnc := m_contentCreateAEAnnc({"Credential-ID:None"}, omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")}));
mccPort.send(m_response(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation success.");
//continue to test the content
}
[] mcaPort.receive {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
} //end TC_CSE_REG_BV_009
// Tear down
f_cf02Down();
} //end TC_CSE_REG_CRE_010
group Create{
testcase TC_CSE_REG_CRE_BI_001() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT rejects the create request of <CSEBase> resource.
*
*/
testcase TC_CSE_REG_CRE_024() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
......@@ -1224,7 +1265,11 @@ module OneM2M_Testcases {
}//end TC_CSE_REG_CRE_BI_001
testcase TC_CSE_REG_CRE_BV_011() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT accepts an create request of <remoteCSE> resource with attributes multiplicity equals to 1.
*
*/
testcase TC_CSE_REG_CRE_021() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
......@@ -1268,7 +1313,11 @@ module OneM2M_Testcases {
}//end TC_CSE_REG_CRE_BV_011
testcase TC_CSE_REG_CRE_BV_012() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT accepts an create request of <remoteCSE> resource with attributes multiplicity equals to 1 without the preconfigured CSE-ID
*
*/
testcase TC_CSE_REG_CRE_022() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
......@@ -1310,55 +1359,59 @@ module OneM2M_Testcases {
// Tear down
f_cf04Down();
}//end TC_CSE_REG_CRE_BV_012
}//end TC_CSE_REG_CRE_022
group g_CSE_REG_CRE_BV_015{
group g_CSE_REG_CRE_015{
testcase TC_CSE_REG_CRE_BV_015_01() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT accepts a create request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE.
*
*/
testcase TC_CSE_REG_CRE_015_LBL() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"labels", omit};
v_createRequest.primitiveContent.remoteCSE.labels := {"MyLabel"};
f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute);
f_CSE_REG_CRE_015(v_createRequest, c_optionalAttribute);
}
testcase TC_CSE_REG_CRE_BV_015_02() runs on CseTester system CseSystem {
testcase TC_CSE_REG_CRE_015_CST() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"cseType", omit};
v_createRequest.primitiveContent.remoteCSE.cseType := int1;
f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute);
f_CSE_REG_CRE_015(v_createRequest, c_optionalAttribute);
}
testcase TC_CSE_REG_CRE_BV_015_03() runs on CseTester system CseSystem {
testcase TC_CSE_REG_CRE_015_POA() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"pointOfAccess", omit};
v_createRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"};
f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute);
f_CSE_REG_CRE_015(v_createRequest, c_optionalAttribute);
}
testcase TC_CSE_REG_CRE_BV_015_04() runs on CseTester system CseSystem {
testcase TC_CSE_REG_CRE_015_NL() runs on CseTester system CseSystem {
// Local variables
var template RequestPrimitive v_createRequest := m_createRemoteCSEBase;
const AttributeAux c_optionalAttribute := {"nodeLink", omit};
v_createRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID;
f_CSE_REG_CRE_BV_015(v_createRequest, c_optionalAttribute);
f_CSE_REG_CRE_015(v_createRequest, c_optionalAttribute);
}
function f_CSE_REG_CRE_BV_015(template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseTester {
function f_CSE_REG_CRE_015(template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseTester {
// Local variables
var MsgIn v_response;
......@@ -1410,7 +1463,11 @@ module OneM2M_Testcases {
group Retrieve{
testcase TC_CSE_REG_RET_BV_001() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT accepts an retrieval request of <CSEBase> resource and responds with all attributes that have multiplicity equals to 1.
*
*/
testcase TC_CSE_REG_RET_001() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
......@@ -1457,9 +1514,13 @@ module OneM2M_Testcases {
// Tear down
f_cf01Down();
}//end TC_CSE_REG_RET_BV_005
}//end TC_CSE_REG_RET_001
testcase TC_CSE_REG_RET_BV_005() runs on CseTester system CseSystem {
/**
* @desc Check that if the IUT is IN-CSE, it accepts an retrieval request of <CSEBase> resource and returns the cseType attribute. cseType Attribute is mandatory for IN-CSE
*
*/
testcase TC_CSE_REG_RET_005() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
......@@ -1522,7 +1583,11 @@ module OneM2M_Testcases {
}//end TC_CSE_REG_RET_BV_005
testcase TC_CSE_REG_RET_BV_006() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT accepts a retrieval request of <CSEBase> resource and responds with supportedResourceTypes attribute containing a list of the supported resources and pointOfAccess containing the list of physical addresses to be used by Registree to connect to this CSE (e.g. IP address, FQDN).
*
*/
testcase TC_CSE_REG_RET_008() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
......@@ -1582,13 +1647,17 @@ module OneM2M_Testcases {
// Tear down
f_cf01Down();
}//end TC_CSE_REG_RET_BV_006
}//end TC_CSE_REG_RET_008
} //end group Retrieve
group Update{
testcase TC_CSE_REG_UPD_BI_001() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT rejects the update request of <CSEBase> resource.
*
*/
testcase TC_CSE_REG_UPD_001() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
......@@ -1638,7 +1707,11 @@ module OneM2M_Testcases {
group Delete{
testcase TC_CSE_REG_DEL_BI_001() runs on CseTester system CseSystem {
/**
* @desc Check that the IUT rejects the delete request of <CSEBase> resource.
*
*/
testcase TC_CSE_REG_DEL_001() runs on CseTester system CseSystem {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
......
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