Commit 974c0194 authored by YannGarcia's avatar YannGarcia
Browse files

Review TP_MEC_SRV_UELOC_001_OK, TC_MEC_SRV_UELOC_001_BR, TC_MEC_SRV_UELOC_001_NF

parent a5e73606
# MEC Testing Framework in TTCN-3- TODO list
## Introduction
This file provides the list of the TODOs related to the STF 569.
## SRV
### AMS
### APPSAQ
### APPSUB
### BWA
### DNS
### FAIS
### RLOC
### RNIS
### SAQ
### SRVSUB
### TIME
### TRAF
### TRANS
### UEAREASUB
### UEDISTLOOK
### UEDISTSUB
### UEINFLOOK
### UEINFSUB
### UELOC
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
TP_MEC_SRV_UELOC_001_OK <span style="color:green">Done</span>
TC_MEC_SRV_UELOC_001_BR <span style="color:yellow">To be tested</span>
TC_MEC_SRV_UELOC_001_NF <span style="color:yellow">To be tested</span>
### UELOCSUB
### UETAG
### UETRACKSUB
### UeIdentity
......@@ -102,9 +102,9 @@ RUN cd /home/etsi/frameworks \
&& make && make install
RUN cd /home/etsi/frameworks \
&& wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
&& tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
&& rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
&& wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/photon/R/eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz' \
&& tar -zxvf ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
&& rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
&& cd /home/etsi/dev/STF569_Mec \
&& cd /home/etsi/dev/STF569_Mec/ttcn \
&& git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \
......
......@@ -34,14 +34,14 @@ module AtsMec_LocationAPI_TestCases {
import from LibMec_Pics all;
import from LibMec_Pixits all;
group location {
group ueLocationLookup {
/**
* @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeLocation/PlatUeLocation.tplan2
* @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_PLAT_LOC_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UELOC_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
......@@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
v_headers
)
)
......@@ -96,9 +96,117 @@ module AtsMec_LocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_PLAT_LOC_001_OK
} // End of testcase TC_MEC_SRV_UELOC_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 {
// 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(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?areaId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), // areaId instead of zoneId
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
)) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***");
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_SRV_UELOC_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 {
// 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(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_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
)) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***");
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_SRV_UELOC_001_NF
} // End of group location
} // End of group ueLocationLookup
group subscription {
......@@ -129,7 +237,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_APP_Q_USERS_SUB_URI,
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_user_tracking_subscription(
......@@ -197,7 +305,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_APP_Q_USERS_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
v_headers
)
)
......
......@@ -24,7 +24,9 @@ module AtsMec_TestControl {
if (PICS_MEC_PLAT) {
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_PLAT_LOC_001_OK());
execute(TC_MEC_SRV_UELOC_001_OK());
execute(TC_MEC_SRV_UELOC_001_BR());
execute(TC_MEC_SRV_UELOC_001_NF());
execute(TC_MEC_PLAT_INFLOOK_001_OK());
execute(TC_MEC_PLAT_LOCSUB_001_OK());
execute(TC_MEC_PLAT_LOCSUB_002_OK());
......
......@@ -276,7 +276,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details(
-, -, 400
)))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......
......@@ -35,150 +35,136 @@ module AppEnablementAPI_Templates {
vendorSpecificExt := p_vendor_specific_ext
} // End of template m_application_list
/**
* @desc Information on application context created by the MEC system.
*/
type record AppContext {
ContextId contextId,
AssociateUeAppId associateUeAppId,
RequiredAppInfo appInfo,
CallbackReference callbackReference optional
}
/**
* @desc The parameters used in the method "Receiving notification events".
*/
type record NotificationEvent {
ReferenceURL referenceURI
}
/**
* @desc Extension for vendor specific information.
*/
type record length(0..infinity) of VendorSpecificExt VendorSpecificExtList;
/**
* @desc Extension for vendor-specific information.
*/
type record VendorSpecificExt {
VendorId vendorId
}
/**
* @desc Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters.
*/
type JSON.String ContextId length(1..32) with {encode "length(1..32)"};
/**
* @desc Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters.
*/
type JSON.String AssociateUeAppId length(1..32) with {encode "length(1..32)"};
/**
* @desc Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined.
*/
type JSON.String VendorId;
/**
* @desc User applications available for the UE application.
*/
type record of AppInfoList AppInfo;
/**
* @desc User applications available for the UE application.
*/
type record AppInfoList {
AppName appName,
AppProvider appProvider,
AppDescription appDescription,
AppSoftVersion appSoftVersion optional,
AppCharcs appCharcs optional
}
/**
* @desc Included in the request.
*/
type record RequiredAppInfo {
AppName appName,
AppProvider appProvider,
ReferenceURL referenceURL,
AppSoftVersion appSoftVersion optional,
AppDescription appDescription optional,
AppPackageSource appPackageSource optional
}
/**
* @desc The application characteristics relate to the system resources consumed by the application. UE application can use this information e.g., for estimating the cost of use of the application or for the expected user experience.
*/
type record AppCharcs {
Memory memory,
Storage storage,
Latency latency,
Bandwidth bandwidth,
ServiceCont serviceCont
}
/**
* @desc The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system.
*/
type UInt32 Memory;
/**
* @desc The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system.
*/
type UInt32 Storage;
/**
* @desc The target round trip time in milliseconds supported by the MEC system for the MEC application instance.
*/
type UInt32 Latency;
/**
* @desc The required connection bandwidth in kbit/s for the use of the mobile edge application instance.
*/
type UInt32 Bandwidth;
/**
* @desc Required service continuity mode for this application.
*/
type enumerated ServiceCont {
SERVICE_CONTINUITY_NOT_REQUIRED,
SERVICE_CONTINUITY_REQUIRED
}
template (present) ApplicationList mw_application_list(
template (present) AppInfo p_app_info := ?,
template (present) VendorSpecificExt p_vendor_specific_ext := ?
) := {
appInfo := p_app_info,
vendorSpecificExt := p_vendor_specific_ext
} // End of template mw_application_list
/**
* @desc Name of the MEC application. The length of the value shall not exceed 32 characters.
*/
type JSON.String AppName length(1..32) with {encode "length(1..32)"};
template (value) AppContext m_app_context(
in template (value) ContextId p_context_id,
in template (value) AssociateUeAppId p_associate_ue_app_id,
in template (value) RequiredAppInfo p_app_info
) := {
contextId := p_context_id,
associateUeAppId := p_associate_ue_app_id,
appInfo := p_app_info,
callbackReference := omit
} // End of template m_app_context
/**
* @desc Provider of the MEC application. The length of the value shall not exceed 32 characters.
*/
type JSON.String AppProvider length(1..32) with {encode "length(1..32)"};
template (present) AppContext mw_app_context(
template (present) ContextId p_context_id := ?,
template (present) AssociateUeAppId p_associate_ue_app_id := ?,
template (present) RequiredAppInfo p_app_info := ?
) := {
contextId := p_context_id,
associateUeAppId := p_associate_ue_app_id,
appInfo := p_app_info,
callbackReference := *
} // End of template mw_app_context
/**
* @desc Software version of the MEC application. The length of the value shall not exceed 32 characters.
*/
type JSON.String AppSoftVersion length(1..32) with {encode "length(1..32)"};
template (value) NotificationEvent m_notification_event(
in template (value) ReferenceURL p_reference_uri
) := {
referenceURI := p_reference_uri
} // End of template m_notification_event
/**
* @desc Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters.
*/
type JSON.String AppDescription length(1..128) with {encode "length(1..128)"};
template (present) NotificationEvent mw_notification_event(
template (present) ReferenceURL p_reference_uri := ?
) := {
referenceURI := p_reference_uri
} // End of template mw_notification_event
/**
* @desc URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context.
*/
type JSON.String CallbackReference;
template (value) VendorSpecificExt m_vendor_specific_ext(
in template (value) VendorId p_vendor_id
) := {
vendorId := p_vendor_id
} // End of template m_vendor_specific_ext
/**
* @desc Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response.
*/
type JSON.AnyURI ReferenceURL;
template (present) VendorSpecificExt mw_vendor_specific_ext(
template (present) VendorId p_vendor_id := ?
) := {
vendorId := p_vendor_id
} // End of template mw_vendor_specific_ext
/**
* @desc URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2.
*/
type JSON.AnyURI AppPackageSource;
template (value) AppInfoList m_appInfo_list(
in template (value) AppName p_app_name,
in template (value) AppProvider p_app_provider,
in template (value) AppDescription p_app_description
) := {
appName := p_app_name,
appProvider := p_app_provider,
appDescription := p_app_description,
appSoftVersion := omit,
appCharcs := omit
} // End of template m_appInfo_list
template (present) AppInfoList mw_appInfo_list(
template (present) AppName p_app_name := ?,
template (present) AppProvider p_app_provider := ?,
template (present) AppDescription p_app_description := ?
) := {
appName := p_app_name,
appProvider := p_app_provider,
appDescription := p_app_description,
appSoftVersion := *,
appCharcs := *
} // End of template mw_appInfo_list
template (value) RequiredAppInfo m_required_app_info(
in template (value) AppName p_app_name,
in template (value) AppProvider p_app_provider,
in template (value) ReferenceURL p_reference_url
) := {
appName := p_app_name,
appProvider := p_app_provider,
referenceURL := p_reference_url,
appSoftVersion := omit,
appDescription := omit,
appPackageSource := omit
} // End of template m_required_app_info
template (present) RequiredAppInfo mw_required_app_info(
template (present) AppName p_app_name := ?,
template (present) AppProvider p_app_provider := ?,
template (present) ReferenceURL p_reference_url := ?
) := {
appName := p_app_name,
appProvider := p_app_provider,
referenceURL := p_reference_url,
appSoftVersion := *,
appDescription := *,
appPackageSource := *
} // End of template mw_required_app_info
template (value) AppCharcs m_app_charcs(
in template (value) Memory p_memory,
in template (value) Storage p_storage,
in template (value) Latency p_latency,
in template (value) Bandwidth p_bandwidth,
in template (value) ServiceCont p_service_cont
) := {
memory := p_memory,
storage := p_storage,
latency := p_latency,
bandwidth := p_bandwidth,
serviceCont := p_service_cont
} // End of template m_app_charcs
template (present) AppCharcs mw_app_charcs(
template (present) Memory p_memory := ?,
template (present) Storage p_storage := ?,
template (present) Latency p_latency := ?,
template (present) Bandwidth p_bandwidth := ?,
template (present) ServiceCont p_service_cont := ?
) := {
memory := p_memory,
storage := p_storage,
latency := p_latency,
bandwidth := p_bandwidth,
serviceCont := p_service_cont
} // End of template mw_app_charcs
} // End of module AppEnablementAPI_Templates
......@@ -16,6 +16,8 @@ module LocationAPI_Pixits {
modulepar ZoneId PX_ZONE_ID := "zone01";
modulepar ZoneId PX_ZONE_ID_UNKNOWN := "zone51";
modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1";
modulepar TimeStamp PX_TIME_STAMP := { seconds := 1483231138, nanoSeconds := 0 };
......
......@@ -3,6 +3,6 @@ module RnisAPI_Pics {
/**
* @desc Does the IUT support all subscriptions?
*/
modulepar boolean PICS_RNIS_ALL_SUBSCRIPTIONS := true;
// modulepar boolean PICS_RNIS_ALL_SUBSCRIPTIONS := true;
} // End of module RnisAPI_Pics
......@@ -10,24 +10,26 @@ module LibMec_Pics {
*/
modulepar boolean PICS_RNIS := false;
modulepar boolean PIC_MEC_SYSTEM := false;
modulepar boolean PICS_MEC_SYSTEM := false;
modulepar boolean PIC_SERVICES := false;
modulepar boolean PICS_SERVICES := false;
modulepar boolean PIC_NOTIFICATIONS := false;
modulepar boolean PICS_NOTIFICATIONS := false;
modulepar boolean PIC_APP_PACKAGE := false;
modulepar boolean PICS_APP_PACKAGE := false;
modulepar boolean PIC_APP_PACKAGE_MANAGEMENT := false;
modulepar boolean PICS_APP_PACKAGE_MANAGEMENT := false;
modulepar boolean PIC_APP_PACKAGE_NOTIFICATIONS := false;
modulepar boolean PICS_APP_PACKAGE_NOTIFICATIONS := false;
modulepar boolean PIC_RNIS_QUERY := false;
modulepar boolean PICS_RNIS_QUERY := false;
modulepar boolean PIC_RNIS_ALL_SUBSCRIPTIONS := false;
modulepar boolean PICS_RNIS_ALL_SUBSCRIPTIONS := false;
modulepar boolean PIC_RNIS_SPECIFIC_SUBSCRIPTION := false;
modulepar boolean PICS_RNIS_SPECIFIC_SUBSCRIPTION := false;
modulepar boolean PIC_RNIS_NOTIFICATIONS := false;
modulepar boolean PICS_RNIS_NOTIFICATIONS := false;
modulepar charstring PICS_ROOT_API := "exampleAPI";
} // End of module LibMec_Pics
module LibMec_Pixits {
modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/exampleAPI/location/v2/zones";
modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/zones";
modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/exampleAPI/location/v2/users";
modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/users";