Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
2be74c99
Commit
2be74c99
authored
Aug 13, 2019
by
YannGarcia
Browse files
Finalyze RnisQuery_BV/RnisQuery_BI_BO tests
parent
68867733
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1112 additions
and
477 deletions
+1112
-477
TODO.md
TODO.md
+29
-0
ccsrc/Protocols/Json/json_codec.cc
ccsrc/Protocols/Json/json_codec.cc
+113
-1
etc/AtsMec/AtsMec.cfg
etc/AtsMec/AtsMec.cfg
+12
-1
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn
+578
-11
ttcn/AtsMec/AtsMec_TestControl.ttcn
ttcn/AtsMec/AtsMec_TestControl.ttcn
+11
-1
ttcn/LibIts
ttcn/LibIts
+1
-1
ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn
ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn
+31
-33
ttcn/LibMec/RnisAPI/json/RnisAPI.json
ttcn/LibMec/RnisAPI/json/RnisAPI.json
+17
-11
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn
+9
-1
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn
+219
-140
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn
+34
-23
ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn
ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn
+11
-30
ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn
ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn
+47
-224
No files found.
TODO.md
View file @
2be74c99
...
@@ -27,8 +27,37 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo
...
@@ -27,8 +27,37 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
-
TC_MEC_SRV_RNIS_011_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_011_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_012_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_012_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_011_BR
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_012_BR
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_016_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_016_BR
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_016_NF
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_017_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_017_BR
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_017_NF
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_018_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_018_BR
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_018_NF
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_019_OK
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_019_BR
<font
color=
"color:green"
>
To be tested
</font>
-
TC_MEC_SRV_RNIS_019_NF
<font
color=
"color:green"
>
To be tested
</font>
### SAQ
### SAQ
### SRVSUB
### SRVSUB
...
...
ccsrc/Protocols/Json/json_codec.cc
View file @
2be74c99
...
@@ -99,14 +99,126 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
...
@@ -99,14 +99,126 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
traffic_rule
.
decode
(
AppEnablementAPI__TypesAndValues
::
TrafficRule_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
traffic_rule
.
decode
(
AppEnablementAPI__TypesAndValues
::
TrafficRule_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
trafficRule
()
=
traffic_rule
;
msg
.
trafficRule
()
=
traffic_rule
;
}
else
if
(
it
->
second
.
find
(
"
\"
CellChangeSubscription
\"
"
)
!=
std
::
string
::
npos
)
{
}
else
if
(
it
->
second
.
find
(
"
\"
CellChangeSubscription
\"
"
)
!=
std
::
string
::
npos
)
{
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
//loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std
::
size_t
it_start
=
str
.
find
(
"
\"
type
\"
"
);
loggers
::
get_instance
().
log
(
"json_codec::decode: id_start=%d"
,
it_start
);
if
(
it_start
!=
std
::
string
::
npos
)
{
std
::
size_t
it_stop
=
str
.
find
(
","
,
it_start
);
//loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
std
::
size_t
it
=
str
.
find
(
"1"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV4_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"2"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV6_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"3"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"NATED_IP_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"4"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"GTP_TEID"
+
str
.
substr
(
it
+
1
);
}
}
}
}
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer
.
clear
();
decoding_buffer
.
put_os
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
RnisAPI__TypesAndValues
::
CellChangeSubscription
cell_change_subscription
;
RnisAPI__TypesAndValues
::
CellChangeSubscription
cell_change_subscription
;
cell_change_subscription
.
decode
(
RnisAPI__TypesAndValues
::
CellChangeSubscription_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
cell_change_subscription
.
decode
(
RnisAPI__TypesAndValues
::
CellChangeSubscription_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
cellChangeSubscription
()
=
cell_change_subscription
;
msg
.
cellChangeSubscription
()
=
cell_change_subscription
;
//TODO Continue with other ChangeSubscription
//TODO Continue with other ChangeSubscription
}
else
if
(
it
->
second
.
find
(
"
\"
RabInfo
\"
"
)
!=
std
::
string
::
npos
)
{
}
else
if
(
it
->
second
.
find
(
"
\"
RabInfo
\"
"
)
!=
std
::
string
::
npos
)
{
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std
::
size_t
it_start
=
str
.
find
(
"
\"
type
\"
"
);
loggers
::
get_instance
().
log
(
"json_codec::decode: id_start=%d"
,
it_start
);
if
(
it_start
!=
std
::
string
::
npos
)
{
std
::
size_t
it_stop
=
str
.
find
(
","
,
it_start
);
//loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
std
::
size_t
it
=
str
.
find
(
"1"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV4_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"2"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV6_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"3"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"NATED_IP_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"4"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"GTP_TEID"
+
str
.
substr
(
it
+
1
);
}
}
}
}
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer
.
clear
();
decoding_buffer
.
put_os
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
RnisAPI__TypesAndValues
::
RabInfo
rab_info
;
RnisAPI__TypesAndValues
::
RabInfo
rab_info
;
rab_info
.
decode
(
RnisAPI__TypesAndValues
::
RabInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
rab_info
.
decode
(
RnisAPI__TypesAndValues
::
RabInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
rabInfo
()
=
rab_info
;
msg
.
rabInfo
()
=
rab_info
;
}
else
if
(
it
->
second
.
find
(
"
\"
S1BearerInfo
\"
"
)
!=
std
::
string
::
npos
)
{
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std
::
size_t
it_start
=
str
.
find
(
"
\"
type
\"
"
);
loggers
::
get_instance
().
log
(
"json_codec::decode: id_start=%d"
,
it_start
);
if
(
it_start
!=
std
::
string
::
npos
)
{
std
::
size_t
it_stop
=
str
.
find
(
","
,
it_start
);
//loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
std
::
size_t
it
=
str
.
find
(
"1"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV4_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"2"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV6_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"3"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"NATED_IP_ADDRESS"
+
str
.
substr
(
it
+
1
);
}
else
{
it
=
str
.
find
(
"4"
,
it_start
,
1
);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
str
=
str
.
substr
(
0
,
it
)
+
"GTP_TEID"
+
str
.
substr
(
it
+
1
);
}
}
}
}
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer
.
clear
();
decoding_buffer
.
put_os
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
RnisAPI__TypesAndValues
::
S1BearerInfo
s1_nearer_info
;
s1_nearer_info
.
decode
(
RnisAPI__TypesAndValues
::
S1BearerInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
s1BearerInfo
()
=
s1_nearer_info
;
}
else
if
(
it
->
second
.
find
(
"
\"
PlmnInfo
\"
"
)
!=
std
::
string
::
npos
)
{
}
else
if
(
it
->
second
.
find
(
"
\"
PlmnInfo
\"
"
)
!=
std
::
string
::
npos
)
{
RnisAPI__TypesAndValues
::
PlmnInfo
plmn_info
;
RnisAPI__TypesAndValues
::
PlmnInfo
plmn_info
;
plmn_info
.
decode
(
RnisAPI__TypesAndValues
::
PlmnInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
plmn_info
.
decode
(
RnisAPI__TypesAndValues
::
PlmnInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
...
@@ -139,7 +251,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
...
@@ -139,7 +251,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
RnisAPI__TypesAndValues
::
ProblemDetails
problem_details
;
RnisAPI__TypesAndValues
::
ProblemDetails
problem_details
;
problem_details
.
decode
(
RnisAPI__TypesAndValues
::
ProblemDetails_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
problem_details
.
decode
(
RnisAPI__TypesAndValues
::
ProblemDetails_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
problemDetails__rni
()
=
problem_details
;
msg
.
problemDetails__rni
s
()
=
problem_details
;
}
else
{
}
else
{
...
...
etc/AtsMec/AtsMec.cfg
View file @
2be74c99
...
@@ -104,7 +104,18 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
...
@@ -104,7 +104,18 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_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_011_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_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_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_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_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_001_OK
...
...
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn
View file @
2be74c99
...
@@ -355,7 +355,7 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -355,7 +355,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort
.
send
(
httpPort
.
send
(
m_http_request
(
m_http_request
(
m_http_request_get
(
m_http_request_get
(
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"?cell_id="
&
oct2char
(
unichar2oct
(
PX_CELL_ID
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"
/rab_info
?cell_id="
&
oct2char
(
unichar2oct
(
PX_CELL_ID
,
"UTF-8"
)),
v_headers
v_headers
)
)
)
)
...
@@ -374,11 +374,15 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -374,11 +374,15 @@ module AtsMec_RnisAPI_TestCases {
mw_time_stamp
,
mw_time_stamp
,
PX_APP_INS_ID
,
PX_APP_INS_ID
,
-
,
-
,
mw_cell_user_info
(
{
mw_ecgi
(
mw_cell_user_info
(
mw_plmn
,
mw_ecgi
(
PX_CELL_ID
mw_plmn
,
))))))))
{
PX_CELL_ID
)
)
}
))))))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a RAB information ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a RAB information ***"
);
...
@@ -419,7 +423,7 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -419,7 +423,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort
.
send
(
httpPort
.
send
(
m_http_request
(
m_http_request
(
m_http_request_get
(
m_http_request_get
(
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"
?cell
_id="
&
oct2char
(
unichar2oct
(
PX_
CELL
_ID
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"
/plmn_info?app_ins
_id="
&
oct2char
(
unichar2oct
(
PX_
APP_INS
_ID
,
"UTF-8"
)),
v_headers
v_headers
)
)
)
)
...
@@ -437,10 +441,8 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -437,10 +441,8 @@ module AtsMec_RnisAPI_TestCases {
mw_plmn_info
(
mw_plmn_info
(
mw_time_stamp
,
mw_time_stamp
,
PX_APP_INS_ID
,
PX_APP_INS_ID
,
mw_ecgi
(
{
mw_plmn
}
mw_plmn
,
))))))
{
PX_CELL_ID
)))))))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a PLMN information ***"
);
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a PLMN information ***"
);
...
@@ -456,7 +458,572 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -456,7 +458,572 @@ module AtsMec_RnisAPI_TestCases {
f_cf_01_http_down
();
f_cf_01_http_down
();
}
// End of testcase TC_MEC_SRV_RNIS_017_OK
}
// End of testcase TC_MEC_SRV_RNIS_017_OK
/**
* @desc Check that the RNIS service returns the S1 bearer information.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2
*/
testcase
TC_MEC_SRV_RNIS_018_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
// Test control
if
(
not
(
PICS_RNIS
)
or
not
(
PICS_RNIS_QUERY
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_RNIS and PICS_RNIS_QUERY 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
(
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"/s1_bearer_info?cell_id="
&
oct2char
(
unichar2oct
(
PX_CELL_ID
,
"UTF-8"
)),
v_headers
)
)
);
f_selfOrClientSyncAndVerdict
(
c_prDone
,
e_success
);
// Test Body
tc_ac
.
start
;
alt
{
[]
httpPort
.
receive
(
mw_http_response
(
mw_http_response_ok
(
mw_http_message_body_json
(
mw_body_json_s1_bearer_info
(
mw_s1_bearer_info
(
mw_time_stamp
,
{
mw_s1_ue_info
(
{
mw_temp_ue_id
},
{
mw_associate_id
},
{
*
,
mw_ecgi
(
mw_plmn
,
PX_CELL_ID
),
*
},
{
mw_s1_bearer_info_detailed
// TODO To be refined
})
}))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a S1BearerInfo information ***"
);
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_SRV_RNIS_018_OK
/**
* @desc Check that the RNIS service returns the L2 measurements information.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2
*/
testcase
TC_MEC_SRV_RNIS_019_OK
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
// Test control
if
(
not
(
PICS_RNIS
)
or
not
(
PICS_RNIS_QUERY
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_RNIS and PICS_RNIS_QUERY required for executing the TC ***"
);
setverdict
(
inconc
);
stop
;
}
// Test component configuration
f_cf_01_http_up
();
// Test adapter configuration
// Preamble
// Test Body
log
(
"*** "
&
testcasename
()
&
": INCONC: Too many changes in JSON data description, not implemented ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC_SRV_RNIS_019_OK
}
// End of group rnis_query
}
// End of group rnis_query
group
rnis_query_bi_bo
{
/**
* @desc Check that the RNIS service returns an error when the RAB information is requested with a malformatted message.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2
*/
testcase
TC_MEC_SRV_RNIS_016_BR
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
// Test control
if
(
not
(
PICS_RNIS
)
or
not
(
PICS_RNIS_QUERY
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_RNIS and PICS_RNIS_QUERY 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
(
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"/rab_info?c_id="
&
oct2char
(
unichar2oct
(
PX_CELL_ID
,
"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_rni_problem_details
(
mw_problem_details
(
-
,
-
,
400
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"
);
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_SRV_RNIS_016_BR
/**
* @desc Check that the RNIS service returns an error when the RAB information is requested with a malformatted message.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2
*/
testcase
TC_MEC_SRV_RNIS_016_NF
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
// Test control
if
(
not
(
PICS_RNIS
)
or
not
(
PICS_RNIS_QUERY
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_RNIS and PICS_RNIS_QUERY 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
(
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"/rab_info?cell_id="
&
oct2char
(
unichar2oct
(
PX_NOT_EXISTENT_CELL_ID
,
"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_rni_problem_details
(
mw_problem_details
(
-
,
-
,
404
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"
);
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_SRV_RNIS_016_NF
/**
* @desc Check that the RNIS service returns an error when the PLMN information is requested with a malformatted message.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2
*/
testcase
TC_MEC_SRV_RNIS_017_BR
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
// Test control
if
(
not
(
PICS_RNIS
)
or
not
(
PICS_RNIS_QUERY
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_RNIS and PICS_RNIS_QUERY 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
(
"/"
&
PICS_ROOT_API
&
PX_RNIS_QUERIES_URI
&
"/plmn_info?app_id="
&
oct2char
(
unichar2oct
(
PX_APP_ID
,
"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_rni_problem_details
(
mw_problem_details
(
-
,
-
,
400
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"
);
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_SRV_RNIS_017_BR
/**
* @desc Check that the RNIS service returns an error when the PLMN information for a not existing element is requested.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2
*/
testcase
TC_MEC_SRV_RNIS_017_NF
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
// Test control
if
(
not
(
PICS_RNIS
)
or
not
(
PICS_RNIS_QUERY
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_RNIS and PICS_RNIS_QUERY 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
(