Commit 79d00f6f authored by YannGarcia's avatar YannGarcia
Browse files

Validate UEidentityAPI BI_BO tests

parent 37acaed1
......@@ -13,15 +13,13 @@ LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.5"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS := false
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := true
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := false
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......
......@@ -30,6 +30,10 @@ module AtsMec_TestControl {
execute(TC_MEC_PLAT_MP1_UETAG_BV_001());
execute(TC_MEC_PLAT_MP1_UETAG_BV_002());
execute(TC_MEC_PLAT_MP1_UETAG_BV_003());
execute(TC_MEC_PLAT_MP1_UETAG_BI_001());
execute(TC_MEC_PLAT_MP1_UETAG_BI_002());
execute(TC_MEC_PLAT_MP1_UETAG_BI_003());
execute(TC_MEC_PLAT_MP1_UETAG_BI_004());
}
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_PLAT_MP1_INF_BV_001());
......
......@@ -232,6 +232,234 @@ module AtsMec_UEidentityAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_PLAT_MP1_UETAG_BV_003
/**
* @desc Check that the IUT responds with ProblemDetails on information on an unknown UE Identity tag when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_PLAT_MP1_UETAG_BI_001() 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_UE_IDENTITY_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_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG_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(
mw_http_message_body_json(
mw_body_json_ue_identity_problem_details(
mw_problem_details(
-, -, 404
)))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 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_PLAT_MP1_UETAG_BI_001
/**
* @desc Check that the IUT responds with ProblemDetails on information an unknown Application Instance Identifier when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_PLAT_MP1_UETAG_BI_002() 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_UE_IDENTITY_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_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID_UNKNOWN, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "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(
mw_http_message_body_json(
mw_body_json_ue_identity_problem_details(
mw_problem_details(
-, -, 404
)))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 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_PLAT_MP1_UETAG_BI_002
/**
* @desc Check that the IUT responds with ProblemDetails on information an invalid URI
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_PLAT_MP1_UETAG_BI_003() 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_UE_IDENTITY_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_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_information?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
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(
mw_http_message_body_json(
mw_body_json_ue_identity_problem_details(
mw_problem_details(
-, -, 400
)))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 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_PLAT_MP1_UETAG_BI_003
/**
* @desc Check that the IUT responds with ProblemDetails on information on not allowed request
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeIdentity/PlatUeIdentity.tplan2
*/
testcase TC_MEC_PLAT_MP1_UETAG_BI_004() 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_UE_IDENTITY_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_UE_IDENTITY_ID_URI & oct2char(unichar2oct(APP_INSTANCE_ID_WITH_RESTRICTED_ACCESS, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_403_forbidden(
mw_http_message_body_json(
mw_body_json_ue_identity_problem_details(
mw_problem_details(
-, -, 403
)))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 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_PLAT_MP1_UETAG_BI_004
} // End of group me_app_role
} // End of module AtsMec_TestCases
......@@ -7,12 +7,13 @@ module BwManagementAPI_TypesAndValues {
import from LibCommon_BasicTypesAndValues all;
/**
* @desc
* @desc Problem Details for HTTP APIs
* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type
* @member title A short, human-readable summary of the problem type
* @member status The HTTP status code for this occurrence of the problem
* @member detail A human-readable explanation specific to this occurrence of the problem
* @member instance A URI reference that identifies the specific occurrence of the problem
* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object
*/
type record ProblemDetails {
JSON.String type_,
......
......@@ -11,12 +11,13 @@ module RnisAPI_TypesAndValues {
import from LibCommon_BasicTypesAndValues all;
/**
* @desc
* @desc Problem Details for HTTP APIs
* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type
* @member title A short, human-readable summary of the problem type
* @member status The HTTP status code for this occurrence of the problem
* @member detail A human-readable explanation specific to this occurrence of the problem
* @member instance A URI reference that identifies the specific occurrence of the problem
* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object
*/
type record ProblemDetails {
JSON.String type_,
......
......@@ -8,6 +8,12 @@ module UEidentityAPI_Pixits {
modulepar universal charstring PX_APP_INSTANCE_ID := "appInst01";
modulepar universal charstring PX_APP_INSTANCE_ID_UNKNOWN := "appInst99";
modulepar universal charstring APP_INSTANCE_ID_WITH_RESTRICTED_ACCESS := "appInst98";
modulepar universal charstring PX_UE_IDENTITY_TAG := "UeTagA";
modulepar universal charstring PX_UE_IDENTITY_TAG_UNKNOWN := "UeTagW";
} // End of module UEidentityAPI_Pixits
/**
* @author ETSI / STF569
* @version $URL$
* $Id$
* @desc Module containing types and values for UeIdentiyAPI protocol
* @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.
*/
module UEidentityAPI_TypesAndValues {
// JSON
......@@ -7,12 +17,13 @@ module UEidentityAPI_TypesAndValues {
import from LibCommon_BasicTypesAndValues all;
/**
* @desc
* @desc Problem Details for HTTP APIs
* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type
* @member title A short, human-readable summary of the problem type
* @member status The HTTP status code for this occurrence of the problem
* @member detail A human-readable explanation specific to this occurrence of the problem
* @member instance A URI reference that identifies the specific occurrence of the problem
* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object
*/
type record ProblemDetails {
JSON.String type_,
......@@ -27,6 +38,7 @@ module UEidentityAPI_TypesAndValues {
/**
* @desc Information of UE identity tag used in UE Identity feature
* @member ueIdentityTags 1 to N tags presented by a ME Application instance to a ME Platform
* @see ETSI GS MEC 014 Clause 7.2 Global definitions and resource structure
*/
type record UeIdentityTagInfo {
UeIdentityTags ueIdentityTags
......@@ -34,11 +46,13 @@ module UEidentityAPI_TypesAndValues {
/**
* @desc Specific tag presented by a ME Application instance to a ME Platform
* @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo
*/
type JSON.String UeIdentityTag;
/**
* @desc Status of the resource ueIdentityTagInfo
* @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo
*/
type enumerated State {
UNREGISTERED,
......@@ -49,6 +63,7 @@ module UEidentityAPI_TypesAndValues {
* @desc ME Application instance to a ME Platform
* @member ueIdentityTag Specific tag presented by a ME Application instance to a ME Platform
* @member state Status of the resource ueIdentityTagInfo
* @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo
*/
type record UeIdentityTagItem {
JSON.String ueIdentityTag,
......@@ -57,6 +72,7 @@ module UEidentityAPI_TypesAndValues {
/**
* @desc 1 to N tags presented by a ME Application instance to a ME Platform
* @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo
*/
type record of UeIdentityTagItem UeIdentityTags;
......
......@@ -107,17 +107,17 @@ module LibItsHttp_JsonTemplates {
ueIdentityTagInfo := p_ueIdentityTagInfo
} // End of template mw_body_json_ue_identity_tag_info
template (value) JsonBody m_body_json_ue_problem_details(
in template (value) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails
) := {
template (value) JsonBody m_body_json_ue_identity_problem_details(
in template (value) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails
) := {
problemDetails_ue_identity := p_problemDetails
} // End of template m_body_json_ue_problem_details
} // End of template m_body_json_ue_identity_problem_details
template (present) JsonBody mw_body_json_ue_problem_details(
template (present) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails := ?
) := {
template (present) JsonBody mw_body_json_ue_identity_problem_details(
template (present) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails := ?
) := {
problemDetails_ue_identity := p_problemDetails
} // End of template mw_body_json_ue_problem_details
} // End of template mw_body_json_ue_identity_problem_details
} // End of group ue_identity_api
......
Supports Markdown
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