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
835ae35e
Commit
835ae35e
authored
Oct 20, 2019
by
YannGarcia
Browse files
Validation of LocationAPI (GS 013)
parent
da939b20
Changes
6
Hide whitespace changes
Inline
Side-by-side
ccsrc/Protocols/Json/json_codec.cc
View file @
835ae35e
...
...
@@ -64,6 +64,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
int
idx_end
=
it
->
second
.
rfind
(
"}"
)
-
1
;
// Remove the last '}'
std
::
string
str
=
it
->
second
.
substr
(
idx_begin
+
1
,
idx_end
-
idx_begin
);
// ..and create the decoding buffer
loggers
::
get_instance
().
log
(
"json_codec::decode: decoding_buffer=%s"
,
str
.
c_str
());
TTCN_Buffer
decoding_buffer
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
if
(
it
->
second
.
find
(
"
\"
userList
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
...
...
@@ -71,7 +72,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
LocationAPI__TypesAndValues
::
UserList
user_list
;
user_list
.
decode
(
LocationAPI__TypesAndValues
::
UserList_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
userList
()
=
user_list
;
}
else
if
(
it
->
second
.
find
(
"
\"
accessPointList
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
}
else
if
(
it
->
second
.
find
(
"
\"
accessPointList
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
LocationAPI__TypesAndValues
::
AccessPointList
access_point_list
;
access_point_list
.
decode
(
LocationAPI__TypesAndValues
::
AccessPointList_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
...
...
etc/AtsMec/AtsMec_AdvantEDGE.cfg
0 → 100644
View file @
835ae35e
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
# IUT roles
LibCommon_Time.PX_TAC := 30.0
#LibCommon_Time.PX_TWAIT := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
LibItsHttp_Pics.PICS_HEADER_HOST := "172.22.1.6"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true
#LibItsHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken"
LibMec_Pics.PICS_ROOT_API := "etsi-013"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS_QUERY := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LibMec_Pics.PICS_RNIS_NOTIFICATIONS := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := false
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := false
#AppEnablementAPI_Pics.PICS_APP_ENABLEMENT_API_SUPPORTED := true
#AppEnablementAPI_Pics.PICS_ME_APP_SUPPORT_TIMING_CAPS_URI
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
LogFile := "../logs/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
#TimeStampFormat := DateTime
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.22.1.6,port=31007,use_ssl=0)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=8081,use_ssl=0)"
[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE].
[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[ORDERED_INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.
#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsMec_TestControl.control
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_NF
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_BR
AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_NF
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_NF
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_NF
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_NF
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_001_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_002_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_003_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_004_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_005_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_006_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_007_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_008_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_002_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_NF
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_Pixits.ttcn
View file @
835ae35e
...
...
@@ -10,6 +10,4 @@ module BwManagementAPI_Pixits {
modulepar
ResourceURL
PX_RESOURCE_URL
:=
"http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"
;
modulepar
TimeStamp
PX_TIME_STAMP
:=
{
seconds
:=
1483231138
,
nanoSeconds
:=
0
};
}
// End of module BwManagementAPI_Pixits
ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn
View file @
835ae35e
...
...
@@ -6,7 +6,7 @@ module LocationAPI_Pixits {
// LibMec/LocationAPI
import
from
LocationAPI_TypesAndValues
all
;
modulepar
Address
PX_USER
:=
"
acr:192.0.0.
1"
;
modulepar
Address
PX_USER
:=
"
ue
1"
;
modulepar
Address
PX_USER_UNKNOWN
:=
"acr:192.0.0.200"
;
...
...
@@ -18,16 +18,14 @@ module LocationAPI_Pixits {
modulepar
charstring
PX_SUBSCRIPTION_ID_UNKNOWN
:=
"subscription0666"
;
modulepar
AccessPointId
PX_ACCESS_POINT_ID
:=
"
00101000000000000000000000000000
1"
;
modulepar
AccessPointId
PX_ACCESS_POINT_ID
:=
"
zone1-poa
1"
;
modulepar
ZoneId
PX_ZONE_ID
:=
"zone
0
1"
;
modulepar
ZoneId
PX_ZONE_ID
:=
"zone1"
;
modulepar
ZoneId
NON_EXISTENT_ZONE_ID
:=
"zone51"
;
modulepar
ResourceURL
PX_RESOURCE_URL
:=
"http://
example.com/exampleAPI
/location/v
2
/users
?address:acr:192.0.0.
1"
;
modulepar
ResourceURL
PX_RESOURCE_URL
:=
"http://
meep-loc-serv/etsi-013
/location/v
1
/users
/ue
1"
;
modulepar
TimeStamp
PX_TIME_STAMP
:=
{
seconds
:=
1483231138
,
nanoSeconds
:=
0
};
modulepar
NumberOfAccessPoints
PX_NB_ACCESS_POINTS
:=
3
;
modulepar
UInt32
PX_NB_UNSERVICABLEL_ACCESS_POINTS
:=
1
;
...
...
ttcn/LibMec/ttcn/LibMec_Functions.ttcn
View file @
835ae35e
...
...
@@ -350,7 +350,7 @@ module LibMec_Functions {
))
->
value
v_response
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: Received HTTP error message in case of non authenticated HTTP request ***"
);
f_selfOrClientSyncAndVerdictTestBody
(
c_tbDone
,
e_
error
);
f_selfOrClientSyncAndVerdictTestBody
(
c_tbDone
,
e_
success
);
}
[]
httpPort
.
receive
(
mw_http_response
(
...
...
@@ -358,7 +358,7 @@ module LibMec_Functions {
))
->
value
v_response
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": FAIL: Server error: "
&
int2str
(
v_response
.
response
.
statuscode
)
&
"/"
&
v_response
.
response
.
statustext
&
" ***"
);
f_selfOrClientSyncAndVerdictTestBody
(
c_tbDone
,
e_
success
);
f_selfOrClientSyncAndVerdictTestBody
(
c_tbDone
,
e_
error
);
// Do not repeat!
}
[]
httpPort
.
receive
(
mw_http_response
)
->
value
v_response
{
...
...
ttcn/LibMec/ttcn/LibMec_Pixits.ttcn
View file @
835ae35e
module
LibMec_Pixits
{
modulepar
charstring
PX_ME_APP_Q_ZONE_ID_URI
:=
"/location/v
2
/zones"
;
modulepar
charstring
PX_ME_APP_Q_ZONE_ID_URI
:=
"/location/v
1
/zones"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LIST_URI
:=
"/location/v
2
/users"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LIST_URI
:=
"/location/v
1
/users"
;
modulepar
charstring
PX_ME_APP_Q_DIST_URI
:=
"/location/v
2
/subscriptions/distance"
;
modulepar
charstring
PX_ME_APP_Q_DIST_URI
:=
"/location/v
1
/subscriptions/distance"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LOC_SUB_URI
:=
"/location/v
2
/subscriptions/userTracking"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LOC_SUB_URI
:=
"/location/v
1
/subscriptions/userTracking"
;
modulepar
charstring
PX_ME_APP_Q_USERS_TRACK_SUB_URI
:=
"/location/v
2
/subscriptions/periodic"
;
modulepar
charstring
PX_ME_APP_Q_USERS_TRACK_SUB_URI
:=
"/location/v
1
/subscriptions/periodic"
;
modulepar
charstring
PX_ME_APP_Q_USERS_INF_SUB_URI
:=
"/location/v
2
/subscriptions/zonalTraffic"
;
modulepar
charstring
PX_ME_APP_Q_USERS_INF_SUB_URI
:=
"/location/v
1
/subscriptions/zonalTraffic"
;
modulepar
charstring
PX_ME_APP_Q_UE_IDENTITY_ID_URI
:=
"/ui/v
2
/"
;
modulepar
charstring
PX_ME_APP_Q_UE_IDENTITY_ID_URI
:=
"/ui/v
1
/"
;
modulepar
charstring
PX_SVC_MGMT_TRANS_URI
:=
"/mec_app_support/v
2
/transports"
;
modulepar
charstring
PX_SVC_MGMT_TRANS_URI
:=
"/mec_app_support/v
1
/transports"
;
modulepar
charstring
PX_SVC_MGMT_APP_URI
:=
"/mec_service_mgmt/v
2
/application"
;
modulepar
charstring
PX_SVC_MGMT_APP_URI
:=
"/mec_service_mgmt/v
1
/application"
;
modulepar
charstring
PX_RNIS_SUBSCRITIONS_URI
:=
"/rni/v
2
/subscriptions"
;
modulepar
charstring
PX_RNIS_SUBSCRITIONS_URI
:=
"/rni/v
1
/subscriptions"
;
modulepar
charstring
PX_RNIS_QUERIES_URI
:=
"/rni/v
2
/queries"
;
modulepar
charstring
PX_RNIS_QUERIES_URI
:=
"/rni/v
1
/queries"
;
modulepar
charstring
PX_ME_BWM_URI
:=
"/bwm/v
2
/bw_allocations"
;
modulepar
charstring
PX_ME_BWM_URI
:=
"/bwm/v
1
/bw_allocations"
;
modulepar
charstring
PX_ME_APP_AMS_URI
:=
"/amsi/v1/appMobilityServices"
...
...
@@ -44,9 +44,9 @@ module LibMec_Pixits {
modulepar
charstring
PX_MEX_LCM_OP_OCC_URI
:=
"/alcmi/v1/app_lcm_op_occs"
modulepar
charstring
PX_UE_APP_CTX_URI
:=
"/mx2/v
2
/app_contexts"
;
modulepar
charstring
PX_UE_APP_CTX_URI
:=
"/mx2/v
1
/app_contexts"
;
modulepar
charstring
PX_UE_APPS_URI
:=
"/mx2/v
2
/app_list"
;
modulepar
charstring
PX_UE_APPS_URI
:=
"/mx2/v
1
/app_list"
;
modulepar
charstring
PX_MEC_SVC_MGMT_APPS_URI
:=
"/mec_service_mgmt/v1/applications"
;
...
...
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