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 \ ...@@ -102,9 +102,9 @@ RUN cd /home/etsi/frameworks \
&& make && make install && make && make install
RUN cd /home/etsi/frameworks \ 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 \ && 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-oxygen-2-linux-gtk-x86_64.tar.gz \ && tar -zxvf ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
&& rm -f ./eclipse-cpp-oxygen-2-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 \
&& cd /home/etsi/dev/STF569_Mec/ttcn \ && cd /home/etsi/dev/STF569_Mec/ttcn \
&& git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \ && git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \
......
...@@ -34,14 +34,14 @@ module AtsMec_LocationAPI_TestCases { ...@@ -34,14 +34,14 @@ module AtsMec_LocationAPI_TestCases {
import from LibMec_Pics all; import from LibMec_Pics all;
import from LibMec_Pixits 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 * @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 * @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 // Local variables
var HeaderLines v_headers; var HeaderLines v_headers;
var HttpMessage v_response; var HttpMessage v_response;
...@@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases { ...@@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( 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 v_headers
) )
) )
...@@ -96,9 +96,117 @@ module AtsMec_LocationAPI_TestCases { ...@@ -96,9 +96,117 @@ module AtsMec_LocationAPI_TestCases {
// Postamble // Postamble
f_cf_01_http_down(); 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 { group subscription {
...@@ -129,7 +237,7 @@ module AtsMec_LocationAPI_TestCases { ...@@ -129,7 +237,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_post( m_http_request_post(
PX_ME_APP_Q_USERS_SUB_URI, "/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI,
v_headers, v_headers,
m_http_message_body_json( m_http_message_body_json(
m_body_json_user_tracking_subscription( m_body_json_user_tracking_subscription(
...@@ -197,7 +305,7 @@ module AtsMec_LocationAPI_TestCases { ...@@ -197,7 +305,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( 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 v_headers
) )
) )
......
...@@ -24,7 +24,9 @@ module AtsMec_TestControl { ...@@ -24,7 +24,9 @@ module AtsMec_TestControl {
if (PICS_MEC_PLAT) { if (PICS_MEC_PLAT) {
if (PICS_LOCATION_API_SUPPORTED) { 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_INFLOOK_001_OK());
execute(TC_MEC_PLAT_LOCSUB_001_OK()); execute(TC_MEC_PLAT_LOCSUB_001_OK());
execute(TC_MEC_PLAT_LOCSUB_002_OK()); execute(TC_MEC_PLAT_LOCSUB_002_OK());
......
...@@ -276,7 +276,7 @@ module AtsMec_UEidentityAPI_TestCases { ...@@ -276,7 +276,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details( mw_problem_details(
-, -, 400 -, -, 400
)))))) -> value v_response { )))))) -> 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); f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} }
[] tc_ac.timeout { [] tc_ac.timeout {
......
...@@ -35,150 +35,136 @@ module AppEnablementAPI_Templates { ...@@ -35,150 +35,136 @@ module AppEnablementAPI_Templates {
vendorSpecificExt := p_vendor_specific_ext vendorSpecificExt := p_vendor_specific_ext
} // End of template m_application_list } // End of template m_application_list
/** template (present) ApplicationList mw_application_list(
* @desc Information on application context created by the MEC system. template (present) AppInfo p_app_info := ?,
*/ template (present) VendorSpecificExt p_vendor_specific_ext := ?
type record AppContext { ) := {
ContextId contextId, appInfo := p_app_info,
AssociateUeAppId associateUeAppId, vendorSpecificExt := p_vendor_specific_ext
RequiredAppInfo appInfo, } // End of template mw_application_list
CallbackReference callbackReference optional
} template (value) AppContext m_app_context(
in template (value) ContextId p_context_id,
/** in template (value) AssociateUeAppId p_associate_ue_app_id,
* @desc The parameters used in the method "Receiving notification events". in template (value) RequiredAppInfo p_app_info
*/ ) := {
type record NotificationEvent { contextId := p_context_id,
ReferenceURL referenceURI associateUeAppId := p_associate_ue_app_id,
} appInfo := p_app_info,
callbackReference := omit
/** } // End of template m_app_context
* @desc Extension for vendor specific information.
*/ template (present) AppContext mw_app_context(
type record length(0..infinity) of VendorSpecificExt VendorSpecificExtList; template (present) ContextId p_context_id := ?,
template (present) AssociateUeAppId p_associate_ue_app_id := ?,
/** template (present) RequiredAppInfo p_app_info := ?
* @desc Extension for vendor-specific information. ) := {
*/ contextId := p_context_id,
type record VendorSpecificExt { associateUeAppId := p_associate_ue_app_id,
VendorId vendorId appInfo := p_app_info,
} callbackReference := *
} // End of template mw_app_context
/**
* @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. template (value) NotificationEvent m_notification_event(
*/ in template (value) ReferenceURL p_reference_uri
type JSON.String ContextId length(1..32) with {encode "length(1..32)"}; ) := {
referenceURI := p_reference_uri
/** } // End of template m_notification_event
* @desc Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters.
*/ template (present) NotificationEvent mw_notification_event(
type JSON.String AssociateUeAppId length(1..32) with {encode "length(1..32)"}; template (present) ReferenceURL p_reference_uri := ?
) := {
/** referenceURI := p_reference_uri
* @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. } // End of template mw_notification_event
*/
type JSON.String VendorId; template (value) VendorSpecificExt m_vendor_specific_ext(
in template (value) VendorId p_vendor_id
/** ) := {
* @desc User applications available for the UE application. vendorId := p_vendor_id
*/ } // End of template m_vendor_specific_ext
type record of AppInfoList AppInfo;
template (present) VendorSpecificExt mw_vendor_specific_ext(
/** template (present) VendorId p_vendor_id := ?
* @desc User applications available for the UE application. ) := {
*/ vendorId := p_vendor_id
type record AppInfoList { } // End of template mw_vendor_specific_ext
AppName appName,
AppProvider appProvider, template (value) AppInfoList m_appInfo_list(
AppDescription appDescription, in template (value) AppName p_app_name,
AppSoftVersion appSoftVersion optional, in template (value) AppProvider p_app_provider,
AppCharcs appCharcs optional in template (value) AppDescription p_app_description
} ) := {
appName := p_app_name,
/** appProvider := p_app_provider,
* @desc Included in the request. appDescription := p_app_description,
*/ appSoftVersion := omit,
type record RequiredAppInfo { appCharcs := omit
AppName appName, } // End of template m_appInfo_list
AppProvider appProvider,
ReferenceURL referenceURL, template (present) AppInfoList mw_appInfo_list(
AppSoftVersion appSoftVersion optional, template (present) AppName p_app_name := ?,
AppDescription appDescription optional, template (present) AppProvider p_app_provider := ?,
AppPackageSource appPackageSource optional template (present) AppDescription p_app_description := ?
} ) := {
appName := p_app_name,
/** appProvider := p_app_provider,
* @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. appDescription := p_app_description,
*/ appSoftVersion := *,
type record AppCharcs { appCharcs := *
Memory memory, } // End of template mw_appInfo_list
Storage storage,
Latency latency, template (value) RequiredAppInfo m_required_app_info(
Bandwidth bandwidth, in template (value) AppName p_app_name,
ServiceCont serviceCont in template (value) AppProvider p_app_provider,
} in template (value) ReferenceURL p_reference_url
) := {
/** appName := p_app_name,
* @desc The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system. appProvider := p_app_provider,
*/ referenceURL := p_reference_url,
type UInt32 Memory; appSoftVersion := omit,
appDescription := omit,
/** appPackageSource := omit
* @desc The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system. } // End of template m_required_app_info
*/
type UInt32 Storage; template (present) RequiredAppInfo mw_required_app_info(
template (present) AppName p_app_name := ?,
/** template (present) AppProvider p_app_provider := ?,
* @desc The target round trip time in milliseconds supported by the MEC system for the MEC application instance. template (present) ReferenceURL p_reference_url := ?
*/ ) := {
type UInt32 Latency; appName := p_app_name,
appProvider := p_app_provider,
/** referenceURL := p_reference_url,
* @desc The required connection bandwidth in kbit/s for the use of the mobile edge application instance. appSoftVersion := *,
*/ appDescription := *,
type UInt32 Bandwidth; appPackageSource := *
} // End of template mw_required_app_info
/**
* @desc Required service continuity mode for this application. template (value) AppCharcs m_app_charcs(
*/ in template (value) Memory p_memory,
type enumerated ServiceCont { in template (value) Storage p_storage,
SERVICE_CONTINUITY_NOT_REQUIRED, in template (value) Latency p_latency,
SERVICE_CONTINUITY_REQUIRED in template (value) Bandwidth p_bandwidth,
} in template (value) ServiceCont p_service_cont
) := {
/** memory := p_memory,
* @desc Name of the MEC application. The length of the value shall not exceed 32 characters. storage := p_storage,
*/ latency := p_latency,
type JSON.String AppName length(1..32) with {encode "length(1..32)"}; bandwidth := p_bandwidth,
serviceCont := p_service_cont
/** } // End of template m_app_charcs
* @desc Provider of the MEC application. The length of the value shall not exceed 32 characters.
*/ template (present) AppCharcs mw_app_charcs(
type JSON.String AppProvider length(1..32) with {encode "length(1..32)"}; template (present) Memory p_memory := ?,
template (present) Storage p_storage := ?,
/** template (present) Latency p_latency := ?,
* @desc Software version of the MEC application. The length of the value shall not exceed 32 characters. template (present) Bandwidth p_bandwidth := ?,
*/ template (present) ServiceCont p_service_cont := ?
type JSON.String AppSoftVersion length(1..32) with {encode "length(1..32)"}; ) := {
memory := p_memory,
/** storage := p_storage,
* @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. latency := p_latency,
*/ bandwidth := p_bandwidth,
type JSON.String AppDescription length(1..128) with {encode "length(1..128)"}; serviceCont := p_service_cont
} // End of template mw_app_charcs
/**
* @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;
/**
* @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;
/**
* @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;
} // End of module AppEnablementAPI_Templates } // End of module AppEnablementAPI_Templates
...@@ -16,6 +16,8 @@ module LocationAPI_Pixits { ...@@ -16,6 +16,8 @@ module LocationAPI_Pixits {
modulepar ZoneId PX_ZONE_ID := "zone01"; 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 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 }; modulepar TimeStamp PX_TIME_STAMP := { seconds := 1483231138, nanoSeconds := 0 };
......
...@@ -3,6 +3,6 @@ module RnisAPI_Pics { ...@@ -3,6 +3,6 @@ module RnisAPI_Pics {
/** /**
* @desc Does the IUT support all subscriptions? * @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 } // End of module RnisAPI_Pics
...@@ -10,24 +10,26 @@ module LibMec_Pics { ...@@ -10,24 +10,26 @@ module LibMec_Pics {
*/ */
modulepar boolean PICS_RNIS := false; modulepar boolean PICS_RNIS := false;
modulepar boolean PIC_MEC_SYSTEM := false; modulepar boolean PICS_MEC_SYSTEM := false;
modulepar boolean PIC_SERVICES := false;