Commit a1188564 authored by YannGarcia's avatar YannGarcia

Add first TRANS test case

parent b65c5626
......@@ -31,16 +31,28 @@ This file provides the list of the TODOs related to the STF 569.
### TRANS
Draft ETSI GS MEC 011 V2.0.9 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2
- TC_MEC_SRV_TRANS_001_OK <font color="color:green">To be tested</font>
### UEAREASUB
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeAreaSubscription.tplan2
TODO CircleNotificationSubscription data structure not found
### UEDISTLOOK
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTSUB/PlatUeDistanceSubscription.tplan2
TODO TerminalDistance data structure not found
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEDISTLOOK/PlatUeDistanceSubscription.tplan2
TODO TerminalDistance data structure not found
### UEDISTSUB
......@@ -50,7 +62,6 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20
TODO DistanceNotificationSubscription data structure not found
### UEINFLOOK
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
......
/**
* @author ETSI / STF569
* @version $URL:$
* $ID:$
* @desc This module provides the MEC test cases.
* @copyright ETSI Copyright Notification
* 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, Draft ETSI GS MEC 011 V2.0.9 (2018-10)
*/
module AtsMec_AppEnablementAPI_TestCases {
// Libcommon
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
// LibHttp
import from LibItsHttp_TypesAndValues all;
import from LibItsHttp_Functions all;
import from LibItsHttp_Templates all;
import from LibItsHttp_JsonTemplates all;
import from LibItsHttp_TestSystem all;
// LibMec_AppEnablementAPI
import from AppEnablementAPI_Templates all;
import from AppEnablementAPI_Pics all;
import from AppEnablementAPI_Pixits all;
// LibMec
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
group transport_info {
/**
* @desc Check that the IUT responds with a list of available transports when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2
*/
testcase TC_MEC_SRV_TRANS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_APP_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES 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_SVC_MGMT_TRANS_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_transport_info_list(
{ *, mw_transport_info, * }
))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***");
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_TRANS_001_OK
} // End of group transport_info
} // End of module AtsMec_AppEnablementAPI_TestCases
......@@ -8,6 +8,8 @@ module AtsMec_TestControl {
import from RnisAPI_Pics all;
// LibMec/BwManagementAPI
import from BwManagementAPI_Pics all;
// LibMec/AppEnablementAPI
import from AppEnablementAPI_Pics all;
// LibMec
import from LibMec_Pics all;
......@@ -56,6 +58,10 @@ module AtsMec_TestControl {
execute(TC_MEC_PLAT_RLOC_001_OK());
}
if (PICS_ENABLE_APP_API_SUPPORTED) {
execute(TC_MEC_SRV_TRANS_001_OK());
}
}
if (PICS_RNIS) {
......
module AppEnablementAPI_Pics {
modulepar boolean PICS_ENABLE_APP_API_SUPPORTED := true;
} // End of module AppEnablementAPI_Pics
module AppEnablementAPI_Pixits {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibMec/AppEnablementAPI
import from AppEnablementAPI_TypesAndValues all;
modulepar universal charstring PX_APP_INSTANCE_ID := "appInst01";
modulepar universal charstring PX_NON_EXISTENT_APP_INSTANCE_ID := "appInst99";
modulepar universal charstring PX_UE_IDENTITY_TAG := "UeTagA";
modulepar universal charstring PX_UE_IDENTITY_TAG_INVALID_STATE := "UeTagC";
modulepar universal charstring PX_UE_IDENTITY_TAG_UNKNOWN := "UeTagW";
} // End of module AppEnablementAPI_Pixits
......@@ -27,144 +27,44 @@ module AppEnablementAPI_Templates {
instance := p_instance
} // End of template mw_problem_details
template (value) ApplicationList m_application_list(
in template (value) AppInfo p_app_info,
in template (value) VendorSpecificExt p_vendor_specific_ext
) := {
appInfo := p_app_info,
vendorSpecificExt := p_vendor_specific_ext
} // End of template m_application_list
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
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
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
template (value) NotificationEvent m_notification_event(
in template (value) ReferenceURL p_reference_uri
) := {
referenceURI := p_reference_uri
} // End of template m_notification_event
template (present) NotificationEvent mw_notification_event(
template (present) ReferenceURL p_reference_uri := ?
) := {
referenceURI := p_reference_uri
} // End of template mw_notification_event
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
template (present) VendorSpecificExt mw_vendor_specific_ext(
template (present) VendorId p_vendor_id := ?
) := {
vendorId := p_vendor_id
} // End of template mw_vendor_specific_ext
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
template (value) TransportInfo m_transport_info(
in TransportInfo_Id p_id,
in TransportInfo_Name p_name,
in TransportTypes p_type_,
in TransportInfo_Protocol p_protocol,
in TransportInfo_Version p_version,
in template (value) TransportInfo_Endpoint p_endpoint,
in SecurityInfo p_security
) := {
id := p_id,
name := p_name,
description := omit,
type_ := p_type_,
protocol := p_protocol,
version := p_version,
endpoint := p_endpoint,
security := p_security,
implSpecificInfo := omit
} // End of template m_transport_info
template (present) TransportInfo mw_transport_info(
template (present) TransportInfo_Id p_id := ?,
template (present) TransportInfo_Name p_name := ?,
template (present) TransportTypes p_type_ := ?,
template (present) TransportInfo_Protocol p_protocol := ?,
template (present) TransportInfo_Version p_version := ?,
template (present) TransportInfo_Endpoint p_endpoint := ?,
template (present) SecurityInfo p_security := ?
) := {
id := p_id,
name := p_name,
description := *,
type_ := p_type_,
protocol := p_protocol,
version := p_version,
endpoint := p_endpoint,
security := p_security,
implSpecificInfo := *
} // End of template mw_transport_info
} // End of module AppEnablementAPI_Templates
......@@ -6,6 +6,16 @@ module LocationAPI_TypesAndValues {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
/**
* @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type UInt32 Seconds;
/**
* @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type UInt32 NanoSeconds;
/**
* @desc
* @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
......@@ -376,16 +386,6 @@ REST_NetAPI_Common].
OperationStatus operationStatus optional
}
/**
* @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type UInt32 Seconds;
/**
* @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type UInt32 NanoSeconds;
} with {
encode "JSON"
}
This diff is collapsed.
/**
* @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI
* @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf
*/
module UEAppInterfaceAPI_Templates {
// JSON
import from JSON all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibMec/AppEna
import from UEAppInterfaceAPI_TypesAndValues all;
template (present) ProblemDetails mw_problem_details(
template (present) JSON.String p_type := ?,
template (present) JSON.String p_title := ?,
template (present) UInt32 p_status := ?,
template (present) JSON.String p_detail := ?,
template (present) JSON.String p_instance := ?
) := {
type_ := p_type,
title := p_title,
status := p_status,
detail := p_detail,
instance := p_instance
} // End of template mw_problem_details
template (value) ApplicationList m_application_list(
in template (value) AppInfo p_app_info,
in template (value) VendorSpecificExt p_vendor_specific_ext
) := {
appInfo := p_app_info,
vendorSpecificExt := p_vendor_specific_ext
} // End of template m_application_list
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
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
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
template (value) NotificationEvent m_notification_event(
in template (value) ReferenceURL p_reference_uri
) := {
referenceURI := p_reference_uri
} // End of template m_notification_event
template (present) NotificationEvent mw_notification_event(
template (present) ReferenceURL p_reference_uri := ?
) := {
referenceURI := p_reference_uri
} // End of template mw_notification_event
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
template (present) VendorSpecificExt mw_vendor_specific_ext(
template (present) VendorId p_vendor_id := ?
) := {
vendorId := p_vendor_id
} // End of template mw_vendor_specific_ext
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 UEAppInterfaceAPI_Templates
......@@ -14,6 +14,8 @@ module LibMec_Pixits {
modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v2/";
modulepar charstring PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports";
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions/";
modulepar charstring PX_ME_BWM_URI := "/bwm/v2/bw_allocations";
......
......@@ -8,7 +8,9 @@ module LibItsHttp_JsonMessageBodyTypes {
import from RnisAPI_TypesAndValues all;
// LibMec/BwManagementApi
import from BwManagementAPI_TypesAndValues all;
// LibMec/AppEnablementAPI
import from AppEnablementAPI_TypesAndValues all;
/**
* This file volontary contains a trivial declaration of the type JsonBody.
* In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing.
......@@ -17,19 +19,21 @@ module LibItsHttp_JsonMessageBodyTypes {
type union JsonBody {
// TODO Add here your custom variants
UserInfo userInfo,
UserList userList,
ZoneInfo zoneInfo,
AccessPointList accessPointList,
UserTrackingSubscription userTrackingSubscription,
ZonalTrafficSubscription zonalTrafficSubscription,
UEidentityAPI_TypesAndValues.ProblemDetails problemDetails_ue_identity,
UeIdentityTagInfo ueIdentityTagInfo,
SubscriptionLinkList subscriptionLinkList,
CellChangeSubscription cellChangeSubscription,
RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis,
BwInfo bwInfo,
BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management,
UserInfo userInfo,
UserList userList,
ZoneInfo zoneInfo,
AccessPointList accessPointList,
UserTrackingSubscription userTrackingSubscription,
ZonalTrafficSubscription zonalTrafficSubscription,
UEidentityAPI_TypesAndValues.ProblemDetails problemDetails_ue_identity,
UeIdentityTagInfo ueIdentityTagInfo,
SubscriptionLinkList subscriptionLinkList,
CellChangeSubscription cellChangeSubscription,
RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis,
BwInfo bwInfo,
BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management,
TransportInfoList transportInfoList,
AppEnablementAPI_TypesAndValues.ProblemDetails problemDetails_svc_mgmt,
universal charstring raw
} with {
variant ""
......
......@@ -22,6 +22,9 @@ module LibItsHttp_JsonTemplates {
// LibMec/BwManagementAPI
import from BwManagementAPI_TypesAndValues all;
import from BwManagementAPI_Templates all;
// LibMec/AppEnablementAPI
import from AppEnablementAPI_TypesAndValues all;
import from AppEnablementAPI_Templates all;
// TODO Add here your custom RFCs import
......@@ -189,4 +192,20 @@ module LibItsHttp_JsonTemplates {
} // End of group bw_management_api
group svc_mgmt {
template (value) JsonBody m_body_json_transport_info_list(
in template (value) TransportInfoList p_transportInfoList
) := {
transportInfoList := p_transportInfoList
} // End of template m_body_json_transport_info_list
template (present) JsonBody mw_body_json_transport_info_list(
template (present) TransportInfoList p_transportInfoList := ?
) := {
transportInfoList := p_transportInfoList
} // End of template mw_body_json_transport_info_list
} // End of group svc_mgmt
} // End of module LibItsHttp_JsonTemplates
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment