Newer
Older
/**
* Copyright Notification
* No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
* All rights reserved.
*
* @author ETSI
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 347 2017-08-11 08:48:20Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
module OneM2M_Testcases_AE_Release_1 {
import from OneM2M_TestSystem all;
import from OneM2M_Templates all;
import from OneM2M_Types all;//{type XSD.ID};
import from OneM2M_TypesAndValues all;
import from OneM2M_Pixits all;
import from LibCommon_Time all;
import from OneM2M_Pics all;
import from OneM2M_Functions all;

Miguel Angel Reina Ortega
committed
import from OneM2M_PermutationFunctions all;
import from XSD all;
group AE {
group General {
group Create {
group g_AE_GEN_CRE_001 {
/**
* @desc Check that the IUT sends the creation of a <container> resource using unstructured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_CRE_001_CSR() runs on Tester system AeSystem {

Miguel Angel Reina Ortega
committed
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
// Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_CRE_001(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_CRE_001_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
// Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_CRE_001(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_CRE_001_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
// Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_CRE_001(e_absolute));
v_cse1.done;

Miguel Angel Reina Ortega
committed
}//end group g_AE_GEN_CRE_002
group g_AE_GEN_CRE_002 {
/**
* @desc Check that the IUT sends the creation of a <container> resource using structured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_CRE_002_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_CRE_002(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_CRE_002_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_CRE_002(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_CRE_002_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Structured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_CRE_002(e_absolute));
v_cse1.done;
}
} //end group g_AE_GEN_CRE_002
} //end group Create
group Update {
group g_AE_GEN_UPD_001 {
/**
* @desc Check that the IUT sends the update of a <container> resource using unstructured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_UPD_001_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
// Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_UPD_001(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_UPD_001_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_UPD_001(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_UPD_001_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_UPD_001(e_absolute));
v_cse1.done;
}
}//end group g_AE_GEN_UPD_001
group g_AE_GEN_UPD_002 {
/**
* @desc Check that the IUT sends the update of a <container> resource using structured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_UPD_002_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_UPD_002(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_UPD_002_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_UPD_002(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_UPD_002_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Structured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_UPD_002(e_absolute));
v_cse1.done;
}
} //end group g_AE_GEN_UPD_002
} //end group Update
group Retrieve {
group g_AE_GEN_RET_001 {
/**
* @desc Check that the IUT sends the retrieval of a <container> resource using unstructured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_RET_001_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
// Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_RET_001(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_RET_001_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_RET_001(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_RET_001_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_RET_001(e_absolute));
v_cse1.done;
}
}//end group g_AE_GEN_RET_001
group g_AE_GEN_RET_002 {
/**
* @desc Check that the IUT sends the retrieval of a <container> resource using structured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_RET_002_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_RET_002(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_RET_002_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_RET_002(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_RET_002_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Structured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_RET_002(e_absolute));
v_cse1.done;
}
} //end group g_AE_GEN_RET_002
} //end group Retrieve
group Delete {
group g_AE_GEN_DEL_001 {
/**
* @desc Check that the IUT sends the deletion of a <container> resource using unstructured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_DEL_001_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_DEL_001(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_DEL_001_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_DEL_001(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_DEL_001_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Unstructured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_DEL_001(e_absolute));
v_cse1.done;
}
}//end group g_AE_GEN_DEL_001
group g_AE_GEN_DEL_002 {
/**
* @desc Check that the IUT sends the deletion of a <container> resource using structured resource identifier
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_DEL_002_CSR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_DEL_002(e_cseRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_DEL_002_SPR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_SP_RELATIVE)) {
setverdict(inconc, __SCOPE__, ": Structured-SP-Relative-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_DEL_002(e_spRelative));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_GEN_DEL_002_ABS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
//Test control
if(not(PICS_PRIMITIVE_SCOPE_ABSOLUTE)) {
setverdict(inconc, __SCOPE__, ": Structured-Absolute-Resource-ID format support is required to run this test case");
stop;
}

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_GEN_DEL_002(e_absolute));
v_cse1.done;
}
} //end group g_AE_GEN_DEL_002
} //end group Delete
}//end group General
group Registration {
group Create {
/**
* @desc Check that the IUT sends an AE initial registration request with no AE-ID-STEM provided when it is started
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_001() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_AE_REG_CRE_001());
v_cse1.done;
}
function f_AE_REG_CRE_001() runs on CseSimu {
//primitives for utPort
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
//primitives for mcaPortIn
var template RequestPrimitive v_requestPrimitive := mw_createAe;
var ResponsePrimitive v_responsePrimitive;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request";
f_cf03Up();
//Send Trigger Message
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_;
f_sendUtPrimitive(v_utRequest, v_action);
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
//v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));

Bogdan Stanca-Kaposta
committed
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
mcaPortIn.send(m_response(v_responsePrimitive));

Pramod Kulkarni
committed
[] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
}
}
// Postamble
f_cf03Down();
}
/**
* @desc Check that the IUT sends a registration CREATE Request with the value of the attribute ATTRIBUTE_NAME of the AE resource
*/
group g_AE_REG_CRE_002 {

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_RN() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ResourceName";
v_utRequest.requestPrimitive.primitiveContent.aE.resourceName := "UNINITIALIZED";
v_createAe.primitiveContent.aE.resourceName := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_ET() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ExpirationTime";
v_utRequest.requestPrimitive.primitiveContent.aE.expirationTime := "20301231T012345";
v_utRequest.forcedFields := {{name := "expirationTime", value_ := "UNINITIALIZED"}};
v_createAe.primitiveContent.aE.expirationTime := ?;//Check value other than "UNINITIALIZED", done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_LBL() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute Labels";
v_utRequest.requestPrimitive.primitiveContent.aE.labels := {"UNINITIALIZED"};
v_createAe.primitiveContent.aE.labels := complement({*,"UNINITIALIZED",*});

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_APN() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute AppName";
v_utRequest.requestPrimitive.primitiveContent.aE.appName := "UNINITIALIZED";
v_createAe.primitiveContent.aE.appName := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_API() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute AppID";
v_utRequest.requestPrimitive.primitiveContent.aE.app_ID := "UNINITIALIZED";
v_createAe.primitiveContent.aE.app_ID := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_POA() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute PointOfAccess";
v_utRequest.requestPrimitive.primitiveContent.aE.pointOfAccess := {"UNINITIALIZED"};
v_createAe.primitiveContent.aE.pointOfAccess := complement({*,"UNINITIALIZED",*});

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_OR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute OntologyRef";
v_utRequest.requestPrimitive.primitiveContent.aE.ontologyRef := "UNINITIALIZED";
v_createAe.primitiveContent.aE.ontologyRef := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_NL() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute NodeLink";
v_utRequest.requestPrimitive.primitiveContent.aE.nodeLink := "UNINITIALIZED";
v_createAe.primitiveContent.aE.nodeLink := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_RR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute RequestReachability";
v_utRequest.requestPrimitive.primitiveContent.aE.requestReachability := true;
v_utRequest.forcedFields := {{name := "requestReachability", value_ := "UNINITIALIZED"}};
v_createAe.primitiveContent.aE.requestReachability := ?;//Check value other than UNINITIALIZED, done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_CRE_002_CSZ() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;

Pramod Kulkarni
committed
var template RequestPrimitive v_createAe := mw_createAe;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ContentSerialization";
v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {applicationxml};
v_utRequest.forcedFields := {{name := "contentSerialization", value_ := "UNINITIALIZED"}};
v_createAe.primitiveContent.aE.contentSerialization := ?;//Check value other than UNINITIALIZED, done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
v_cse1.done;
}
}//End of subgroup AE_REG_CRE_002
} // End of subgroup Create
group Delete {
/**
* @desc Check that the IUT sends AE deregistration request to CSE
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_REG_DEL_001() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_AE_REG_DEL_001());
v_cse1.done;
}
function f_AE_REG_DEL_001() runs on CseSimu {
//variables
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_localResource;
var integer v_auxInteger := -1;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE DELETE Registration Request";
//primitives for utPort
var template UtTriggerPrimitive v_utRequest := m_utDelete;
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, -, -, omit))), vc_cSEBaseIndex, int2);

Miguel Angel Reina Ortega
committed
v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, -, -);
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE deregistration request is accepted!");
//v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));

Bogdan Stanca-Kaposta
committed
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
mcaPortIn.send(m_response(v_responsePrimitive));

Pramod Kulkarni
committed
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while AE deregistration");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
}
}
// Postamble
f_cf03Down();
}
}// End Delete subgroup
}//end Registration subgroup
group Data_Management_and_Repository {
group Create {
/**
* @desc Check that the IUT sends a Container creation request when it is triggered
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_001() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_AE_DMR_CRE_001());
v_cse1.done;
}
function f_AE_DMR_CRE_001() runs on CseSimu {
//variables
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var MsgIn v_request;
var template RequestPrimitive v_requestPrimitive := mw_createContainer;
var ResponsePrimitive v_responsePrimitive;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container";
//send triggering primitive to SUT
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_;
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container creation request is accepted!");
//set responseStatusCode back to SUT

Bogdan Stanca-Kaposta
committed
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
mcaPortIn.send(m_response(v_responsePrimitive));

Pramod Kulkarni
committed
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including mandatory attributes!!");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
}
}
// Postamble
f_cf03Down();
}
/**
* @desc Check that the IUT sends a ContentInstance creation request when it is triggered
*/

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_002() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_AE_DMR_CRE_002());
v_cse1.done;
}
function f_AE_DMR_CRE_002() runs on CseSimu {
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var MsgIn v_request;
var PrimitiveContent v_localResource;
var integer v_containerIndex := -1;
var template RequestPrimitive v_requestPrimitive := mw_createContentInstance;
var ResponsePrimitive v_responsePrimitive;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance";
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);

Miguel Angel Reina Ortega
committed
v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -);
v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_;
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
tc_ac.start;
alt{
//receive MsgIn requestPrimitive
[] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!");
//set responseStatusCode back to SUT

Bogdan Stanca-Kaposta
committed
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
mcaPortIn.send(m_response(v_responsePrimitive));

Pramod Kulkarni
committed
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including mandatory attributes!!");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
}
}
// Postamble
f_cf03Down();
}
/**

Pramod Kulkarni
committed
* @desc Check that the IUT sends a ContentInstance creation request with optional attribute ATTRIBUTE_NAME
*/
group g_AE_DMR_CRE_003 {

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_003_CNF() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var template RequestPrimitive v_request := mw_createContentInstance;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ContentInfo";
v_utRequest.requestPrimitive.primitiveContent.contentInstance.contentInfo := "UNINITIALIZED";
v_request.primitiveContent.contentInstance.contentInfo := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_003_RN() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var template RequestPrimitive v_request := mw_createContentInstance;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ResourceName";
v_utRequest.requestPrimitive.primitiveContent.contentInstance.resourceName := "UNINITIALIZED";
v_request.primitiveContent.contentInstance.resourceName := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_003_ET() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var template RequestPrimitive v_request := mw_createContentInstance;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute ExpirationTime";
v_utRequest.requestPrimitive.primitiveContent.contentInstance.expirationTime := "20301231T012345";
v_utRequest.forcedFields := {{name := "expirationTime", value_ := "UNINITIALIZED"}};
v_request.primitiveContent.contentInstance.expirationTime := ?;//Check value other than "UNINITIALIZED", done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_003_LBL() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var template RequestPrimitive v_request := mw_createContentInstance;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute Labels";
v_utRequest.requestPrimitive.primitiveContent.contentInstance.labels := {"UNINITIALIZED"};
v_request.primitiveContent.contentInstance.labels := complement({*,"UNINITIALIZED",*});

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_003_CR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var template RequestPrimitive v_request := mw_createContentInstance;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for ContentInstance containing attribute Creator";
v_utRequest.requestPrimitive.primitiveContent.contentInstance.creator := "UNINITIALIZED";
v_request.primitiveContent.contentInstance.creator := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_003(v_utRequest,v_request,v_action));
v_cse1.done;
}
}//End of subgroup AE_DMR_CRE_003
/**
* @desc Check that the IUT sends a Container creation request with optional attribute ATTRIBUTE_NAME when it is triggered
*/
group g_AE_DMR_CRE_004 {

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_ACPI() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute AccessControlPolicyIDs";
v_utRequest.requestPrimitive.primitiveContent.container.accessControlPolicyIDs := {"UNINITIALIZED"};
v_request.primitiveContent.container.accessControlPolicyIDs := complement({*,"UNINITIALIZED",*});

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_MNI() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxNrOfInstances";
v_utRequest.requestPrimitive.primitiveContent.container.maxNrOfInstances := 1;
v_utRequest.forcedFields := {{name := "maxNrOfInstances", value_ := "UNINITIALIZED"}};
v_request.primitiveContent.container.maxNrOfInstances := ?;//Check value other than "UNINITIALIZED", done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_MBS() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxByteSize";
v_utRequest.requestPrimitive.primitiveContent.container.maxByteSize := 1;
v_utRequest.forcedFields := {{name := "maxByteSize", value_ := "UNINITIALIZED"}};
v_request.primitiveContent.container.maxByteSize := ?;//Check value other than "UNINITIALIZED", done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_MIA() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute MaxInstanceAge";
v_utRequest.requestPrimitive.primitiveContent.container.maxInstanceAge := 1;
v_utRequest.forcedFields := {{name := "maxInstanceAge", value_ := "UNINITIALIZED"}};
v_request.primitiveContent.container.maxInstanceAge := ?;//Check value other than "UNINITIALIZED", done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_OR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute OntologyRef";
v_utRequest.requestPrimitive.primitiveContent.container.ontologyRef := "UNINITIALIZED";
v_request.primitiveContent.container.ontologyRef := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_RN() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute ResourceName";
v_utRequest.requestPrimitive.primitiveContent.container.resourceName := "UNINITIALIZED";
v_request.primitiveContent.container.resourceName := complement("UNINITIALIZED");

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;

Miguel Angel Reina Ortega
committed
testcase TC_AE_DMR_CRE_004_ET() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var template RequestPrimitive v_request := mw_createContainer;

Miguel Angel Reina Ortega
committed
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for Container containing attribute ExpirationTime";
v_utRequest.requestPrimitive.primitiveContent.container.expirationTime := "20301231T012345";
v_utRequest.forcedFields := {{name := "expirationTime", value_ := "UNINITIALIZED"}};
v_request.primitiveContent.container.expirationTime := ?;//Check value other than "UNINITIALIZED", done by typing

Miguel Angel Reina Ortega
committed
v_cse1.start(f_AE_DMR_CRE_004(v_utRequest,v_request,v_action));
v_cse1.done;