Commit a1188564 authored by YannGarcia's avatar YannGarcia
Browse files

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"
}
{
"openapi": "3.0.2",
"info": {
"title": "UE Application Interface API",
"version": "1.1.1",
"description": "The ETSI MEC ISG MEC016 UE Application Interface API described using OpenAPI",
"license": {
"name": "ETSI Forge copyright notice",
"url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
},
"contact": {
"email": "cti_support@etsi.org"
}
},
"externalDocs": {
"description": "ETSI GS MEC016 UE Application Interface API, V1.1.1",
"url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/01.01.01_60/gs_MEC016v010101p.pdf"
},
"security": [
{
"OauthSecurity": [
"all"
]
}
],
"servers": [
{
"url": "http://127.0.0.1:8081/mx2/v1"
},
{
"url": "https://127.0.0.1:8081/mx2/v1"
}
],
"tags": [
{
"name": "appList"
},
{
"name": "appContext"
}
],
"paths": {
"/app_list": {
"get": {
"description": "Used to query information about the available MEC applications.",
"operationId": "AppList_GET",
"tags": [
"appList"
],
"parameters": [
{
"$ref": "#/components/parameters/Query.AppName"
},
{
"$ref": "#/components/parameters/Query.AppProvider"
},
{
"$ref": "#/components/parameters/Query.AppSoftVersion"
},
{
"$ref": "#/components/parameters/Query.ServiceCont"
},
{
"$ref": "#/components/parameters/Query.VendorId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/AppList"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
}
},
"/app_contexts": {
"post": {
"description": "The POST method can be used to create a new application context. Upon success, the response contains entity body describing the created application context.",
"operationId": "AppContext_POST",
"tags": [
"appContext"
],
"requestBody": {
"$ref": "#/components/requestBodies/AppContext"
},
"responses": {
"201": {
"$ref": "#/components/responses/AppContext"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
}
},
"/app_contexts/{contextId}": {
"parameters": [
{
"$ref": "#/components/parameters/Path.ContextId"
}
],
"put": {
"description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference.",
"operationId": "AppContextId_PUT",
"tags": [
"appContext"
],
"requestBody": {
"$ref": "#/components/requestBodies/AppContext"
},
"responses": {
"204": {
"description": "No Content."
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
},
"delete": {
"description": "The DELETE method is used to delete the resource that represents the existing application context.",
"operationId": "AppContextId_DEL",
"tags": [
"appContext"
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"$ref": "#/components/responses/Error.400"
},
"401": {
"$ref": "#/components/responses/Error.401"
},
"403": {
"$ref": "#/components/responses/Error.403"
},
"404": {
"$ref": "#/components/responses/Error.404"
}
}
}
}
},
"components": {
"parameters": {
"Query.AppName": {
"name": "appName",
"in": "query",
"description": "Name to identify the MEC application",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}