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
97c12f07
Commit
97c12f07
authored
Jul 10, 2019
by
YannGarcia
Browse files
Review TP_MEC_SRV_UELOC_001_OK, TC_MEC_SRV_UELOC_001_BR, TC_MEC_SRV_UELOC_001_NF
parent
46b8a6fe
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
TODO.md
View file @
97c12f07
...
@@ -60,4 +60,21 @@ https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELO
...
@@ -60,4 +60,21 @@ https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELO
### UeIdentity
### UeIdentity
ETSI GS MEC 014 V1.1.1 (2018-02)
https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
-
TC_MEC_PLAT_UETAG_001_OK
<span
style=
"color:green"
>
To be tested
</span>
-
TC_MEC_PLAT_UETAG_002_OK
<span
style=
"color:green"
>
To be tested
</span>
-
TC_MEC_PLAT_UETAG_003_OK
<span
style=
"color:green"
>
To be tested
</span>
-
TC_MEC_PLAT_UETAG_001_BI
<span
style=
"color:green"
>
To be tested
</span>
-
TC_MEC_PLAT_UETAG_002_BI
<span
style=
"color:green"
>
To be tested
</span>
-
TP_MEC_PLAT_UETAG_003_BI
<span
style=
"color:green"
>
Done
</span>
-
TP_MEC_PLAT_UETAG_004_BI
<span
style=
"color:green"
>
Done
</span>
ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn
View file @
97c12f07
...
@@ -12,8 +12,6 @@
...
@@ -12,8 +12,6 @@
module
AtsMec_LocationAPI_TestCases
{
module
AtsMec_LocationAPI_TestCases
{
// Libcommon
// Libcommon
import
from
LibCommon_Time
all
;
import
from
LibCommon_VerdictControl
all
;
import
from
LibCommon_Sync
all
;
import
from
LibCommon_Sync
all
;
// LibHttp
// LibHttp
...
@@ -24,7 +22,6 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -24,7 +22,6 @@ module AtsMec_LocationAPI_TestCases {
import
from
LibItsHttp_TestSystem
all
;
import
from
LibItsHttp_TestSystem
all
;
// LibMec_LocationAPI
// LibMec_LocationAPI
import
from
LocationAPI_TypesAndValues
all
;
import
from
LocationAPI_Templates
all
;
import
from
LocationAPI_Templates
all
;
import
from
LocationAPI_Pics
all
;
import
from
LocationAPI_Pics
all
;
import
from
LocationAPI_Pixits
all
;
import
from
LocationAPI_Pixits
all
;
...
@@ -44,11 +41,10 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -44,11 +41,10 @@ module AtsMec_LocationAPI_TestCases {
testcase
TC_MEC_SRV_UELOC_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
;
// Test control
// Test control
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_SERVICES
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and
PICS_SERVICES and
PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
setverdict
(
inconc
);
setverdict
(
inconc
);
stop
;
stop
;
}
}
...
@@ -84,7 +80,7 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -84,7 +80,7 @@ module AtsMec_LocationAPI_TestCases {
mw_user_info
(
PX_USER
,
PX_ACCESS_POINT_ID
,
PX_ZONE_ID
,
PX_RESOURCE_URL
),
mw_user_info
(
PX_USER
,
PX_ACCESS_POINT_ID
,
PX_ZONE_ID
,
PX_RESOURCE_URL
),
*
*
}
}
))))))
->
value
v_response
{
))))))
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ZoneId ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ZoneId ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
}
...
@@ -106,11 +102,10 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -106,11 +102,10 @@ module AtsMec_LocationAPI_TestCases {
testcase
TC_MEC_SRV_UELOC_001_BR
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_SRV_UELOC_001_BR
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
// Local variables
var
HeaderLines
v_headers
;
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
// Test control
// Test control
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_SERVICES
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and
PICS_SERVICES and
PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
setverdict
(
inconc
);
setverdict
(
inconc
);
stop
;
stop
;
}
}
...
@@ -138,7 +133,7 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -138,7 +133,7 @@ module AtsMec_LocationAPI_TestCases {
[]
httpPort
.
receive
(
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response
(
mw_http_response_400_bad_request
mw_http_response_400_bad_request
))
->
value
v_response
{
))
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 400 Bad Request ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
}
...
@@ -160,11 +155,10 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -160,11 +155,10 @@ module AtsMec_LocationAPI_TestCases {
testcase
TC_MEC_SRV_UELOC_001_NF
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_SRV_UELOC_001_NF
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
// Local variables
var
HeaderLines
v_headers
;
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
// Test control
// Test control
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_SERVICES
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and
PICS_SERVICES and
PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
setverdict
(
inconc
);
setverdict
(
inconc
);
stop
;
stop
;
}
}
...
@@ -192,7 +186,7 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -192,7 +186,7 @@ module AtsMec_LocationAPI_TestCases {
[]
httpPort
.
receive
(
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response
(
mw_http_response_404_not_found
mw_http_response_404_not_found
))
->
value
v_response
{
))
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a 404 Not Found ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
}
...
@@ -218,11 +212,10 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -218,11 +212,10 @@ module AtsMec_LocationAPI_TestCases {
testcase
TC_MEC_PLAT_LOCSUB_001_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_PLAT_LOCSUB_001_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
// Local variables
var
HeaderLines
v_headers
;
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
// Test control
// Test control
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_SERVICES
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and
PICS_SERVICES and
PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
setverdict
(
inconc
);
setverdict
(
inconc
);
stop
;
stop
;
}
}
...
@@ -265,7 +258,7 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -265,7 +258,7 @@ module AtsMec_LocationAPI_TestCases {
PX_CLIENT_ID
,
PX_CLIENT_ID
,
PX_CALLBACK_REF_URL
,
PX_CALLBACK_REF_URL
,
PX_USER
PX_USER
))))))
->
value
v_response
{
))))))
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ressourceURL ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ressourceURL ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
}
...
@@ -286,11 +279,10 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -286,11 +279,10 @@ module AtsMec_LocationAPI_TestCases {
testcase
TC_MEC_PLAT_LOCSUB_002_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
testcase
TC_MEC_PLAT_LOCSUB_002_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
// Local variables
var
HeaderLines
v_headers
;
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
// Test control
// Test control
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
if
(
not
(
PICS_MEC_PLAT
)
or
not
(
PICS_SERVICES
)
or
not
(
PICS_LOCATION_API_SUPPORTED
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
log
(
"*** "
&
testcasename
()
&
": PICS_MEC_PLAT and
PICS_SERVICES and
PICS_LOCATION_API_SUPPORTED required for executing the TC ***"
);
setverdict
(
inconc
);
setverdict
(
inconc
);
stop
;
stop
;
}
}
...
@@ -318,7 +310,7 @@ module AtsMec_LocationAPI_TestCases {
...
@@ -318,7 +310,7 @@ module AtsMec_LocationAPI_TestCases {
[]
httpPort
.
receive
(
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response
(
mw_http_response_ok
mw_http_response_ok
))
->
value
v_response
{
))
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully cancel subscription ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully cancel subscription ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
}
...
...
ttcn/AtsMec/AtsMec_TestControl.ttcn
View file @
97c12f07
...
@@ -22,7 +22,7 @@ module AtsMec_TestControl {
...
@@ -22,7 +22,7 @@ module AtsMec_TestControl {
control
{
control
{
if
(
PICS_MEC_PLAT
)
{
if
(
PICS_MEC_PLAT
and
PICS_SERVICES
)
{
if
(
PICS_LOCATION_API_SUPPORTED
)
{
if
(
PICS_LOCATION_API_SUPPORTED
)
{
execute
(
TC_MEC_SRV_UELOC_001_OK
());
execute
(
TC_MEC_SRV_UELOC_001_OK
());
execute
(
TC_MEC_SRV_UELOC_001_BR
());
execute
(
TC_MEC_SRV_UELOC_001_BR
());
...
@@ -38,8 +38,9 @@ module AtsMec_TestControl {
...
@@ -38,8 +38,9 @@ module AtsMec_TestControl {
execute
(
TC_MEC_PLAT_UETAG_003_OK
());
execute
(
TC_MEC_PLAT_UETAG_003_OK
());
execute
(
TC_MEC_PLAT_UETAG_001_BI
());
execute
(
TC_MEC_PLAT_UETAG_001_BI
());
execute
(
TC_MEC_PLAT_UETAG_002_BI
());
execute
(
TC_MEC_PLAT_UETAG_002_BI
());
execute
(
T
P
_MEC_PLAT_UETAG_003_BI
());
execute
(
T
C
_MEC_PLAT_UETAG_003_BI
());
execute
(
TP_MEC_PLAT_UETAG_004_BI
());
execute
(
TP_MEC_PLAT_UETAG_004_BI
());
execute
(
TP_MEC_PLAT_UETAG_005_BI
());
}
}
}
}
...
...
ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn
View file @
97c12f07
This diff is collapsed.
Click to expand it.
ttcn/LibMec/ttcn/LibMec_Functions.ttcn
View file @
97c12f07
module
LibMec_Functions
{
module
LibMec_Functions
{
// Libcommon
// Libcommon
import
from
LibCommon_Time
all
;
import
from
LibCommon_VerdictControl
all
;
import
from
LibCommon_Sync
all
;
import
from
LibCommon_Sync
all
;
// LibMec
import
from
LibMec_Pixits
all
;
// LibMec_UEidentityAPI
import
from
UEidentityAPI_TypesAndValues
all
;
import
from
UEidentityAPI_Templates
all
;
import
from
UEidentityAPI_Pixits
all
;
// LibHttp
// LibHttp
import
from
LibItsHttp_TypesAndValues
all
;
import
from
LibItsHttp_TypesAndValues
all
;
import
from
LibItsHttp_Templates
all
;
import
from
LibItsHttp_Templates
all
;
import
from
LibItsHttp_TestSystem
all
;
import
from
LibItsHttp_TestSystem
all
;
import
from
LibItsHttp_Templates
all
;
import
from
LibItsHttp_JsonTemplates
all
;
group
preambles
{
group
preambles
{
...
@@ -60,6 +68,60 @@ module LibMec_Functions {
...
@@ -60,6 +68,60 @@ module LibMec_Functions {
}
// End of group postambles
}
// End of group postambles
group
helpers
{
/**
* @desc Check if the user is registered or not
* @param
* @return 0 if unregistered, 1 if registered, -1 otherwise
*/
function
f_check_user_register_state
(
in
UeIdentityTag
p_ue_identity_tag
:=
PX_UE_IDENTITY_TAG
,
in
HeaderLines
p_headers
)
runs
on
HttpComponent
return
integer
{
var
HttpMessage
v_response
;
var
integer
v_result
:=
-
1
;
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
(
p_ue_identity_tag
,
"UTF-8"
)),
p_headers
)
)
);
// Test Body
tc_ac
.
start
;
alt
{
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response_ok
(
mw_http_message_body_json
(
mw_body_json_ue_identity_tag_info
(
mw_ue_identity_tag_info
(
{
*
,
mw_ue_identity_tag_item
(
PX_UE_IDENTITY_TAG
),
*
}
))))))
->
value
v_response
{
for
(
var
integer
v_i
:=
0
;
v_i
<
lengthof
(
v_response
.
response
.
body
.
json_body
.
ueIdentityTagInfo
.
ueIdentityTags
);
v_i
:=
v_i
+
1
)
{
if
(
v_response
.
response
.
body
.
json_body
.
ueIdentityTagInfo
.
ueIdentityTags
[
v_i
].
ueIdentityTag
==
p_ue_identity_tag
)
{
if
(
v_response
.
response
.
body
.
json_body
.
ueIdentityTagInfo
.
ueIdentityTags
[
v_i
].
state
==
UNREGISTERED
)
{
v_result
:=
0
;
}
else
{
v_result
:=
1
;
}
break
;
}
}
}
[]
tc_ac
.
timeout
{
}
}
// End of 'alt' statement
return
v_result
;
}
// End of function f_check_user_register_state
}
// End of group helpers
group
altsteps
{
group
altsteps
{
altstep
a_default_requests
()
runs
on
HttpComponent
{
altstep
a_default_requests
()
runs
on
HttpComponent
{
...
...
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