Commit 32bc661c authored by Antonio Castillo Verdugo's avatar Antonio Castillo Verdugo
Browse files

Typo issues


Fixed issues in remoteCSE templates
New TCs created: TC_CSE_REG_CRE_024, TC_CSE_REG_CRE_025, TC_CSE_REG_CRE_026_RN, TC_CSE_REG_CRE_026_ET, TC_CSE_REG_CRE_026_LBL, TC_CSE_REG_CRE_026_POA, TC_CSE_REG_CRE_026_NL
Signed-off-by: Antonio Castillo Verdugo's avataracverdugo <acverdugo@at4wireless.com>
parent a1a029a0
......@@ -1572,7 +1572,7 @@ module OneM2M_Functions {
alt {
[] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly");
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
v_remoteCSEResource := f_cse_generateLocalResource(v_response.primitive.responsePrimitive.primitiveContent, vc_cSEBaseIndex, int16);
......@@ -1580,14 +1580,14 @@ module OneM2M_Functions {
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type RemoteCSE");
setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type remoteCSE");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type RemoteCSE");
setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type remoteCSE");
}
}
......@@ -1610,7 +1610,7 @@ module OneM2M_Functions {
var integer v_localResourceIndex := -1;
var integer v_resourceIndex := -1;
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := "Please, register CSE on the Tester";
var charstring v_action := "Please, send a CSE registration request";
//send triggering primitive to SUT
f_sendUtPrimitive(v_utRequest,v_action);
......@@ -1619,7 +1619,7 @@ module OneM2M_Functions {
alt {
[] mccPortIn.receive(mw_request(p_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly");
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
v_remoteCSEResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, vc_cSEBaseIndex, int16);//TODO Get index from v_request.primitive.requestPrimitive.to_
v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex);
......@@ -1636,7 +1636,7 @@ module OneM2M_Functions {
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type RemoteCSE");
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE");
}
}
......
......@@ -656,11 +656,19 @@ module OneM2M_Templates {
};
/**
* @desc CREATE request primitive for remoteCSE resource
* @desc Reception template for CREATE RemoteCSE
*/
template RequestPrimitive mw_createRemoteCSE(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int16,
primitiveContent := {remoteCSE := ?} //{remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
};
/**
* @desc Base reception template for CREATE RemoteCSE
*/
template RequestPrimitive mw_createRemoteCSEBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int16,
primitiveContent := ?//{remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
primitiveContent := {remoteCSE := mw_contentCreateRemoteCSEBase}
};
/**
......@@ -1821,7 +1829,7 @@ module OneM2M_Templates {
};
/**
* @desc Base primitiveContent for CREATE operation for Container resource
* @desc Base primitiveContent for CREATE operation for RemoteCSE resource
* @param p_name Resource name
*/
template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE1_ID):= {
......@@ -1846,6 +1854,32 @@ module OneM2M_Templates {
nodeLink := omit,//O
choice := omit//O
};
/**
* @desc Base reception template of primitiveContent for CREATE operation for remoteCSE resource
*/
template RemoteCSE_optional mw_contentCreateRemoteCSEBase := {
resourceName := *,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := *,//O
accessControlPolicyIDs := *,//O
expirationTime := *,//O
announceTo := *,//O
announcedAttribute := *,//O
cseType := *,//O
pointOfAccess := *,//O
cSEBase := ?,//M
cSE_ID := ?,//M
m2M_Ext_ID := *,//O
trigger_Recipient_ID := *,//O
requestReachability := ?,//M
nodeLink := *,//O
choice := *//O
};
/**
* @desc Base reception template of primitiveContent for CREATE operation for ContainerAnnc resource
......
......@@ -58,6 +58,13 @@ module OneM2M_TestControl_IN_profile {
execute(TC_CSE_REG_CRE_019());
execute(TC_CSE_REG_CRE_021());
execute(TC_CSE_REG_CRE_023());
execute(TC_CSE_REG_CRE_024());
execute(TC_CSE_REG_CRE_025());
execute(TC_CSE_REG_CRE_026_RN());
execute(TC_CSE_REG_CRE_026_ET());
execute(TC_CSE_REG_CRE_026_LBL());
execute(TC_CSE_REG_CRE_026_POA());
execute(TC_CSE_REG_CRE_026_NL());
execute(TC_CSE_REG_CRE_027());
execute(TC_CSE_REG_CRE_028_ET());
execute(TC_CSE_REG_CRE_028_LBL());
......
This diff is collapsed.
......@@ -996,7 +996,7 @@ module OneM2M_Testcases_CSE {
f_cf01Up();
//Preambule
//vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
//vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule
//v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi);
......@@ -1044,7 +1044,7 @@ module OneM2M_Testcases_CSE {
//Preambule
//v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Test Body
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit)));
......@@ -1096,7 +1096,7 @@ module OneM2M_Testcases_CSE {
f_cf02UpCseSimuMaster();
//Preambule
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
vc_ae1.done;
......@@ -1206,7 +1206,7 @@ module OneM2M_Testcases_CSE {
f_cf02Up();
//Preambule
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase));
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE));
vc_cse1.done;
v_aeIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));
......@@ -1755,7 +1755,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase));
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE));
// Test Body
f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit));
......@@ -1833,6 +1833,205 @@ module OneM2M_Testcases_CSE {
}
/**
* @desc Check that IUT sends a CSE registration request with attributes multiplicity equals to 1
*
*/
testcase TC_CSE_REG_CRE_024() runs on CseSimu system CseSystem {
// Local variables
var ResponsePrimitive v_responsePrimitive;
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with attributes multiplicity equals to 1";
// Test control
// Test component configuration
f_cf04Up();
// Test adapter configuration
// Preamble
//send triggering primitive to SUT
f_sendUtPrimitive(v_utRequest,v_action);
// Test Body
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_createRemoteCSEBase)) {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit));
//send back responsePrimitive
mccPortIn.send(m_response(v_responsePrimitive));
}
[] mccPortIn.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf04Down();
}
/**
* @desc Check that IUT accepts a CSE registration request with attributes multiplicity equals to 1
*
*/
testcase TC_CSE_REG_CRE_025() runs on CseSimu system CseSystem {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_resourceIndex := -1;
var integer v_localResourceIndex := -1;
var PrimitiveContent v_remoteCSEResource;
// Test control
// Test component configuration
f_cf04Up();
// Test adapter configuration
// Preamble
v_request := f_getCreateRequestPrimitive(int16, m_createRemoteCSEBase, -1);
mccPort.send(m_request(v_request));
// Test Body
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitiveOK(?))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type remoteCSE");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type remoteCSE");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf04Down();
}
/**
* @desc Check that IUT sends a CSE registration request with OPTIONAL_ATTRIBUTE attribute
*
*/
group g_CSE_REG_CRE_026 {
testcase TC_CSE_REG_CRE_026_RN() runs on CseSimu system CseSystem {
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var template RequestPrimitive v_request := mw_createRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute resourceName";
v_utRequest.primitiveContent.remoteCSE.resourceName := "UNINITIALIZED";
v_request.primitiveContent.remoteCSE.resourceName := ?;
f_CSE_REG_CRE_026(v_utRequest,v_request,v_action);
}
testcase TC_CSE_REG_CRE_026_ET() runs on CseSimu system CseSystem {
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var template RequestPrimitive v_request := mw_createRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute expirationTime";
v_utRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
v_request.primitiveContent.remoteCSE.expirationTime := ?;
f_CSE_REG_CRE_026(v_utRequest,v_request,v_action);
}
testcase TC_CSE_REG_CRE_026_LBL() runs on CseSimu system CseSystem {
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var template RequestPrimitive v_request := mw_createRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute labels";
v_utRequest.primitiveContent.remoteCSE.labels := {"UNINITIALIZED"};
v_request.primitiveContent.remoteCSE.labels := ?;
f_CSE_REG_CRE_026(v_utRequest,v_request,v_action);
}
testcase TC_CSE_REG_CRE_026_POA() runs on CseSimu system CseSystem {
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var template RequestPrimitive v_request := mw_createRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute pointOfAccess";
v_utRequest.primitiveContent.remoteCSE.pointOfAccess := {"UNINITIALIZED"};
v_request.primitiveContent.remoteCSE.pointOfAccess := ?;
f_CSE_REG_CRE_026(v_utRequest,v_request,v_action);
}
testcase TC_CSE_REG_CRE_026_NL() runs on CseSimu system CseSystem {
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var template RequestPrimitive v_request := mw_createRemoteCSE;
var charstring v_action := __SCOPE__ & ": Please, send a CSE registration request with optional attribute nodeLink";
v_utRequest.primitiveContent.remoteCSE.nodeLink := "UNINITIALIZED";
v_request.primitiveContent.remoteCSE.nodeLink := ?;
f_CSE_REG_CRE_026(v_utRequest,v_request,v_action);
}
function f_CSE_REG_CRE_026(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu {
var ResponsePrimitive v_responsePrimitive;
//Test component configuration
f_cf04Up();
//send triggering primitive to SUT
f_sendUtPrimitive(p_utRequest,p_action);
//Test behavior
tc_ac.start;
alt{
//receive MsgIn requestPrimitive
[] mccPortIn.receive(mw_request(p_request)) {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, "To_be_defined", omit));
//send back responsePrimitive
mccPortIn.send(m_response(v_responsePrimitive));
}
[] mccPortIn.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf04Down();
}
}
/*testcase TC_CSE_REG_CRE_029() runs on CseSimu system CseSystem {
var MsgIn v_response;
......@@ -1853,7 +2052,7 @@ module OneM2M_Testcases_CSE {
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createRemoteCSEBase(PX_CSE_ID,f_getResourceAddress(-1)))) -> value v_response {
[] mccPort.receive(mw_request(mw_createRemoteCSE(PX_CSE_ID,f_getResourceAddress(-1)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
}
......@@ -2749,7 +2948,7 @@ module OneM2M_Testcases_CSE {
var ResourceType v_resourceType := int16; //remoteCSE
var template PrimitiveContent v_contentResponse;
var template UtTriggerPrimitive v_utRequest;
var charstring v_action := __SCOPE__ & ":" & " Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS;
var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS;
// Test control
if(not(PICS_MN_CSE)) {
......@@ -3102,7 +3301,7 @@ module OneM2M_Testcases_CSE {
var RequestPrimitive v_request;
var ResourceType v_resourceType := int16; //remoteCSE
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := __SCOPE__ & ":" & " Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0];
var charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0];
// Test control
if(not(PICS_MN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
......@@ -3226,7 +3425,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
// Test Body
v_request := valueof(m_delete(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex)));
......@@ -3325,7 +3524,7 @@ module OneM2M_Testcases_CSE {
var template UtTriggerPrimitive v_utRequest := m_utDeleteRequest;
var UtTriggerAckPrimitive v_trigger_response;
var integer v_auxInteger;
var charstring v_action := __SCOPE__ & ":" & " Please, send a valid DELETE Request containing To set to " & PX_CSE1_ADDRESS;
var charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request containing To set to " & PX_CSE1_ADDRESS;
// Test control
// Test component configuration
......@@ -3334,7 +3533,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Send Trigger Message
v_auxInteger := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentCreateRemoteCSE(omit,omit,omit,omit))), int16);
......
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