Commit e3c32662 authored by YannGarcia's avatar YannGarcia
Browse files

Add RnisNotifications tests for RAB

parent 493d2b37
......@@ -23,8 +23,21 @@ This file provides the list of the TODOs related to the STF 569.
Draft ETSI GS MEC 012 2.0.4
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisAllSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisAllubscription_BI_BO.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BI_BO.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
- TC_MEC_SRV_RNIS_001_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_002_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_003_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_004_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_011_OK <font color="color:green">To be tested</font>
......
......@@ -223,6 +223,18 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
RnisAPI__TypesAndValues::PlmnInfo plmn_info;
plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.plmnInfo() = plmn_info;
} else if (it->second.find("\"RabEstSubscription\"") != std::string::npos) {
RnisAPI__TypesAndValues::RabEstSubscription rab_est_subscription;
rab_est_subscription.decode(RnisAPI__TypesAndValues::RabEstSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.rabEstSubscription() = rab_est_subscription;
} else if (it->second.find("\"RabModSubscription\"") != std::string::npos) {
RnisAPI__TypesAndValues::RabModSubscription rab_mod_subscription;
rab_mod_subscription.decode(RnisAPI__TypesAndValues::RabModSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.rabModSubscription() = rab_mod_subscription;
} else if (it->second.find("\"RabRelSubscription\"") != std::string::npos) {
RnisAPI__TypesAndValues::RabRelSubscription rab_rel_subscription;
rab_rel_subscription.decode(RnisAPI__TypesAndValues::RabRelSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.rabRelSubscription() = rab_rel_subscription;
} else if (it->second.find("\"bwInfo\"") != std::string::npos) {
BwManagementAPI__TypesAndValues::BwInfo bw_info;
......
......@@ -121,7 +121,13 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_NF
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_001_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_002_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_003_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_004_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_005_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_006_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_007_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_008_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
......
......@@ -147,7 +147,7 @@ module AtsMec_RnisAPI_TestCases {
m_cell_change_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
m_filter_criteria(
m_filter_criteria_ho(
"01",
{ m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) },
m_plmn("01", "001"),
......@@ -284,7 +284,7 @@ module AtsMec_RnisAPI_TestCases {
m_cell_change_subscription_wrong_subscription_type(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
m_filter_criteria(
m_filter_criteria_ho(
"01",
{ m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) },
m_plmn("01", "001"),
......@@ -376,10 +376,7 @@ module AtsMec_RnisAPI_TestCases {
-,
{
mw_cell_user_info(
mw_ecgi(
mw_plmn,
PX_CELL_ID
)
{ *, mw_ecgi(mw_plmn, PX_CELL_ID), * }
)
}
)))))) {
......@@ -1028,9 +1025,8 @@ 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/RnisQuery_BV.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.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2
*/
testcase TC_MEC_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1059,7 +1055,7 @@ module AtsMec_RnisAPI_TestCases {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
PX_CALLBACK_URI,
-,
mw_http_message_body_json(
mw_body_json_cell_change_subscription(
......@@ -1085,6 +1081,191 @@ module AtsMec_RnisAPI_TestCases {
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_SRV_RNIS_001_OK
/**
* @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_SRV_RNIS_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines 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("Trigger a RabEstSubscription event");
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_rab_est_subscription(
mw_rab_est_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria_qci(
PX_APP_INS_ID,
PX_E_RAB_ID,
-,
PX_QCI
))))))) {
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 establishment 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_SRV_RNIS_002_OK
/**
* @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_SRV_RNIS_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines 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("Trigger a RabEstSubscription event");
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_rab_mod_subscription(
mw_rab_mod_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria_qci(
PX_APP_INS_ID,
PX_E_RAB_ID,
-,
PX_QCI
))))))) {
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 modification 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_SRV_RNIS_003_OK
/**
* @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_SRV_RNIS_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines 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("Trigger a RabEstSubscription event");
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_rab_rel_subscription(
mw_rab_rel_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria_qci(
PX_APP_INS_ID,
PX_E_RAB_ID,
-,
PX_QCI
))))))) {
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_SRV_RNIS_004_OK
} // End of group rnis_notifications
......
......@@ -92,6 +92,9 @@ module AtsMec_TestControl {
}
if (PICS_RNIS_NOTIFICATIONS) {
execute(TC_MEC_SRV_RNIS_001_OK());
execute(TC_MEC_SRV_RNIS_002_OK());
execute(TC_MEC_SRV_RNIS_003_OK());
execute(TC_MEC_SRV_RNIS_004_OK());
}
}
......
LibIts @ fa803fc7
Subproject commit 1e93108a94eaa6f95f5b508194bd0632c11f1a1b
Subproject commit fa803fc714e8896de7ce12d0ecec822b5e8949dc
......@@ -3,9 +3,6 @@ module RnisAPI_Pixits {
// JSON
import from JSON all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibMec/Rnis
import from RnisAPI_TypesAndValues all;
......@@ -16,6 +13,8 @@ module RnisAPI_Pixits {
modulepar Link PX_LINKS_SELF := { self_ := "http://example.com/exampleAPI/rni/v2/subscriptions" };
modulepar charstring PX_CALLBACK_URI := "/";
modulepar CallbackReference PX_CALLBACK_REFERENCE := "http://meAppClient.example.com/rni/v2/notifications/cell_change/77777";
modulepar JSON.String PX_ASSOCIATE_ID_VALUE := "192.0.0.2";
......@@ -31,5 +30,10 @@ module RnisAPI_Pixits {
modulepar AppInsId PX_APP_ID := "19";
modulepar AppInsId PX_NOT_EXISTENT_APP_INS_ID := "99";
modulepar ErabId PX_E_RAB_ID := 0;
modulepar Qci PX_QCI := 0;
} // End of module RnisAPI_Pixits
......@@ -111,15 +111,83 @@ module RnisAPI_Templates {
group notifications {
template CellChangeSubscriptionPost mw_cell_change_subscription_post(
template (present) CallbackReference p_callbackReference := ?,
template (present) FilterCriteriaAssocHo p_filterCriteria := ?,
template TimeStamp p_expiryDeadline := *
) := {
template (value) RabEstSubscription m_rab_est_subscription(
in template (value) CallbackReference p_callbackReference,
in template (value) Link p_links,
in template (value) FilterCriteriaAssocQci p_filterCriteria,
in template (value)TimeStamp p_expiryDeadline
) := {
subscriptionType := RAB_ESTABLISHMENT,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template m_rab_est_subscription
template (present) RabEstSubscription mw_rab_est_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) FilterCriteriaAssocQci p_filterCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := RAB_ESTABLISHMENT,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_rab_est_subscription
template (value) RabModSubscription m_rab_mod_subscription(
in template (value) CallbackReference p_callbackReference,
in template (value) Link p_links,
in template (value) FilterCriteriaAssocQci p_filterCriteria,
in template (value)TimeStamp p_expiryDeadline
) := {
subscriptionType := RAB_MODIFICATION,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template m_rab_mod_subscription
template (present) RabModSubscription mw_rab_mod_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) FilterCriteriaAssocQci p_filterCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := RAB_MODIFICATION,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_rab_mod_subscription
template (value) RabRelSubscription m_rab_rel_subscription(
in template (value) CallbackReference p_callbackReference,
in template (value) Link p_links,
in template (value) FilterCriteriaAssocQci p_filterCriteria,
in template (value)TimeStamp p_expiryDeadline
) := {
subscriptionType := RAB_RELEASE,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template m_rab_rel_subscription
template (present) RabRelSubscription mw_rab_rel_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) FilterCriteriaAssocQci p_filterCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := RAB_RELEASE,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_cell_change_subscription_post
} // End of template mw_rab_rel_subscription
} // End of group notifications
......@@ -192,7 +260,7 @@ module RnisAPI_Templates {
template (value) S1UeInfo_ m_s1_ue_info(
in template (value) TempUeId p_tempUeId,
in template (value) AssociateId p_associateId,
in template (value) Ecgis p_ecgi,
in template (value) Ecgi p_ecgi,
in template (value) S1BearerInfoDetailed p_s1BearerInfoDetailed
) := {
tempUeId := p_tempUeId,
......@@ -204,7 +272,7 @@ module RnisAPI_Templates {
template (present) S1UeInfo_ mw_s1_ue_info(
template (present) TempUeId p_tempUeId := ?,
template (present) AssociateId p_associateId := ?,
template (present) Ecgis p_ecgi := ?,
template (present) Ecgi p_ecgi := ?,
template (present) S1BearerInfoDetailed p_s1BearerInfoDetailed := ?
) := {
tempUeId := p_tempUeId,
......@@ -229,33 +297,57 @@ module RnisAPI_Templates {
nanoSeconds := p_nanoSeconds
} // End of temlate mw_time_stamp
template (value) FilterCriteriaAssocHo m_filter_criteria(
in AppInsId p_appInsId,
in template (value) AssociateId p_associateId,
in template (value) Plmn p_plmn,
in template (value) CellId p_cellId,
in HoStatus p_hoStatus
template (value) FilterCriteriaAssocHo m_filter_criteria_ho(
in AppInsId p_appInsId,
in template (value) AssociateId p_associateId,
in template (value) Plmn p_plmn,
in template (value) CellId p_cellId,
in HoStatus p_hoStatus
) := {
appInsId := p_appInsId,
associateId := p_associateId,
plmn := p_plmn,
cellId := p_cellId,
hoStatus := p_hoStatus
} // End of template m_filter_criteria
template (present) FilterCriteriaAssocHo mw_filter_criteria(
template (present) AppInsId p_appInsId := ?,
template (present) AssociateId p_associateId := ?,
template (present) Plmn p_plmn := ?,
template (present) CellId p_cellId := ?,
template (present) HoStatus p_hoStatus := ?
} // End of template m_filter_criteria_ho
template (present) FilterCriteriaAssocHo mw_filter_criteria_ho(
template (present) AppInsId p_appInsId := ?,
template (present) AssociateId p_associateId := ?,
template (present) Plmn p_plmn := ?,
template (present) CellId p_cellId := ?,
template (present) HoStatus p_hoStatus := ?
) := {
appInsId := p_appInsId,
associateId := p_associateId,
plmn := p_plmn,
cellId := p_cellId,
hoStatus := p_hoStatus
} // End of template mw_filter_criteria
} // End of template mw_filter_criteria_ho
template (value) FilterCriteriaAssocQci m_filter_criteria_qci(
in AppInsId p_appInsId,
in template (value) ErabId p_erabId,
in template (value) Ecgi p_ecgi,
in template (value) Qci p_qci
) := {
appInsId := p_appInsId,
erabId := p_erabId,
ecgi := p_ecgi,
qci := p_qci
} // End of template m_filter_criteria_qci
template (present) FilterCriteriaAssocQci mw_filter_criteria_qci(
template (present) AppInsId p_appInsId := ?,
template (present) ErabId p_erabId := ?,
template (present) Ecgi p_ecgi := ?,
template (present) Qci p_qci := ?
) := {
appInsId := p_appInsId,
erabId := p_erabId,
ecgi := p_ecgi,
qci := p_qci
} // End of template mw_filter_criteria_qci
template (value) CellUserInfo_ m_cell_user_info(
in template (value) Ecgi p_ecgi,
......@@ -289,17 +381,17 @@ module RnisAPI_Templates {
value_ := p_value_
} // End of template mw_associate_id
template (value) Ecgi m_ecgi(
in template (value) Plmn p_plmn,
in template (value) CellId p_cellId
template (value) Ecgi_ m_ecgi(
in template (value) Plmn p_plmn,
in template (value) CellId p_cellId
) := {
plmn := p_plmn,
cellId := p_cellId
} // End of template m_ecgi
template (present) Ecgi mw_ecgi(
in template (present) Plmn p_plmn := ?,
in template (present) CellId p_cellId := ?
template (present) Ecgi_ mw_ecgi(
template (present) Plmn p_plmn := ?,
template (present) CellId p_cellId := ?
) := {
plmn := p_plmn,
cellId := p_cellId
......
......@@ -76,7 +76,7 @@ module RnisAPI_TypesAndValues {
type record S1UeInfo_ {
TempUeId tempUeId optional,
AssociateId associateId optional,
Ecgis ecgi,
Ecgi ecgi,
S1BearerInfoDetailed s1BearerInfoDetailed
}
type record of S1UeInfo_ S1UeInfo;
......@@ -167,11 +167,11 @@ module RnisAPI_TypesAndValues {
* @member ecgi
* @member cellId
*/
type record Ecgi {
type record Ecgi_ {
Plmn plmn,
CellId cellId
}
type record of Ecgi Ecgis;
type record of Ecgi_ Ecgi;
/**
* @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413
......@@ -339,9 +339,11 @@ module RnisAPI_TypesAndValues {
* @member filterCriteria
*/
type record RabEstSubscription {
SubscriptionType subscriptionType,
CallbackReference callbackReference,
Link links,
FilterCriteriaAssocQci filterCriteria
FilterCriteriaAssocQci filterCriteria,
TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
}
......@@ -370,6 +372,7 @@ module RnisAPI_TypesAndValues {
* @member expiryDeadline
*/
type record RabModSubscription {
SubscriptionType subscriptionType,
CallbackReference callbackReference,
Link links,
FilterCriteriaAssocQci filterCriteria,
......@@ -398,6 +401,7 @@ module RnisAPI_TypesAndValues {
* @member expiryDeadline