Skip to content
Snippets Groups Projects

#1 TC_CSE_LOC_BV_007 and TC_CSE_LOC_BV_008 inconc verdict if disabled

Merged #1 TC_CSE_LOC_BV_007 and TC_CSE_LOC_BV_008 inconc verdict if disabled
Merged Bogdan Stanca-Kaposta requested to merge fix/verdict_on_disabled_tc into Release1
+ 91
86
Compare changes
  • Side-by-side
  • Inline
@@ -5347,53 +5347,56 @@ module OneM2M_Testcases_CSE_Release_2 {
@@ -5347,53 +5347,56 @@ module OneM2M_Testcases_CSE_Release_2 {
var MsgIn v_response;
var MsgIn v_response;
var LocationSource v_locationSource := int2;//Device-based
var LocationSource v_locationSource := int2;//Device-based
var integer v_resourceIndex := -1;
var integer v_resourceIndex := -1;
 
 
//Test control
 
if(not(PICS_ASN_CSE)) {
 
setverdict(inconc, __SCOPE__ & ": IUT shall support ASN-CSE to run this test case. Set PX_ASN_CSE to true to run this test case");
 
stop;
 
}
 
//Test component configuration
//Test component configuration
f_cf01Up();
f_cf01Up();
//Preamble
if(PX_ASN_CSE){
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
//Preamble
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit), v_aeAuxIndex);
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
// Test Body
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit), v_aeAuxIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
// Test Body
alt {
mcaPort.send(m_request(v_request));
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.start;
tc_ac.stop;
alt {
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive);
tc_ac.stop;
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkAeSimuStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
// Postamble
tc_ac.stop;
f_cse_postamble_deleteResources();
setverdict(fail, __SCOPE__ & ": Wrong response status code");
 
}
 
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
 
tc_ac.stop;
 
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
 
}
 
[] tc_ac.timeout {
 
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
 
}
 
}
 
 
f_checkAeSimuStatus();
 
 
//Check to see if the resource is present or not
 
if(f_isResourcePresent(v_resourceIndex)) {
 
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
 
} else {
 
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
 
}
 
 
// Postamble
 
f_cse_postamble_deleteResources();
}
// Tear down
// Tear down
f_cf01Down();
f_cf01Down();
@@ -5412,53 +5415,55 @@ module OneM2M_Testcases_CSE_Release_2 {
@@ -5412,53 +5415,55 @@ module OneM2M_Testcases_CSE_Release_2 {
var MsgIn v_response;
var MsgIn v_response;
var integer v_resourceIndex := -1;
var integer v_resourceIndex := -1;
 
//Test control
 
if(not(PICS_MN_CSE)) {
 
setverdict(inconc, __SCOPE__ & ": IUT shall support MN-CSE to run this test case. Set PX_MN_CSE to true to run this test case");
 
stop;
 
}
 
//Test component configuration
//Test component configuration
f_cf01Up();
f_cf01Up();
//Preamble
if(PX_MN_CSE){
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
//Preamble
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex);
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
// Test Body
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
// Test Body
alt {
mcaPort.send(m_request(v_request));
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.start;
tc_ac.stop;
alt {
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive);
tc_ac.stop;
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
f_checkAttributesToBeSaved(int10, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkAeSimuStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
// Postamble
tc_ac.stop;
f_cse_postamble_deleteResources();
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
 
tc_ac.stop;
 
setverdict(fail, __SCOPE__ & ": Error occurrs with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)) & "while handling a valid locationPolicy resource create request!");
 
}
 
[] tc_ac.timeout {
 
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
 
}
 
}
 
 
f_checkAeSimuStatus();
 
 
//Check to see if the resource is present or not
 
if(f_isResourcePresent(v_resourceIndex)) {
 
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
 
} else {
 
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
 
}
 
 
//Postamble
 
f_cse_postamble_deleteResources();
 
// Tear down
// Tear down
f_cf01Down();
f_cf01Down();
Loading