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

New test case TC_CSE_RT_BR_001 implemented according to TDE-2019-0087


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 2671b317
......@@ -140,12 +140,13 @@ module OneM2M_Pics {
}
/**
* @desc Non-Blocking Requests
* @see oneM2M TS-0017 A.X.Y.Z
* @desc Requests handling
* @see oneM2M TS-0017 A.5.4-1
*/
group NonBlocking {
modulepar boolean PICS_NON_BLOCKING_REQUEST_SYNCH := true; //TO BE DEFINED IN TS-0017
modulepar boolean PICS_NON_BLOCKING_REQUEST_ASYNCH := true; //TO BE DEFINED IN TS-0017
modulepar boolean PICS_BLOCKING_REQUEST := true;
modulepar boolean PICS_NON_BLOCKING_REQUEST_SYNCH := true;
modulepar boolean PICS_NON_BLOCKING_REQUEST_ASYNCH := true;
}
}
......
......@@ -10242,6 +10242,77 @@ module OneM2M_PermutationFunctions {
} //end group PollingChannel
group Response_Type {
group Blocking_Requests {
function f_CSE_RT_BR_001(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_acpAuxIndex := -1;
// Test control
if(not(PICS_BLOCKING_REQUEST)){
setverdict(inconc, __SCOPE__ & ": It is required to support Blocking access resource to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
if(ispresent(p_parentRequestPrimitive)) {
v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex);
p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex);
}else{
p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
}
p_requestPrimitive.from_ := f_getOriginator(v_aeIndex);
p_requestPrimitive.responseType := {int3, omit}; //BlockingRequest
// Test Body
f_send(e_mca_port, m_request(valueof(p_requestPrimitive)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Successful operation using Blocking Request");
}
[] 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 while blocking request operation");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while executing blocking request operation");
}
}
f_checkAeSimuStatus();
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_RT_BR_001
}
group Non_Blocking_Requests{
group Synchronous{
......@@ -10969,6 +11040,8 @@ module OneM2M_PermutationFunctions {
}//end group Non_Blocking_Requests
}//end of group Response_Type
}//end group CSE
......
......@@ -4401,6 +4401,52 @@ module OneM2M_Testcases_CSE_Release_2 {
}//end group PollingChannel
group Response_Type {
group Blocking_Requests {
/**
* @desc Check that the IUT responds successfully to a Blocking Request OPERATION
*
*/
testcase TC_CSE_RT_BR_001_CRE() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_CSE_RT_BR_001(m_createContainerBase, -, int2001));
v_ae1.done;
}
testcase TC_CSE_RT_BR_001_UPD() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_CSE_RT_BR_001(m_updateContainerBase, m_createContainerBase, int2004));
v_ae1.done;
}
testcase TC_CSE_RT_BR_001_RET() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_CSE_RT_BR_001(m_retrieve("NotInitialized", "NotInitialized"), m_createContainerBase, int2000));
v_ae1.done;
}
testcase TC_CSE_RT_BR_001_DEL() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_CSE_RT_BR_001(m_delete("NotInitialized", "NotInitialized"), m_createContainerBase, int2002));
v_ae1.done;
}
}//end of group Blocking_Requests
group Non_Blocking_Requests{
group Synchronous{
......@@ -4828,6 +4874,8 @@ module OneM2M_Testcases_CSE_Release_2 {
}// end group Non_Blocking_Requests
}//end of group Response Type
group Device_Management {
group timeSeries {
......
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