Commit 8e959668 authored by oneM2MTester Develop Team's avatar oneM2MTester Develop Team
Browse files

correct variable initiation issue

parent 63377715
......@@ -53,10 +53,10 @@ module OneM2M_Pixits {
modulepar boolean PX_FROM_IS_AE_ID := false;
//@Martin
//for checking whether the locationPolicy creation request is originated from a ASN-AE
//NOTE: Apply to Device-based location request, and this requires Testing System to activate ASN-AE mode to test IUT
modulepar boolean PX_FROM_ASN_AE := false; //default
//NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT
modulepar boolean PX_TS_IS_ASN_AE := false; //default
modulepar boolean PX_IUT_IS_ASN_CSE := false; //default //set it to true when running Device-based location testcases
modulepar boolean PX_FROM_ADN_AE := true; //default
modulepar boolean PX_TS_IS_ADN_AE := true; //default
modulepar boolean PX_IUT_IS_MN_CSE := false; //default //set it to true when running Share-based location testcases
//@Martin
......
......@@ -4035,8 +4035,11 @@ module OneM2M_Testcases {
var integer v_aeAuxIndex := -1;
var integer v_locPolicyResourceIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod_invalid := c_invalid_location_update_period;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Duration locationUpdatePeriod_invalid := c_invalid_location_update_period;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_request;
var RequestPrimitive v_locpolicy_request_preamble;
var MsgIn v_response;
......@@ -4047,7 +4050,7 @@ module OneM2M_Testcases {
//Preamble - register AE
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource for later update use
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_locpolicy_request_preamble:= valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);
//Set requestPrimitive
......@@ -4085,9 +4088,12 @@ module OneM2M_Testcases {
testcase TC_CSE_LOC_BV_003() runs on CseTester system CseSystem{
//TO RETRIEVE a <container> resource that has created in cse and linked with a <locationPolicy> resource (network-based case)
var integer v_aeAuxIndex := -1;
var integer v_locPolicyResourceIndex := -1;
var integer v_aeAuxIndex := -1;
var integer v_locPolicyResourceIndex := -1;
var integer v_locContainerResourceIndex := -1;
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_loc_request_preamble;
var RequestPrimitive v_container_request_preamble;
var MsgIn v_response;
......@@ -4099,7 +4105,7 @@ module OneM2M_Testcases {
//Preamble - register AE
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource for later container resource creation
v_loc_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_loc_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
v_locPolicyResourceIndex := f_cse_createResource(int10, v_loc_request_preamble, v_aeAuxIndex);//created locationpolicy index
v_locContainerResourceIndex := f_cse_createResource(int3, v_container_request_preamble, v_locPolicyResourceIndex);//created container index
......@@ -4153,34 +4159,35 @@ module OneM2M_Testcases {
//Test component configuration
f_cf01Up();
//Preamble
if(PX_IUT_IS_ASN_CSE){
if(PX_FROM_ASN_AE){
if(PX_TS_IS_ASN_AE){
//Preamble
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit), v_aeAuxIndex);
}
}
// Test Body
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, testcasename() & ": 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(inconc, testcasename() & ": Timeout due to no response from requested server!");
// Test Body
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, testcasename() & ": 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(inconc, testcasename() & ": Timeout due to no response from requested server!");
}
}
// Postamble
f_cse_postamble_deleteResources();
}
}
// Postamble
f_cse_postamble_deleteResources();
}
// Tear down
f_cf01Down();
......@@ -4201,34 +4208,36 @@ module OneM2M_Testcases {
//Test component configuration
f_cf01Up();
//Preamble
if(PX_IUT_IS_MN_CSE){
if(PX_FROM_ADN_AE){
if(PX_TS_IS_ADN_AE){
//Preamble
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex);
}
}
// Test Body
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, testcasename() & ": 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(inconc, testcasename() & ": Timeout due to no response from requested server!");
// Test Body
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource locationPolicy is created successfuly with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, testcasename() & ": 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(inconc, testcasename() & ": Timeout due to no response from requested server!");
}
}
// Postamble
f_cse_postamble_deleteResources();
}
}
// Postamble
f_cse_postamble_deleteResources();
}
// Tear down
f_cf01Down();
......@@ -4246,6 +4255,9 @@ module OneM2M_Testcases {
var integer v_locContainerResourceIndex := -1;
var integer v_subscriptionResourceIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_locpolicy_request_preamble;
var RequestPrimitive v_container_request_preamble;
var RequestPrimitive v_subscription_request_preamble;
......@@ -4257,7 +4269,7 @@ module OneM2M_Testcases {
//Preamble - register AE
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
......@@ -4306,7 +4318,8 @@ module OneM2M_Testcases {
var integer v_locPolicyResourceIndex := -1;
var integer v_locContainerResourceIndex := -1;
var integer v_subscriptionResourceIndex := -1;
var LocationSource v_locationSource := int2;//Device-based
var LocationSource v_locationSource := int2;//Device-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var RequestPrimitive v_locpolicy_request_preamble;
var RequestPrimitive v_container_request_preamble;
var RequestPrimitive v_subscription_request_preamble;
......@@ -4319,7 +4332,7 @@ module OneM2M_Testcases {
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, PX_LOCATION_UPDATE_PERIOD, omit, omit));
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, omit, omit));
v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
......@@ -4441,10 +4454,13 @@ module OneM2M_Testcases {
testcase TC_CSE_LOC_BV_009() runs on CseTester system CseSystem{
//To CREATE a <subscription> resource as a child resource of the created <container>
var integer v_aeAuxIndex := -1;
var integer v_aeAuxIndex := -1;
var integer v_locPolicyResourceIndex := -1;
var integer v_locContainerResourceIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_locpolicy_request_preamble;
var RequestPrimitive v_container_request_preamble;
var RequestPrimitive v_subscription_request_preamble;
......@@ -4456,7 +4472,7 @@ module OneM2M_Testcases {
//Preamble - register AE
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
v_container_request_preamble := valueof(m_createContainer(f_getResourceAddress(v_aeAuxIndex), omit));//no location-container name provided?
v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
......@@ -4499,6 +4515,10 @@ module OneM2M_Testcases {
var RequestPrimitive v_locpolicy_request_preamble;
var MsgIn v_response;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
//Test component configuration
f_cf01Up();
......@@ -4506,7 +4526,7 @@ module OneM2M_Testcases {
//Preamble - register AE
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource for later container resource creation
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_locpolicy_request_preamble := valueof(m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress));
v_locPolicyResourceIndex := f_cse_createResource(int10, v_locpolicy_request_preamble, v_aeAuxIndex);//created locationpolicy index
//Test Body - retrieve the created locationpolicy resource
......
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