......@@ -7,6 +7,7 @@ sources := \
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -14,7 +15,6 @@ modules := ../LibCommon \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -22,10 +22,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......
module AtsMec_IoTAPI_TestCases {
// Libcommon
import from LibCommon_Sync all;
// LibHttp
import from LibHttp_TypesAndValues all;
import from LibHttp_Functions all;
import from LibHttp_Templates all;
import from LibHttp_JsonTemplates all;
import from LibHttp_TestSystem all;
// LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI
import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all;
import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all;
import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all;
// LibMec/EdgePlatformApplicationEnablementAPI
import from EdgePlatformApplicationEnablementAPI_Templates all;
// LibMec/IoTAPI
import from IoTAPI_TypesAndValues all;
import from IoTAPI_Templates all;
import from IoTAPI_Functions all;
import from IoTAPI_Pics all;
import from IoTAPI_Pixits all;
// LibMec
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
group iotdev {
group lookup {
/**
* @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_device_info_list(
{
mw_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
-,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1
),
mw_device_info(
PX_IOT_DEVICE_ID_2,
PX_IOT_DEVICE_AUTH_2,
-,
PX_IOT_DEVICE_SUPI_2,
PX_IOT_DEVICE_IMSI_2
),
mw_device_info(
PX_IOT_DEVICE_ID_3,
PX_IOT_DEVICE_AUTH_3,
-,
PX_IOT_DEVICE_SUPI_3,
PX_IOT_DEVICE_IMSI_3
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01
/**
* @desc Check that the IUT responds with the list of registered IoT devices when queried using a filter by a Service Consumer
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?filter=(eq,enabled,false)",
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_device_info_list(
{
mw_device_info(
PX_IOT_DEVICE_ID_2,
PX_IOT_DEVICE_AUTH_2,
-,
PX_IOT_DEVICE_SUPI_2,
PX_IOT_DEVICE_IMSI_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02
/**
* @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering one field
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId",
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_device_info_list(
{
mw_device_info(
PX_IOT_DEVICE_ID_3,
PX_IOT_DEVICE_AUTH_3,
-,
PX_IOT_DEVICE_SUPI_3,
PX_IOT_DEVICE_IMSI_3
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03
/**
* @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering the number of fields and applying a filter to a specific field
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId&filter=(eq,enabled,false)",
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_device_info_list(
{
mw_device_info(
PX_IOT_DEVICE_ID_2,
PX_IOT_DEVICE_AUTH_2,
-,
PX_IOT_DEVICE_SUPI_2,
PX_IOT_DEVICE_IMSI_2
)
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04
} // End of group lookup
group subscription {
/**
* @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_IOT_API_SUB,
v_headers,
m_http_message_body_json(
m_body_json_iot_device_info(
m_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
-,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_iot_device_info(
mw_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
false,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info(v_response.response.body.json_body.deviceInfo_iot);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK
/**
* @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_IOT_API_SUB,
v_headers,
m_http_message_body_json(
m_body_json_iot_device_info(
m_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
false,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_BR
/**
* @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_device_info(
mw_device_info(
PX_IOT_DEVICE_ID_2,
PX_IOT_DEVICE_AUTH_2,
true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer
PX_IOT_DEVICE_SUPI_2,
PX_IOT_DEVICE_IMSI_2
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct DeviceInfo entry ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK
/**
* @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF
} // End of group subscribe
group patch {
/**
* @desc Check that the IUT updates the information about a registered IoT device when requested by a Service Consumer
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof(
m_traffic_rule_descriptor(
PX_TRAFFIC_RULE_ID,
PX_TRAFFIC_FILTERTYPE,
PX_TRAFFIC_RULE_PRIORITY,
m_traffic_filter(
PX_TRAFFIC_FILTER_SRC_ADDRESS,
PX_TRAFFIC_FILTER_DST_ADDRESS,
PX_TRAFFIC_FILTER_SRC_PORT,
PX_TRAFFIC_FILTER_DST_PORT,
PX_TRAFFIC_FILTER_PROTOCOL
),
PX_TRAFFIC_RULE_ACTION
));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_1, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_iot_device_info(
m_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
-,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1,
PX_REQUESTED_PLTF_ID,
{v_traffic_rule_descriptor}
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_device_info(
mw_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
-,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1,
PX_REQUESTED_PLTF_ID,
{v_traffic_rule_descriptor}
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully updates DeviceInfo entry ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK
/**
* @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT device
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof(
m_traffic_rule_descriptor(
PX_TRAFFIC_RULE_ID,
PX_TRAFFIC_FILTERTYPE,
PX_TRAFFIC_RULE_PRIORITY,
m_traffic_filter(
PX_TRAFFIC_FILTER_SRC_ADDRESS,
PX_TRAFFIC_FILTER_DST_ADDRESS,
PX_TRAFFIC_FILTER_SRC_PORT,
PX_TRAFFIC_FILTER_DST_PORT,
PX_TRAFFIC_FILTER_PROTOCOL
),
PX_TRAFFIC_RULE_ACTION
));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_iot_device_info(
m_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
-,
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1,
PX_REQUESTED_PLTF_ID,
{v_traffic_rule_descriptor}
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF
/**
* @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof(
m_traffic_rule_descriptor(
PX_TRAFFIC_RULE_ID,
PX_TRAFFIC_FILTERTYPE,
PX_TRAFFIC_RULE_PRIORITY,
m_traffic_filter(
PX_TRAFFIC_FILTER_SRC_ADDRESS,
PX_TRAFFIC_FILTER_DST_ADDRESS,
PX_TRAFFIC_FILTER_SRC_PORT,
PX_TRAFFIC_FILTER_DST_PORT,
PX_TRAFFIC_FILTER_PROTOCOL
),
PX_TRAFFIC_RULE_ACTION
));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_iot_device_info(
m_device_info(
PX_IOT_DEVICE_ID_1,
PX_IOT_DEVICE_AUTH_1,
true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer
PX_IOT_DEVICE_SUPI_1,
PX_IOT_DEVICE_IMSI_1,
PX_REQUESTED_PLTF_ID,
{v_traffic_rule_descriptor}
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR
} // End of group patch
group delete {
/**
* @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***");
v_device_info_list[1].deviceId := "";
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK
/**
* @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier
*/
testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var DeviceInfoList v_device_info_list := {
valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)),
valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)),
valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_device_info_list(v_device_info_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_device_info_list(v_device_info_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF
} // End of group delete
} // End of group iotdev
group iotpltf {
group lookup {
/**
* @desc Check that the IUT responds with the list of registered IoT platforms when queried by a Service Consumer
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_INFO,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_iot_platform_info_list(
v_iot_platform_list
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK
} // End of group lookup
group subscribe {
/**
* @desc Check that the IUT registers the information of a new IoT platform when requested by a Service Consumer
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB,
v_headers,
m_http_message_body_json(
m_body_json_iot_iot_platform_info(
m_iot_platform_info(
PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_iot_iot_platform_info(
mw_iot_platform_info(
PX_IOT_PLTF_ID_1,
{
mw_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
mw_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
mw_security_info,
mw_impl_specific_info
)
}
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a IotPlatformInfoList ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info(v_response.response.body.json_body.iotPlatformInfo);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK
/**
* @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB,
v_headers,
m_http_message_body_json(
m_body_json_iot_iot_platform_info(
m_iot_platform_info_error(
PX_IOT_PLTF_ID_1
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR
/**
* @desc Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_iot_platform_info(
m_iot_platform_info(
PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK
/**
* @desc Check that the IUT returns error when Service Consumer request to retrieve a not registered IoT platform
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF
} // End of group subscribe
group patch {
/**
* @desc Check that the IUT updates the information about a registered IoT platform when requested by a Service Consumer
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_iot_iot_platform_info(
m_iot_platform_info(
PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1 & "_patch",
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_iot_iot_platform_info(
m_iot_platform_info(
PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1 & "_patch",
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK
/**
* @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT platform
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_iot_iot_platform_info(
m_iot_platform_info(
PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1 & "_patch",
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF
} // End of group patch
group delete {
/**
* @desc Check that the IUT deregisters an IoT platform information when requested by a Service Consumer specifying the registered IoT platform identifier
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct success code ***");
v_iot_platform_list[1].iotPlatformId := "";
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK
/**
* @desc Check that the IUT returns an error when a Service Consumer request to deregister an IoT platform using incorrect parameters
*/
testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var IotPlatformInfoList v_iot_platform_list := {
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_1,
PX_MB_TRANSPORTINFO_NAME_1,
PX_MB_TRANSPORTINFO_TYPE_1,
PX_MB_TRANSPORTINFO_PROTOCOL_1,
PX_MB_TRANSPORTINFO_VERSION_1,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_2,
PX_MB_TRANSPORTINFO_NAME_2,
PX_MB_TRANSPORTINFO_TYPE_2,
PX_MB_TRANSPORTINFO_PROTOCOL_2,
PX_MB_TRANSPORTINFO_VERSION_2,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }),
m_security_info,
m_impl_specific_info
)
}
)),
valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3,
{
m_mb_transport_info(
PX_MB_TRANSPORTINFO_ID_3,
PX_MB_TRANSPORTINFO_NAME_3,
PX_MB_TRANSPORTINFO_TYPE_3,
PX_MB_TRANSPORTINFO_PROTOCOL_3,
PX_MB_TRANSPORTINFO_VERSION_3,
m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }),
m_security_info,
m_impl_specific_info
)
}
))
};
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_iot_platform_info_list(v_iot_platform_list);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_iot_platform_info_list(v_iot_platform_list);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF
} // End of group delete
} // End of group iotpltf
} // End of module AtsMec_IoTAPI_TestCases
module AtsMec_IoTAPI_TestControl {
// LibMec/IoTAPI
import from IoTAPI_Pics all;
// LibMec
import from LibMec_Pics all;
// AtsMec_IoTAPI
import from AtsMec_IoTAPI_TestCases all;
control {
if (PICS_IOT_API_SUPPORTED) {
if (PICS_MEC_PLAT and PICS_SERVICES) {
execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01());
execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02());
execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03());
execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04());
execute(TC_MEC_MEC033_IOTS_IOTDEV_002_OK());
execute(TC_MEC_MEC033_IOTS_IOTDEV_002_BR());
execute(TC_MEC_MEC033_IOTS_IOTDEV_003_OK());
execute(TC_MEC_MEC033_IOTS_IOTDEV_003_NF());
execute(TC_MEC_MEC033_IOTS_IOTDEV_004_OK());
execute(TC_MEC_MEC033_IOTS_IOTDEV_004_NF());
execute(TC_MEC_MEC033_IOTS_IOTDEV_004_BR());
execute(TC_MEC_MEC033_IOTS_IOTDEV_005_OK());
execute(TC_MEC_MEC033_IOTS_IOTDEV_005_NF());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK());
execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF());
}
}
} // End of 'control' statement
} // End of module AtsMec_IoTAPI_TestControl
suite := AtsMec_IoT
sources := \
AtsMec_IoTAPI_TestCases.ttcn \
AtsMec_IoTAPI_TestControl.ttcn
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
../LibMec/LocationAPI \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
../LibMec/DeviceApplicationInterfaceAPI \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/IoTAPI \
../LibMec/FederationEnablementAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
../../ccsrc/externals \
../../ccsrc/Protocols/Http \
../../ccsrc/Protocols/Json \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -13,28 +13,93 @@ module AtsMec_LocationAPI_TestControl {
if (PICS_MEC_PLAT and PICS_SERVICES) {
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_OK());
execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_NF());
execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01());
execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02());
execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_OK());
execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_NF());
execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01());
execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02());
execute(TC_MEC_MEC013_SRV_UEAREASUB_001_BR());
execute(TC_MEC_MEC013_SRV_UEAREASUB_002_OK());
execute(TC_MEC_MEC013_SRV_UEAREASUB_002_NF());
execute(TC_MEC_MEC013_SRV_UEAREASUB_003_OK());
execute(TC_MEC_MEC013_SRV_UEAREASUB_003_NF());
execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK());
execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF());
execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01());
execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02());
execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR());
execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF());
execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK());
execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR());
execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_BR());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02());
execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_NF());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01());
execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK());
execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF());
execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01());
execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02());
execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01());
execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02());
execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01());
execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02());
execute(TC_MEC_MEC013_SRV_UETESTNOT_001_OK());
execute(TC_MEC_MEC013_SRV_UETESTNOT_002_OK());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_001_OK());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_BR());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_NF());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02());
execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_NF());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02());
execute(TC_MEC_MEC013_SRV_UEZONESUB_001_BR());
execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01());
execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02());
execute(TC_MEC_MEC013_SRV_UEZONESUB_002_NF());
execute(TC_MEC_MEC013_SRV_UEZONESUB_003_OK());
execute(TC_MEC_MEC013_SRV_UEZONESUB_003_NF());
}
}
} // End of 'control' statement
......
......@@ -7,6 +7,7 @@ sources := \
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -14,7 +15,6 @@ modules := ../LibCommon \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -22,10 +22,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......
......@@ -65,8 +65,7 @@ module AtsMec_RnisAPI_TestCases {
group rnis_notifications {
/**
* @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
* @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated
*/
testcase TC_MEC_MEC012_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -101,7 +100,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -166,7 +165,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -227,7 +225,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -289,7 +286,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -351,7 +347,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about UE measurement report if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -411,7 +406,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about UE timing advance if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -447,9 +441,9 @@ module AtsMec_RnisAPI_TestCases {
mw_meas_ta_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria_ho(
PX_APP_INS_ID,
-//TODO PX_E_RAB_ID
mw_filter_criteria(
PX_APP_INS_ID,
-//TODO PX_E_RAB_ID
))))))) {
tc_wait.stop;
......@@ -471,7 +465,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_007_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -531,7 +524,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about S1-U bearer if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_008_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -589,7 +581,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service sends an RNIS notification about 5G NR UE measurement report if the RNIS service has an associated subscription and the event is generated.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_009_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -645,6 +636,59 @@ module AtsMec_RnisAPI_TestCases {
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC012_SRV_RNIS_009_OK
/**
* @desc Check that the RNIS service sends an RNIS notification on subscription expiration if the RNIS service has an associated subscription and the event is generated
*/
testcase TC_MEC_MEC012_SRV_RNIS_010_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) {
log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_notif_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
action("Wait for subscription expiration");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
PX_CALLBACK_URI,
-,
mw_http_message_body_json(
mw_body_json_expiry_notification_rnis
)))) {
tc_wait.stop;
// Send 204 No Content
httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC012_SRV_RNIS_010_OK
} // End of group rnis_notifications
group all_subscriptions {
......@@ -660,8 +704,7 @@ module AtsMec_RnisAPI_TestCases {
* - MeasTaSubscription
* - CaReconfSubscription
* - S1BearerSubscription
* - NrMeasRepUeSubscription"
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
* - NrMeasRepUeSubscription
*/
testcase TC_MEC_MEC012_SRV_RNIS_011_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -729,8 +772,7 @@ module AtsMec_RnisAPI_TestCases {
* - MeasTaSubscription
* - CaReconfSubscription
* - S1BearerSubscription
* - NrMeasRepUeSubscription"
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
* - NrMeasRepUeSubscription
*/
testcase TC_MEC_MEC012_SRV_RNIS_012_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -767,7 +809,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)))))));
......@@ -812,7 +854,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_011_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -870,7 +911,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_012_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -905,7 +945,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)))))));
......@@ -952,8 +992,7 @@ module AtsMec_RnisAPI_TestCases {
* - MeasTaSubscription
* - CaReconfSubscription
* - S1BearerSubscription
* - NrMeasRepUeSubscription"
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
* - NrMeasRepUeSubscription
*/
testcase TC_MEC_MEC012_SRV_RNIS_013_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -989,7 +1028,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1041,7 +1080,7 @@ module AtsMec_RnisAPI_TestCases {
{
mw_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1076,8 +1115,7 @@ module AtsMec_RnisAPI_TestCases {
* - MeasTaSubscription
* - CaReconfSubscription
* - S1BearerSubscription
* - NrMeasRepUeSubscription"
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
* - NrMeasRepUeSubscription
*/
testcase TC_MEC_MEC012_SRV_RNIS_014_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1113,7 +1151,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1153,10 +1191,11 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
),
-, -,
v_json_body.cellChangeSubscription.links
)
)
......@@ -1183,7 +1222,7 @@ module AtsMec_RnisAPI_TestCases {
{
mw_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1209,7 +1248,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service deletes a RNIS subscription when requested
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_015_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1245,7 +1283,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1306,7 +1344,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service responds with error when a not existing RNIS subscription is requested
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_013_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1360,7 +1397,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_014_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1396,7 +1432,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1436,7 +1472,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1476,7 +1512,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_014_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1511,7 +1546,7 @@ module AtsMec_RnisAPI_TestCases {
{
m_ecgi(
m_plmn("001", "001"),
PX_CELL_ID
PX_V2X_CELL_ID
)
}
)
......@@ -1547,7 +1582,6 @@ module AtsMec_RnisAPI_TestCases {
/**
* @desc Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2
*/
testcase TC_MEC_MEC012_SRV_RNIS_015_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1626,7 +1660,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -1647,7 +1681,7 @@ module AtsMec_RnisAPI_TestCases {
{ *, mw_cell_user_info(
mw_ecgi(
mw_plmn,
PX_CELL_ID
PX_V2X_CELL_ID
),
?
),
......@@ -1770,7 +1804,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -1792,7 +1826,7 @@ module AtsMec_RnisAPI_TestCases {
-, // TODO use superset instead of { mw_associate_id },
mw_ecgi(
mw_plmn,
PX_CELL_ID
PX_V2X_CELL_ID
)
)
},
......@@ -1838,7 +1872,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -1911,7 +1945,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -1965,7 +1999,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -2127,7 +2161,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -2181,7 +2215,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -2235,7 +2269,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")),
v_headers
)
)
......@@ -2289,7 +2323,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")),
PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")),
v_headers
)
)
......
......@@ -17,13 +17,31 @@ module AtsMec_RnisAPI_TestControl {
execute(TC_MEC_MEC012_SRV_RNIS_002_OK());
execute(TC_MEC_MEC012_SRV_RNIS_003_OK());
execute(TC_MEC_MEC012_SRV_RNIS_004_OK());
execute(TC_MEC_MEC012_SRV_RNIS_005_OK());
execute(TC_MEC_MEC012_SRV_RNIS_006_OK());
execute(TC_MEC_MEC012_SRV_RNIS_006_OK());
execute(TC_MEC_MEC012_SRV_RNIS_007_OK());
execute(TC_MEC_MEC012_SRV_RNIS_007_OK());
execute(TC_MEC_MEC012_SRV_RNIS_010_OK());
}
if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
execute(TC_MEC_MEC012_SRV_RNIS_011_OK());
execute(TC_MEC_MEC012_SRV_RNIS_012_OK());
execute(TC_MEC_MEC012_SRV_RNIS_011_BR());
execute(TC_MEC_MEC012_SRV_RNIS_012_BR());
}
if (PICS_RNIS_SPECIFIC_SUBSCRIPTION) {
execute(TC_MEC_MEC012_SRV_RNIS_013_OK());
execute(TC_MEC_MEC012_SRV_RNIS_013_NF());
execute(TC_MEC_MEC012_SRV_RNIS_014_OK());
execute(TC_MEC_MEC012_SRV_RNIS_014_BR());
execute(TC_MEC_MEC012_SRV_RNIS_014_NF());
execute(TC_MEC_MEC012_SRV_RNIS_015_OK());
execute(TC_MEC_MEC012_SRV_RNIS_015_NF());
}
if (PICS_RNIS_QUERY) {
execute(TC_MEC_MEC012_SRV_RNIS_016_OK());
execute(TC_MEC_MEC012_SRV_RNIS_016_BR());
......
......@@ -4,10 +4,10 @@ sources := \
AtsMec_RnisAPI_TestCases.ttcn \
AtsMec_RnisAPI_TestControl.ttcn
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -15,7 +15,6 @@ modules := ../LibCommon \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/LocationAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -23,10 +22,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......
......@@ -43,17 +43,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
/**
* @desc Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_MTS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -68,11 +65,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_MTS_INFO_URI,
PICS_ROOT_API & PX_ME_MTS_INFO_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -84,7 +79,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
mw_http_message_body_json(
mw_body_json_mts_capability_info(
mw_mts_capability_info
))))) -> value v_response {
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of MtsCapabilityInfo ***");
......@@ -101,18 +96,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of testcase TC_MEC_MEC015_SRV_MTS_001_OK
/**
* @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none
*/
testcase TC_MEC_MEC015_SRV_MTS_002_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_002_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_mts_session_id_1, v_mts_session_id_2;
var MtsSessionInfo v_mts_session_info_1, v_mts_session_info_2;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -123,15 +117,89 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1, v_mts_session_info_1);
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2, v_mts_session_info_2);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_mts_session_info_list(
{
*,
mw_mts_session_info(
v_mts_session_info_1.appInsId,
v_mts_session_info_1.requestType,
-, -, -,
v_mts_session_info_1.sessionId
),
mw_mts_session_info(
v_mts_session_info_2.appInsId,
v_mts_session_info_2.requestType,
-, -, -,
v_mts_session_info_2.sessionId
),
*
}
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1);
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_01
/**
* @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_MTS_002_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id
var MtsSessionInfo v_mts_session_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(v_mts_session_info.appInsId, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -141,8 +209,13 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_mts_session_info_list
)))) -> value v_response {
mw_body_json_mts_session_info(
mw_mts_session_info(
v_mts_session_info.appInsId,
v_mts_session_info.requestType,
-, -, -,
v_mts_session_id
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***");
......@@ -155,21 +228,146 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK
} // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_02
/**
* @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name
*/
testcase TC_MEC_MEC015_SRV_MTS_002_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id
var MtsSessionInfo v_mts_session_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_name=" & oct2char(unichar2oct(v_mts_session_info.appName, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_mts_session_info(
mw_mts_session_info(
v_mts_session_info.appInsId,
v_mts_session_info.requestType,
-, -, -,
v_mts_session_id,
v_mts_session_info.appName
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_03
/**
* @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId
*/
testcase TC_MEC_MEC015_SRV_MTS_002_OK_04() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id
var MtsSessionInfo v_mts_session_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?session_id=" & oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8")),
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_mts_session_info(
mw_mts_session_info(
v_mts_session_info.appInsId,
v_mts_session_info.requestType,
-, -, -,
v_mts_session_info.sessionId,
v_mts_session_info.appName
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_04
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_MTS_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -184,11 +382,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_MTS_SESSIONS_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?appInsId=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'appInsId=' is a wrong parameter
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -201,10 +397,10 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -219,16 +415,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_MTS_002_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id
var MtsSessionInfo v_mts_session_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -239,15 +435,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")),
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -259,11 +454,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
-, -, 404
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -273,22 +468,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_002_NF
/**
* @desc Check that the IUT responds with a registration and initialisation approval for the requested MTS session requirements sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT creates a MTS session when queried by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_003_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_003_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_mts_session_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -303,29 +498,98 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_MTS_SESSIONS_URI,
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI,
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type
APPLICATION_SPECIFIC_MTS_SESSION, // Request type
m_qosd, // QoS
LowCost, // MtsMode
Downlink // TrafficDirection
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_mts_session_info(
mw_mts_session_info(
PX_APP_INSTANCE_ID
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(valueof(v_response.response.header), "Location", v_header_location);
v_mts_session_id := regexp(
v_header_location[0],
"?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_01
/**
* @desc Check that the IUT creates a MTS session when queried by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_003_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_mts_session_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI,
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
PX_APP_INSTANCE_ID,
FLOW_SPECIFIC_MTS_SESSION, // Request type
m_qosd, // QoS
LowCost, // MtsMode
Downlink, // TrafficDirection
{
m_session_filter(
"10.10.10.10",
{"1010"}
)
} // FlowFilter
-, -,
{ m_flow_filter("10.10.10.10", 1010) } // FIXME Use PIXITs
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -337,17 +601,23 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
mw_http_message_body_json(
mw_body_json_mts_session_info(
mw_mts_session_info(
PX_APP_INSTANCE_ID
)))))) -> value v_response {
PX_APP_INSTANCE_ID,
FLOW_SPECIFIC_MTS_SESSION
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_mts_session_id;
f_get_header(valueof(v_response.response.header), "Location", v_mts_session_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, MtsSessionInfoId: ", v_mts_session_id[0], " ***");
var charstring_list v_header_location;
f_get_header(valueof(v_response.response.header), "Location", v_header_location);
v_mts_session_id := regexp(
v_header_location[0],
"?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
......@@ -358,21 +628,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK
} // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_02
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_MTS_003_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -387,29 +656,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_MTS_SESSIONS_URI,
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI,
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type
APPLICATION_SPECIFIC_MTS_SESSION, // Request type
m_qosd, // QoS
LowCost, // MtsMode
Downlink, // TrafficDirection
{
m_session_filter(
"10.10.10.10",
{"10.10"} // Invalid port number
)
} // FlowFilter
-, -,
{ m_flow_filter("10.10.10.10", 1010) } // // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -417,15 +677,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -439,21 +695,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of testcase TC_MEC_MEC015_SRV_MTS_003_BR
/**
* @desc Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -464,37 +716,32 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info);
if (v_mts_session_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
v_headers
)
)
);
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID
)))))) -> value v_response {
mw_body_json_mts_session_info(
mw_mts_session_info(
v_mts_session_info.appInsId,
v_mts_session_info.requestType,
-, -, -,
v_mts_session_info.sessionId
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***");
f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -504,24 +751,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_004_OK
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_004_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_004_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -532,6 +777,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
......@@ -539,7 +785,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_MTS_SESSIONS_URI & "/Unknown_bw_allocation_id",
PICS_ROOT_API & "mts/v0/mts_sessions/" & PX_UNKNOWN_APP_INSTANCE_ID, // Wrong version number
v_headers
)
)
......@@ -556,7 +802,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -566,25 +812,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF
} // End of testcase TC_MEC_MEC015_SRV_MTS_004_BR
/**
* @desc
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -595,37 +838,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info);
if (v_mts_session_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type
m_qosd_1, // QoS
LowCost, // MtsMode
Downlink, // TrafficDirection
{
m_session_filter(
"10.10.10.10",
{"1010"}
)
} // FlowFilter
)
)
)
m_http_request_get(
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID,
v_headers
)
)
);
......@@ -633,26 +855,15 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_mts_session_info(
mw_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type
mw_qosd_1, // QoS
LowCost, // MtsMode
Downlink, // TrafficDirection
{
m_session_filter(
"10.10.10.10",
{"1010"}
)
} // FlowFilter
)))))) -> value v_response {
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***");
f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -662,24 +873,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK
} // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -690,54 +899,41 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info);
if (v_mts_session_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type
APPLICATION_SPECIFIC_MTS_SESSION, // Request type
m_qosd_1, // QoS
LowCost, // MtsMode
Downlink, // TrafficDirection
{
m_session_filter(
"10.10.10.10",
{"10.10"} // Invalid port
)
} // FlowFilter
)
)
)
)
)
);
Downlink // TrafficDirection
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_mts_session_info(
mw_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_SESSION, // Request type
mw_qosd_1, // QoS
LowCost, // MtsMode
Downlink // TrafficDirection
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -747,22 +943,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR
} // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_005_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003"));
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -773,48 +969,37 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_MTS_SESSIONS_URI & "/InvalidAllocationId",
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
m_mts_session_info( // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type
FLOW_SPECIFIC_MTS_SESSION, // Request type
m_qosd_1, // QoS
LowCost, // MtsMode
Downlink, // TrafficDirection
{
m_session_filter(
"10.10.10.10",
{"1010"}
)
} // FlowFilter
)
)
)
)
)
);
Downlink // TrafficDirection
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -824,24 +1009,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_005_NF
} // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR
/**
* @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_006_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -853,31 +1034,36 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info);
if (v_mts_session_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
v_headers
)
)
);
m_http_request_put(
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/PX_UNKNOWN_APP_INSTANCE_ID",
v_headers,
m_http_message_body_json(
m_body_json_mts_session_info(
m_mts_session_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_MTS_SESSION, // Request type
m_qosd_1, // QoS
LowCost, // MtsMode
Downlink // TrafficDirection
))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -888,23 +1074,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK
} // End of testcase TC_MEC_MEC015_SRV_MTS_005_NF
/**
* @desc Check that the IUT responds with an error when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_006_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_MTS_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -915,29 +1098,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info);
if (v_mts_session_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
v_headers
)
)
);
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
......@@ -951,23 +1127,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_006_BR
} // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK
/**
* @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_MTS_006_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_mts_session_id;
var MtsSessionInfo v_mts_session_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -978,29 +1151,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info);
f_init_default_headers_list(-, -, v_headers);
f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info);
if (v_mts_session_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id,
PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID,
v_headers
)
)
);
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
......@@ -1013,6 +1179,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_MTS_006_NF
......
......@@ -7,7 +7,7 @@
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.1.1 (2020-06)
* @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06)
*/
module AtsMec_TrafficManagementAPI_TestCases {
......@@ -42,692 +42,387 @@ module AtsMec_TrafficManagementAPI_TestCases {
group me_app_role {
/**
* @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none
*/
testcase TC_MEC_MEC015_SRV_TM_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI,
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info_list
)))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK
/**
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_BR
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_002_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
testcase TC_MEC_MEC015_SRV_TM_001_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info_list
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_NF
/**
* @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_003_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_bw_allocation_id;
f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_OK_01
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK
/**
* @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_TM_003_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
testcase TC_MEC_MEC015_SRV_TM_001_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_APP_INSTANCE_ID,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
SESSION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink, // AllocationDirection
{ m_session_filter("10.10.10.10", { "1010" }) }
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id,
SESSION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink, // AllocationDirection
{ mw_session_filter }
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_bw_allocation_id;
f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_OK_02
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_003_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"Invalid", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_01
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_02
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name
*/
testcase TC_MEC_MEC015_SRV_TM_003_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
testcase TC_MEC_MEC015_SRV_TM_001_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_APP_NAME,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
PX_APP_NAME
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink, // AllocationDirection
{ m_session_filter("10.10.10.10", { "1010" }) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_02
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_003_BR_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
SESSION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
// MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be present
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_BR_03
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_03
/**
* @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id
*/
testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
testcase TC_MEC_MEC015_SRV_TM_001_OK_04() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_APP_ALLOCATION_ID,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
PX_APP_NAME,
PX_APP_ALLOCATION_ID
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers
)
)
);
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_OK
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_04
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "?appInstId=" & PX_APP_INSTANCE_ID,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_BR
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_TM_001_NF_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_UNKNOWN_APP_INSTANCE_ID,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_01
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name
*/
testcase TC_MEC_MEC015_SRV_TM_001_NF_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_UNKNOWN_APP_NAME,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_02
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id
*/
testcase TC_MEC_MEC015_SRV_TM_001_NF_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -743,30 +438,24 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/Unknown_bw_allocation_id",
PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_UNKNOWN_APP_ALLOCATION_ID,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -777,20 +466,586 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_NF
} // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_03
/**
* @desc Check that the IUT acknowledges a creation of a bandwidthAllocation resource
*/
testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
"1024",
Downlink,
PX_APP_NAME,
PX_APP_ALLOCATION_ID
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
PX_APP_NAME,
PX_APP_ALLOCATION_ID
)))))) -> value v_response {
tc_ac.stop;
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_bw_allocation_id := regexp(
v_header_location[0],
"?+" & PX_ME_BWM_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, CreationID: ", v_bw_allocation_id," ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
*/
testcase TC_MEC_MEC015_SRV_TM_002_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
"1024",
Downlink,
PX_APP_NAME,
PX_APP_ALLOCATION_ID,
{ m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_01
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
*/
testcase TC_MEC_MEC015_SRV_TM_002_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
SESSION_SPECIFIC_BW_ALLOCATION,
"1024",
Downlink,
PX_APP_NAME,
PX_APP_ALLOCATION_ID,
- // Session shall be present
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_02
/**
* @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
v_bw_allocation_id
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_OK
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_NF
/**
* @desc Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
*/
testcase TC_MEC_MEC015_SRV_TM_004_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
v_bw_info.sessionFilter := { valueof(m_session_filter("10.10.10.10", 1010)) }; // FIXME Use PIXITs
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
v_bw_info
)))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_01
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
*/
testcase TC_MEC_MEC015_SRV_TM_004_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
v_bw_info.requestType := SESSION_SPECIFIC_BW_ALLOCATION;
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
v_bw_info
)))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_02
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
"2048", // FixedAllocation
Downlink
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_NF
/**
* @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -805,33 +1060,24 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
m_http_request_patch(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
......@@ -840,15 +1086,14 @@ module AtsMec_TrafficManagementAPI_TestCases {
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id,
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
"5096", // FixedAllocation
Downlink // AllocationDirection
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -858,20 +1103,18 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_005_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
*/
testcase TC_MEC_MEC015_SRV_TM_005_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_005_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -886,33 +1129,26 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"Invalid", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
m_http_request_patch(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
v_bw_info.allocationId,
{ m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
......@@ -922,81 +1158,10 @@ module AtsMec_TrafficManagementAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_005_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_BWM_URI & "/InvalidAllocationId",
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1006,21 +1171,18 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_005_NF
} // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_01
/**
* @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
*/
testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_005_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1035,50 +1197,39 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
-,
"5096"
)
)
)
)
)
);
PX_APP_INSTANCE_ID,
SESSION_SPECIFIC_BW_ALLOCATION,
v_bw_info.allocationId
//{ m_session_filter("10.10.10.10", 1010) } sessionFilter shall be present
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"5096", // FixedAllocation
Downlink // AllocationDirection
)))))) -> value v_response {
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1088,20 +1239,16 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_006_OK
} // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_02
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_006_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1117,46 +1264,28 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_patch(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
-,
"Invalid"
)
)
)
)
)
);
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1167,19 +1296,16 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_006_BR
} // End of testcase TC_MEC_MEC015_SRV_TM_005_NF
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1194,41 +1320,30 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_patch(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
-,
"5096"
)
)
)
)
m_http_request_delete(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers
)
)
);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1239,19 +1354,16 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_006_NF
} // End of testcase TC_MEC_MEC015_SRV_TM_006_OK
/**
* @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_007_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1266,29 +1378,25 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers
)
)
);
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
......@@ -1301,8 +1409,9 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_007_OK
} // End of testcase TC_MEC_MEC015_SRV_TM_006_NF
} // End of group me_app_role
......
......@@ -12,10 +12,59 @@ module AtsMec_TrafficManagementAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) {
execute(TC_MEC_MEC015_SRV_TM_001_OK());
execute(TC_MEC_MEC015_SRV_TM_001_OK_01());
execute(TC_MEC_MEC015_SRV_TM_001_OK_02());
execute(TC_MEC_MEC015_SRV_TM_001_OK_03());
execute(TC_MEC_MEC015_SRV_TM_001_OK_04());
execute(TC_MEC_MEC015_SRV_TM_001_BR());
execute(TC_MEC_MEC015_SRV_TM_001_NF_01());
execute(TC_MEC_MEC015_SRV_TM_001_NF_02());
execute(TC_MEC_MEC015_SRV_TM_001_NF_03());
execute(TC_MEC_MEC015_SRV_TM_002_OK());
execute(TC_MEC_MEC015_SRV_TM_002_BR());
execute(TC_MEC_MEC015_SRV_TM_002_NF());
execute(TC_MEC_MEC015_SRV_TM_002_BR_01());
execute(TC_MEC_MEC015_SRV_TM_002_BR_02());
execute(TC_MEC_MEC015_SRV_TM_003_OK());
execute(TC_MEC_MEC015_SRV_TM_003_NF());
execute(TC_MEC_MEC015_SRV_TM_004_OK());
execute(TC_MEC_MEC015_SRV_TM_004_BR_01());
execute(TC_MEC_MEC015_SRV_TM_004_BR_02());
execute(TC_MEC_MEC015_SRV_TM_004_NF());
execute(TC_MEC_MEC015_SRV_TM_005_OK());
execute(TC_MEC_MEC015_SRV_TM_005_BR_01());
execute(TC_MEC_MEC015_SRV_TM_005_BR_02());
execute(TC_MEC_MEC015_SRV_TM_005_NF());
execute(TC_MEC_MEC015_SRV_TM_006_OK());
execute(TC_MEC_MEC015_SRV_TM_006_NF());
}
if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) {
execute(TC_MEC_MEC015_SRV_MTS_001_OK());
execute(TC_MEC_MEC015_SRV_MTS_002_OK_01());
execute(TC_MEC_MEC015_SRV_MTS_002_OK_02());
execute(TC_MEC_MEC015_SRV_MTS_002_OK_03());
execute(TC_MEC_MEC015_SRV_MTS_002_OK_04());
execute(TC_MEC_MEC015_SRV_MTS_002_BR());
execute(TC_MEC_MEC015_SRV_MTS_002_NF());
execute(TC_MEC_MEC015_SRV_MTS_003_OK_01());
execute(TC_MEC_MEC015_SRV_MTS_003_OK_02());
execute(TC_MEC_MEC015_SRV_MTS_003_BR());
execute(TC_MEC_MEC015_SRV_MTS_004_OK());
execute(TC_MEC_MEC015_SRV_MTS_004_BR());
execute(TC_MEC_MEC015_SRV_MTS_004_NF());
execute(TC_MEC_MEC015_SRV_MTS_005_OK());
execute(TC_MEC_MEC015_SRV_MTS_005_BR());
execute(TC_MEC_MEC015_SRV_MTS_005_NF());
execute(TC_MEC_MEC015_SRV_MTS_006_OK());
execute(TC_MEC_MEC015_SRV_MTS_006_NF());
}
} // End of 'control' statement
......
......@@ -2,12 +2,13 @@ suite := AtsMec_TrafficManagement
sources := \
AtsMec_TrafficManagementAPI_TestCases.ttcn \
AtsMec_TrafficManagementAPI_TestCases.ttcn \
AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \
AtsMec_TrafficManagementAPI_TestControl
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -15,7 +16,6 @@ modules := ../LibCommon \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -23,10 +23,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......
/**
* @author ETSI / STF569
* @author ETSI / STF569 / TTF T027
* @version $URL:$
* $ID:$
* @desc This module provides the MEC test cases.
......@@ -7,7 +7,7 @@
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI GS MEC 003, ETSI GS MEC 014 V2.1.1
* @see ETSI GS MEC 003, ETSI GS MEC 014 V3.1.1
*/
module AtsMec_UEidentityAPI_TestCases {
......@@ -38,7 +38,6 @@ module AtsMec_UEidentityAPI_TestCases {
/**
* @desc Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/UETAG/PlatUeIdentity.tplan2
*/
testcase TC_MEC_MEC014_SRV_UETAG_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -61,11 +60,9 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -78,7 +75,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_ue_identity_tag_info(
mw_ue_identity_tag_info(
{ *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * }
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***");
......@@ -96,7 +93,6 @@ module AtsMec_UEidentityAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_MEC014_SRV_UETAG_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -119,11 +115,9 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -136,7 +130,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***");
......@@ -154,7 +148,6 @@ module AtsMec_UEidentityAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_MEC014_SRV_UETAG_001_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -177,11 +170,9 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -194,7 +185,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
......@@ -212,15 +203,14 @@ module AtsMec_UEidentityAPI_TestCases {
/**
* @desc Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_MEC014_SRV_UETAG_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_UE_IDENTITY_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_UE_IDENTITY_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -240,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
v_headers,
m_http_message_body_json(
m_body_json_ue_identity_tag_info(
......@@ -251,12 +241,7 @@ module AtsMec_UEidentityAPI_TestCases {
REGISTERED
)
}
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -269,7 +254,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_ue_identity_tag_info(
mw_ue_identity_tag_info(
{ *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG, REGISTERED), * }
)))))) {
)))))) {
tc_ac.stop;
if (f_check_user_register_state(-, v_headers) == 1) {
......@@ -292,7 +277,6 @@ module AtsMec_UEidentityAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when an unauthorised request is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_MEC014_SRV_UETAG_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -320,7 +304,7 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
v_headers,
m_http_message_body_json(
m_body_json_ue_identity_tag_info(
......@@ -331,12 +315,7 @@ module AtsMec_UEidentityAPI_TestCases {
INVALID_STATE
)
}
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -349,7 +328,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
))))*/)) {
))))*/)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***");
......@@ -367,7 +346,6 @@ module AtsMec_UEidentityAPI_TestCases {
/**
* @desc Check that the IUT responds with ProblemDetails on information an invalid URI
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_MEC014_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter { // FIXME Which IE protocol should be invalid?
// Local variables
......@@ -390,7 +368,7 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_put(
"/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
v_headers,
m_http_message_body_json(
m_body_json_ue_identity_tag_info(
......@@ -401,12 +379,7 @@ module AtsMec_UEidentityAPI_TestCases {
UNREGISTERED
)
}
)
)
)
)
)
);
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -419,7 +392,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 412
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***");
......@@ -465,7 +438,7 @@ module AtsMec_UEidentityAPI_TestCases {
// httpPort.send(
// m_http_request(
// m_http_request_post(
// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
// v_headers,
// m_http_message_body_json(
// m_body_json_ue_identity_tag_info(
......@@ -543,7 +516,7 @@ module AtsMec_UEidentityAPI_TestCases {
// httpPort.send(
// m_http_request(
// m_http_request_post(
// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
// v_headers,
// m_http_message_body_json(
// m_body_json_ue_identity_tag_info(
......
......@@ -11,15 +11,14 @@ module AtsMec_UEidentityAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
if (PICS_UE_IDENTITY_API_SUPPORTED) {
execute(TC_MEC_MEC014_SRV_UETAG_001_OK());
execute(TC_MEC_MEC014_SRV_UETAG_001_BR());
execute(TC_MEC_MEC014_SRV_UETAG_001_NF());
execute(TC_MEC_MEC014_SRV_UETAG_002_OK());
execute(TC_MEC_MEC014_SRV_UETAG_002_BR());
execute(TC_MEC_MEC014_SRV_UETAG_002_PF());
}
if (PICS_MEC_PLAT and PICS_SERVICES and PICS_UE_IDENTITY_API_SUPPORTED) {
execute(TC_MEC_MEC014_SRV_UETAG_001_OK());
execute(TC_MEC_MEC014_SRV_UETAG_001_BR());
execute(TC_MEC_MEC014_SRV_UETAG_001_NF());
execute(TC_MEC_MEC014_SRV_UETAG_002_OK());
execute(TC_MEC_MEC014_SRV_UETAG_002_BR());
execute(TC_MEC_MEC014_SRV_UETAG_002_PF());
}
} // End of 'control' statement
......
......@@ -7,6 +7,7 @@ sources := \
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -14,7 +15,6 @@ modules := ../LibCommon \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -22,10 +22,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,6 +12,69 @@ module AtsMec_V2XInformationServiceAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_SERVICES) {
execute(TC_MEC_MEC030_SRV_V2X_001_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_001_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_001_BR());
execute(TC_MEC_MEC030_SRV_V2X_001_NF());
execute(TC_MEC_MEC030_SRV_V2X_002_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_002_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_002_BR());
execute(TC_MEC_MEC030_SRV_V2X_002_NF());
execute(TC_MEC_MEC030_SRV_V2X_003_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_003_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_003_BR());
execute(TC_MEC_MEC030_SRV_V2X_003_NF());
execute(TC_MEC_MEC030_SRV_V2X_004_OK());
execute(TC_MEC_MEC030_SRV_V2X_004_BR());
execute(TC_MEC_MEC030_SRV_V2X_004_NF());
execute(TC_MEC_MEC030_SRV_V2X_005_OK());
execute(TC_MEC_MEC030_SRV_V2X_005_BR());
execute(TC_MEC_MEC030_SRV_V2X_005_NF());
execute(TC_MEC_MEC030_SRV_V2X_006_OK());
execute(TC_MEC_MEC030_SRV_V2X_006_BR());
execute(TC_MEC_MEC030_SRV_V2X_007_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_007_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_007_OK_03());
execute(TC_MEC_MEC030_SRV_V2X_007_OK_04());
execute(TC_MEC_MEC030_SRV_V2X_007_OK_05());
execute(TC_MEC_MEC030_SRV_V2X_007_BR());
execute(TC_MEC_MEC030_SRV_V2X_008_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_008_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_008_OK_03());
execute(TC_MEC_MEC030_SRV_V2X_008_OK_04());
execute(TC_MEC_MEC030_SRV_V2X_008_OK_05());
execute(TC_MEC_MEC030_SRV_V2X_008_BR_01());
execute(TC_MEC_MEC030_SRV_V2X_008_BR_02());
execute(TC_MEC_MEC030_SRV_V2X_009_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_009_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_009_OK_03());
execute(TC_MEC_MEC030_SRV_V2X_009_OK_04());
execute(TC_MEC_MEC030_SRV_V2X_009_OK_05());
execute(TC_MEC_MEC030_SRV_V2X_009_BR());
execute(TC_MEC_MEC030_SRV_V2X_009_NF());
execute(TC_MEC_MEC030_SRV_V2X_010_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_010_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_010_OK_03());
execute(TC_MEC_MEC030_SRV_V2X_010_OK_04());
execute(TC_MEC_MEC030_SRV_V2X_010_OK_05());
execute(TC_MEC_MEC030_SRV_V2X_010_BR());
execute(TC_MEC_MEC030_SRV_V2X_010_NF());
execute(TC_MEC_MEC030_SRV_V2X_011_OK_01());
execute(TC_MEC_MEC030_SRV_V2X_011_OK_02());
execute(TC_MEC_MEC030_SRV_V2X_011_OK_03());
execute(TC_MEC_MEC030_SRV_V2X_011_OK_04());
execute(TC_MEC_MEC030_SRV_V2X_011_OK_05());
execute(TC_MEC_MEC030_SRV_V2X_011_NF());
}
} // End of 'control' statement
......
......@@ -7,6 +7,7 @@ sources := \
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -14,7 +15,6 @@ modules := ../LibCommon \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -22,10 +22,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......