Commit c75b80b6 authored by YannGarcia's avatar YannGarcia
Browse files

Add RNI tests

parent 33239901
......@@ -59,7 +59,16 @@ https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes
### FAIS
### RLOC
### RLOCLOOK
ETSI GS MEC 013 V1.5.0
https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList
- TC_MEC_PLAT_RLOCLOOK_001_OK <font color="color:green">To be tested</font>
- TC_MEC_PLAT_RLOCLOOK_001_NF <font color="color:green">To be tested</font>
### RNIS
......@@ -81,6 +90,16 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo
- TC_MEC_SRV_RNIS_004_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_005_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_006_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_007_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_008_OK <font color="color:green">To be tested</font>
- TODO TC_MEC_SRV_RNIS_009_OK & TC_MEC_SRV_RNIS_010_OK
- TC_MEC_SRV_RNIS_011_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_012_OK <font color="color:green">To be tested</font>
......@@ -189,17 +208,17 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20
- TC_MEC_SRV_UEINFSUB_002_NF <font color="color:yellow">To be tested</font>
### UELOC
### UELOCLOOK
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
- TC_MEC_SRV_UELOC_001_OK <font color="color:green">Done</font>
- TC_MEC_SRV_UELOCLOOK_001_OK <font color="color:green">Done</font>
- TC_MEC_SRV_UELOC_001_BR <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UELOCLOOK_001_BR <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UELOC_001_NF <font color="color:yellow">To be tested</font>
- TC_MEC_SRV_UELOCLOOK_001_NF <font color="color:yellow">To be tested</font>
### UELOCSUB
......
......@@ -78,7 +78,7 @@ group grant {
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_grant_response(
mw_grant_response(
......@@ -87,11 +87,9 @@ group grant {
))))) -> value v_response {
tc_ac.stop;
if (v_response.response.statuscode == 201) {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
......
......@@ -38,7 +38,7 @@ module AtsMec_LocationAPI_TestCases {
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
*/
testcase TC_MEC_SRV_UELOC_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
......@@ -94,14 +94,14 @@ module AtsMec_LocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_SRV_UELOC_001_OK
} // End of testcase TC_MEC_SRV_UELOCLOOK_001_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/SRV/UELOC/PlatUeLocationLookup.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
*/
testcase TC_MEC_SRV_UELOC_001_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UELOCLOOK_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
......@@ -149,14 +149,14 @@ module AtsMec_LocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_SRV_UELOC_001_BR
} // End of testcase TC_MEC_SRV_UELOCLOOK_001_BR
/**
* @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/UELOC/PlatUeLocationLookup.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
*/
testcase TC_MEC_SRV_UELOC_001_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UELOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
......@@ -177,7 +177,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID_UNKNOWN, "UTF-8")),
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(NON_EXISTENT_ZONE_ID, "UTF-8")),
v_headers
)
)
......@@ -204,7 +204,7 @@ module AtsMec_LocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_SRV_UELOC_001_NF
} // End of testcase TC_MEC_SRV_UELOCLOOK_001_NF
} // End of group ueLocationLookup
......
......@@ -34,7 +34,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
import from LibMec_Pics all;
import from LibMec_Pixits all;
group me_app_role {
group rloclook {
/**
* @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application
......@@ -96,6 +96,66 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_PLAT_RLOC_001_OK
} // End of group me_app_role
/**
* @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/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RLOCLOOK/PlatRadioNodeLocation.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList
*/
testcase TC_MEC_PLAT_RLOC_001_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_LOCATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_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_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints",
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_access_point_list(
mw_access_point_list(
PX_ZONE_ID
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***");
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_PLAT_RLOC_001_NF
} // End of group rloclook
} // End of module AtsMec_RadioNodeLocationAPI_TestCases
......@@ -1305,6 +1305,244 @@ module AtsMec_RnisAPI_TestCases {
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_SRV_RNIS_004_OK
/**
* @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_SRV_RNIS_005_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 MeasTaSubscription 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_meas_rep_ue_subscription(
mw_meas_rep_ue_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria_tri(
PX_APP_INS_ID,
-//TODO PX_E_RAB_ID
))))))) {
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_005_OK
/**
* @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_SRV_RNIS_006_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 MeasTaSubscription 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_meas_ta_subscription(
mw_meas_ta_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria_ho(
PX_APP_INS_ID,
-//TODO PX_E_RAB_ID
))))))) {
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_006_OK
/**
* @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_SRV_RNIS_007_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 MeasTaSubscription 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_ca_reconf_subscription(
mw_ca_reconfig_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
mw_filter_criteria(
PX_APP_INS_ID,
-//TODO PX_E_RAB_ID
))))))) {
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_007_OK
/**
* @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_SRV_RNIS_008_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 MeasTaSubscription 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_s1_bearer_subscription(
mw_s1_bearer_subscription(
PX_CALLBACK_REFERENCE,
PX_LINKS_SELF,
-//mw_filter_criteria
)))))) {
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_008_OK
} // End of group rnis_notifications
} // End of module AtsMec_RnisAPI_TestCases
......
......@@ -34,9 +34,9 @@ module AtsMec_TestControl {
execute(TC_MEC_SRV_UETAG_002_PF());
}
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_SRV_UELOC_001_OK());
execute(TC_MEC_SRV_UELOC_001_BR());
execute(TC_MEC_SRV_UELOC_001_NF());
execute(TC_MEC_SRV_UELOCLOOK_001_OK());
execute(TC_MEC_SRV_UELOCLOOK_001_BR());
execute(TC_MEC_SRV_UELOCLOOK_001_NF());
execute(TC_MEC_SRV_UELOCSUB_001_OK());
execute(TC_MEC_SRV_UELOCSUB_001_BR());
......@@ -58,6 +58,7 @@ module AtsMec_TestControl {
execute(TC_MEC_SRV_UEINFSUB_002_NF());
execute(TC_MEC_PLAT_RLOC_001_OK());
execute(TC_MEC_PLAT_RLOC_001_NF());
}
if (PICS_ENABLE_APP_API_SUPPORTED) {
......
LibIts @ 8b156c8b
Subproject commit fa803fc714e8896de7ce12d0ecec822b5e8949dc
Subproject commit 8b156c8b0781f511dc4444742ee2eed9818aa865
......@@ -22,7 +22,7 @@ module LocationAPI_Pixits {
modulepar ZoneId PX_ZONE_ID := "zone01";
modulepar ZoneId PX_ZONE_ID_UNKNOWN := "zone51";
modulepar ZoneId NON_EXISTENT_ZONE_ID := "zone51";
modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1";
......
......@@ -189,6 +189,58 @@ module RnisAPI_Templates {
expiryDeadline := p_expiryDeadline
} // End of template mw_rab_rel_subscription
template (present) MeasRepUeSubscription mw_meas_rep_ue_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) FilterCriteriaAssocTri p_filterCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := MEAS_REPORT_UE,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_meas_rep_ue_subscription
template (present) MeasTaSubscription mw_meas_ta_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) FilterCriteriaAssocHo p_filterCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := MEAS_TIMING_ADVANCE,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_meas_ta_subscription
template (present) CaReConfSubscription mw_ca_reconfig_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) FilterCriteriaAssoc p_filterCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := CA_RECONF,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_ca_reconfig_subscription
template (present) S1BearerSubscription mw_s1_bearer_subscription(
template (present) CallbackReference p_callbackReference := ?,
template (present) Link p_links := ?,
template (present) S1BearerSubscriptionCriteria p_s1BearerSubscriptionCriteria := ?,
template (present)TimeStamp p_expiryDeadline := ?
) := {
subscriptionType := S1_BEARER,
callbackReference := p_callbackReference,
links := p_links,
s1BearerSubscriptionCriteria := p_s1BearerSubscriptionCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_s1_bearer_subscription
} // End of group notifications
group info_request {
......@@ -297,6 +349,30 @@ module RnisAPI_Templates {
nanoSeconds := p_nanoSeconds
} // End of temlate mw_time_stamp
template (value) FilterCriteriaAssoc 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
) := {
appInsId := p_appInsId,
associateId := p_associateId,
plmn := p_plmn,
cellId := p_cellId
} // End of template m_filter_criteria
template (present) FilterCriteriaAssoc mw_filter_criteria(
template (present) AppInsId p_appInsId := ?,
template (present) AssociateId p_associateId := ?,
template (present) Plmn p_plmn := ?,
template (present) CellId p_cellId := ?
) := {
appInsId := p_appInsId,
associateId := p_associateId,
plmn := p_plmn,
cellId := p_cellId
} // End of template mw_filter_criteria
template (value) FilterCriteriaAssocHo m_filter_criteria_ho(
in AppInsId p_appInsId,
in template (value) AssociateId p_associateId,
......@@ -349,6 +425,30 @@ module RnisAPI_Templates {
qci := p_qci
} // End of template mw_filter_criteria_qci
template (value) FilterCriteriaAssocTri m_filter_criteria_tri(
in AppInsId p_appInsId,
in template (value) Plmn p_plmn,
in template (value) CellId p_cellId,
in template (value) Trigger p_trigger
) := {
appInsId := p_appInsId,
plmn := p_plmn,
cellId := p_cellId,
trigger_ := p_trigger
} // End of template m_filter_criteria_tri