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
6df616de
Commit
6df616de
authored
Jul 12, 2019
by
YannGarcia
Browse files
Review Validate UETAG
parent
45e5a2e2
Changes
8
Hide whitespace changes
Inline
Side-by-side
ccsrc/Protocols/Http/http_codec.cc
View file @
6df616de
...
...
@@ -496,7 +496,7 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod
if
(
decoding_buffer
.
get_len
()
-
decoding_buffer
.
get_pos
()
<=
0
)
{
return
-
1
;
}
/* TODO Uncommentif (p_content_type.empty()) {
/* TODO Uncomment
if (p_content_type.empty()) {
loggers::get_instance().warning("http_codec::encode_body: Failed to select a codec for HTTP body payload");
return -1;
}*/
...
...
etc/AtsMec/AtsMec.cfg
View file @
6df616de
...
...
@@ -13,11 +13,12 @@ LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.17"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := false
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED :=
tru
e
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED :=
fals
e
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED :=
fals
e
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED :=
tru
e
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := false
...
...
@@ -62,7 +63,34 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
AtsMec_TestControl.control
#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_UELOC_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_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
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
...
...
ttcn/AtsMec/AtsMec_BwManagementAPI_TestCases.ttcn
View file @
6df616de
...
...
@@ -80,6 +80,8 @@ module AtsMec_BwManagementAPI_TestCases {
mw_body_json_bw_info
(
mw_bw_info
)))))
->
value
v_response
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ZoneId ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
ttcn/AtsMec/AtsMec_LocationAPI_TestCases.ttcn
View file @
6df616de
...
...
@@ -81,6 +81,8 @@ module AtsMec_LocationAPI_TestCases {
*
}
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ZoneId ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -134,6 +136,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_400_bad_request
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -187,6 +191,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_404_not_found
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -258,6 +264,8 @@ module AtsMec_LocationAPI_TestCases {
PX_CALLBACK_REF_URL
,
PX_USER
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a callbackURL ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -319,6 +327,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_400_bad_request
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -371,6 +381,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_204_no_content
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 204 No Content ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -423,6 +435,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_404_not_found
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -485,6 +499,8 @@ module AtsMec_LocationAPI_TestCases {
PX_CALLBACK_REF_URL
,
PX_USER
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a callbackURL ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -546,6 +562,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_400_bad_request
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -598,6 +616,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_204_no_content
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds 204 No Content ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -650,6 +670,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_400_bad_request
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -709,6 +731,8 @@ module AtsMec_LocationAPI_TestCases {
mw_body_json_user_list
(
mw_user_list
(
-
,
?
)
)))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a UserList ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -761,6 +785,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_400_bad_request
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -813,6 +839,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_404_not_found
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -884,6 +912,8 @@ module AtsMec_LocationAPI_TestCases {
PX_CALLBACK_REF_URL
,
PX_ZONE_ID
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a callbackURL ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -945,6 +975,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_400_bad_request
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -1006,6 +1038,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_204_no_content
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with 204 No Content ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -1058,6 +1092,8 @@ module AtsMec_LocationAPI_TestCases {
mw_http_response
(
mw_http_response_404_not_found
))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn
View file @
6df616de
...
...
@@ -81,6 +81,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
mw_access_point_list
(
PX_ZONE_ID
))))))
->
value
v_response
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn
View file @
6df616de
...
...
@@ -82,6 +82,8 @@ module AtsMec_RnisAPI_TestCases {
PX_LINKS_SELF
,
?
))))))
->
value
v_response
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a cell subscription ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn
View file @
6df616de
...
...
@@ -75,8 +75,9 @@ module AtsMec_UEidentityAPI_TestCases {
mw_body_json_ue_identity_tag_info
(
mw_ue_identity_tag_info
(
{
*
,
mw_ue_identity_tag_item
(
PX_UE_IDENTITY_TAG
),
*
}
))))))
{
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a UeIdentityTag ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -115,7 +116,7 @@ module AtsMec_UEidentityAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_get
(
"/"
&
PICS_ROOT_API
&
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"
)),
"/"
&
PICS_ROOT_API
&
PX_ME_APP_Q_UE_IDENTITY_ID_URI
&
oct2char
(
unichar2oct
(
PX_APP_INSTANCE_ID
,
"UTF-8"
))
&
"/
invalid/
ue_identity_tag_info?ueIdentityTag="
&
oct2char
(
unichar2oct
(
PX_UE_IDENTITY_TAG
,
"UTF-8"
)),
v_headers
)
)
...
...
@@ -133,6 +134,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details
(
-
,
-
,
400
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -189,6 +192,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details
(
-
,
-
,
404
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -225,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases {
// Preamble
f_init_default_headers_list
(
-
,
-
,
v_headers
);
// Verify that the user is not register yet
if
(
f_check_user_register_state
(
-
,
v_headers
)
!=
0
)
{
if
(
f_check_user_register_state
(
-
,
v_headers
)
!=
0
)
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Wrong initial conditions ***"
);
f_selfOrClientSyncAndVerdict
(
c_prDone
,
e_timeout
);
}
...
...
@@ -262,6 +267,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_ue_identity_tag_info
(
{
*
,
mw_ue_identity_tag_item
(
PX_UE_IDENTITY_TAG
,
REGISTERED
),
*
}
))))))
{
tc_ac
.
stop
;
if
(
f_check_user_register_state
(
-
,
v_headers
)
==
1
)
{
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully registered the tag ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
...
...
@@ -340,6 +347,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details
(
-
,
-
,
400
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
@@ -413,6 +422,8 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details
(
-
,
-
,
412
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
...
...
ttcn/LibMec/ttcn/LibMec_Functions.ttcn
View file @
6df616de
...
...
@@ -5,6 +5,7 @@ module LibMec_Functions {
// LibMec
import
from
LibMec_Pixits
all
;
import
from
LibMec_Pics
all
;
// LibMec_UEidentityAPI
import
from
UEidentityAPI_TypesAndValues
all
;
...
...
@@ -85,7 +86,7 @@ module LibMec_Functions {
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"
)),
"/"
&
PICS_ROOT_API
&
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
)
)
...
...
@@ -102,12 +103,18 @@ module LibMec_Functions {
mw_ue_identity_tag_info
(
{
*
,
mw_ue_identity_tag_item
(
PX_UE_IDENTITY_TAG
),
*
}
))))))
->
value
v_response
{
tc_ac
.
stop
;
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
)
{
//log("Processing ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag);
//log("State ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state);
if
(
v_response
.
response
.
body
.
json_body
.
ueIdentityTagInfo
.
ueIdentityTags
[
v_i
].
state
==
UNREGISTERED
)
{
v_result
:=
0
;
}
else
{
}
else
if
(
v_response
.
response
.
body
.
json_body
.
ueIdentityTagInfo
.
ueIdentityTags
[
v_i
].
state
==
REGISTERED
)
{
v_result
:=
1
;
}
else
if
(
v_response
.
response
.
body
.
json_body
.
ueIdentityTagInfo
.
ueIdentityTags
[
v_i
].
state
==
INVALID_STATE
)
{
v_result
:=
2
;
}
break
;
}
...
...
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