Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MEC - Multi-access Edge Computing
MEC TTCN-3 Test Suite
Commits
651d6feb
Commit
651d6feb
authored
Jun 19, 2019
by
YannGarcia
Browse files
Review UEidentityAPI tests
parent
79d00f6f
Changes
4
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsMec/AtsMec_TestControl.ttcn
View file @
651d6feb
...
...
@@ -27,13 +27,13 @@ module AtsMec_TestControl {
execute
(
TC_MEC_PLAT_MP1_LOC_BV_001
());
}
if
(
PICS_UE_IDENTITY_API_SUPPORTED
)
{
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
(
T
C
_MEC_PLAT_
MP1_
UETAG_
BI_
003
());
execute
(
T
C
_MEC_PLAT_
MP1_
UETAG_
BI_
004
());
execute
(
TC_MEC_PLAT_UETAG_001
_OK
());
execute
(
TC_MEC_PLAT_UETAG_002
_OK
());
execute
(
TC_MEC_PLAT_UETAG_003
_OK
());
execute
(
TC_MEC_PLAT_UETAG_001
_BI
());
execute
(
TC_MEC_PLAT_UETAG_002
_BI
());
execute
(
T
P
_MEC_PLAT_UETAG_003
_BI
());
execute
(
T
P
_MEC_PLAT_UETAG_004
_BI
());
}
if
(
PICS_LOCATION_API_SUPPORTED
)
{
execute
(
TC_MEC_PLAT_MP1_INF_BV_001
());
...
...
ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn
View file @
651d6feb
...
...
@@ -40,7 +40,7 @@ module AtsMec_UEidentityAPI_TestCases {
* @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/UeIdentity/PlatUeIdentity.tplan2
*/
testcase
TC_MEC_PLAT_
MP1_
UETAG_
BV_
001
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_PLAT_UETAG_001
_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -92,13 +92,13 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC_PLAT_
MP1_
UETAG_
BV_
001
}
// End of testcase TC_MEC_PLAT_UETAG_001
_OK
/**
* @desc Check that the IUT registers a tag (representing a UE) or a list of tags when commanded 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_
BV_
002
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_PLAT_UETAG_002
_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -161,13 +161,13 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC_PLAT_
MP1_
UETAG_
BV_
002
}
// End of testcase TC_MEC_PLAT_UETAG_002
_OK
/**
* @desc Check that the IUT deregisters a tag (representing a UE) or a list of tags when commanded 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_
BV_
003
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_PLAT_UETAG_003
_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -230,13 +230,13 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC_PLAT_
MP1_
UETAG_
BV_
003
}
// End of testcase TC_MEC_PLAT_UETAG_003
_OK
/**
* @desc Check that the IUT responds with
ProblemDetails on information on an unknown UE Identity tag when queried
by a MEC Application
* @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/Plat/Mp1/UeIdentity/PlatUeIdentity.tplan2
*/
testcase
TC_MEC_PLAT_
MP1_
UETAG_
BI_
001
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_PLAT_UETAG_001
_BI
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -270,13 +270,70 @@ module AtsMec_UEidentityAPI_TestCases {
alt
{
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response_404_not_found
(
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_UETAG_001_BI
/**
* @desc Check that the IUT responds with an error when an unauthorised request is sent 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_UETAG_002_BI
()
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_UNAUTHORIZED
,
"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
(
-
,
-
,
40
4
-
,
-
,
40
3
))))))
->
value
v_response
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 40
4 Not Found
***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 40
3 Forbidden
***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
tc_ac
.
timeout
{
...
...
@@ -287,13 +344,13 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC_PLAT_
MP1_
UETAG_
BI_001
}
// End of testcase TC_MEC_PLAT_UETAG_
002_BI
/**
* @desc Check that the IUT responds with
ProblemDetails on information an unknown Application Instance Identifier when queried
by a MEC Application
* @desc Check that the IUT responds with
an error when a request for an URI that cannot be mapped to a valid resource URI is sent
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
{
testcase
TC_MEC_PLAT_UETAG_
003_BI
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -315,7 +372,7 @@ module AtsMec_UEidentityAPI_TestCases {
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"
)),
PX_ME_APP_Q_UE_IDENTITY_ID_URI
&
oct2char
(
unichar2oct
(
PX_
NON_EXISTENT_
APP_INSTANCE_ID
,
"UTF-8"
))
&
"/ue_identity_tag_info?ueIdentityTag="
&
oct2char
(
unichar2oct
(
PX_UE_IDENTITY_TAG
,
"UTF-8"
)),
v_headers
)
)
...
...
@@ -344,13 +401,13 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC_PLAT_
MP1_
UETAG_
BI_002
}
// End of testcase TC_MEC_PLAT_UETAG_
003_BI
/**
* @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
T
C
_MEC_PLAT_
MP1_
UETAG_
BI_
003
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
T
P
_MEC_PLAT_UETAG_003
_BI
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -401,37 +458,49 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase T
C
_MEC_PLAT_
MP1_
UETAG_
BI_
003
}
// End of testcase T
P
_MEC_PLAT_UETAG_003
_BI
/**
* @desc Check that the IUT responds with
ProblemDetails on information on not allowed request
* @desc Check that the IUT responds with
an error when an unauthorised request is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/UeIdentity/PlatUeIdentity.tplan2
*/
testcase
T
C
_MEC_PLAT_
MP1_
UETAG_
BI_
004
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
T
P
_MEC_PLAT_UETAG_004
_BI
()
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
)
m_http_request_post
(
PX_ME_APP_Q_UE_IDENTITY_ID_URI
&
oct2char
(
unichar2oct
(
PX_APP_INSTANCE_ID
,
"UTF-8"
))
&
"/ue_identity_tag_info"
,
v_headers
,
m_http_message_body_json
(
m_body_json_ue_identity_tag_info
(
m_ue_identity_tag_info
(
{
m_ue_identity_tag_item
(
PX_UE_IDENTITY_TAG
,
INVALID_STATE
)
}
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict
(
c_prDone
,
e_success
);
...
...
@@ -441,13 +510,13 @@ module AtsMec_UEidentityAPI_TestCases {
alt
{
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response_40
3_forbidden
(
mw_http_message_body_json
(
mw_body_json_ue_identity_problem_details
(
mw_problem_details
(
-
,
-
,
40
3
))))))
->
value
v_response
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 40
4 Not Found
***"
);
mw_http_response_40
0_bad_request
(
mw_http_message_body_json
(
mw_body_json_ue_identity_problem_details
(
mw_problem_details
(
-
,
-
,
40
0
))))))
->
value
v_response
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 40
0 Bad Request
***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
tc_ac
.
timeout
{
...
...
@@ -458,7 +527,7 @@ module AtsMec_UEidentityAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase T
C
_MEC_PLAT_
MP1_
UETAG_
BI_
004
}
// End of testcase T
P
_MEC_PLAT_UETAG_004
_BI
}
// End of group me_app_role
...
...
ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Pixits.ttcn
View file @
651d6feb
...
...
@@ -8,9 +8,9 @@ module UEidentityAPI_Pixits {
modulepar
universal
charstring
PX_APP_INSTANCE_ID
:=
"appInst01"
;
modulepar
universal
charstring
PX_APP_INSTANCE_ID
_UNKNOWN
:=
"appInst99"
;
modulepar
universal
charstring
PX_
NON_EXISTENT_
APP_INSTANCE_ID
:=
"appInst99"
;
modulepar
universal
charstring
APP_INSTANCE_ID_
WITH_RESTRICTED_ACCESS
:=
"appInst98"
;
modulepar
universal
charstring
PX_
APP_INSTANCE_ID_
UNAUTHORIZED
:=
"appInst98"
;
modulepar
universal
charstring
PX_UE_IDENTITY_TAG
:=
"UeTagA"
;
...
...
ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn
View file @
651d6feb
...
...
@@ -56,7 +56,8 @@ module UEidentityAPI_TypesAndValues {
*/
type
enumerated
State
{
UNREGISTERED
,
REGISTERED
REGISTERED
,
INVALID_STATE
// Used for BI tests
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment