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

TCs to run always on Tester + correction of wrong use of setLocalResource and generateLocalResource


Behaviours are executed on PTCs (AeSimu or CseSimu) and MTC controls PTC
's start and end (AE testing)
Misuse of setLocalResource and generateLocalResource for
TC_AE_DMR_UPD_002_*, TC_AE_SUB_CRE_001, TC_AE_SUB_CRE_002_*,
TC_AE_SUB_NTF_001, TC_AE_SUB_NTF_002

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 772e105c
No related branches found
No related tags found
No related merge requests found
......@@ -566,18 +566,18 @@ module OneM2M_PermutationFunctions {
//primitives for mcaPortIn
var MsgIn v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_parentIndex := -1;
var PrimitiveContent v_modifiedResource;
var integer v_auxInteger := -1;
var PrimitiveContent v_modifiedResource;
var PrimitiveContent v_localResource;
f_cf03Up();
//Preamble
v_aeIndex := f_ae_preamble_registerAe();
//Send Trigger Message
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_aeIndex);
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
v_auxInteger := f_setLocalResource(v_localResource, int2);
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
f_sendUtPrimitive(p_utRequest,p_action);
//Test behavior
......@@ -588,8 +588,8 @@ module OneM2M_PermutationFunctions {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE update request is accepted!");
v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);
vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
mcaPortIn.send(m_response(vc_response.primitive.responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) -> value v_request {
......@@ -609,11 +609,16 @@ module OneM2M_PermutationFunctions {
function f_AE_DMR_UPD_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_localResource;
var integer v_auxInteger := -1;
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_auxInteger := f_setLocalResource(v_localResource, int3);
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
f_sendUtPrimitive(p_utRequest,p_action);
//Test behavior
......@@ -650,24 +655,28 @@ module OneM2M_PermutationFunctions {
group Retrieve {
function f_AE_DMR_RET_001(ResourceType p_resourceType, XSD.AnyURI p_address, in universal charstring p_action) runs on CseSimu {
function f_AE_DMR_RET_001(ResourceType p_resourceType, template PrimitiveContent p_primitiveContent, in universal charstring p_action) runs on CseSimu {
//variables
var template UtTriggerPrimitive v_utRequest := m_utRetrieve (p_address);
var template UtTriggerPrimitive v_utRequest;
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_localResource;
var integer v_auxInteger := -1;
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_utRequest.requestPrimitive.resourceType := p_resourceType;
v_localResource := f_ae_generateLocalResource(valueof(p_primitiveContent), vc_cSEBaseIndex, p_resourceType);
v_auxInteger := f_setLocalResource(v_localResource, p_resourceType);
v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger));
f_sendUtPrimitive(v_utRequest,p_action);
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(mw_retrieve(p_address))) -> value v_request {
[] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_auxInteger)))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!");
......@@ -712,6 +721,7 @@ module OneM2M_PermutationFunctions {
f_cf03Up();
//send triggering primitive to SUT
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
f_sendUtPrimitive(p_utRequest,p_action);
//Test behavior
......
This diff is collapsed.
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