Commit 974c0194 authored by YannGarcia's avatar YannGarcia

Review TP_MEC_SRV_UELOC_001_OK, TC_MEC_SRV_UELOC_001_BR, TC_MEC_SRV_UELOC_001_NF

parent a5e73606
# MEC Testing Framework in TTCN-3- TODO list
## Introduction
This file provides the list of the TODOs related to the STF 569.
## SRV
### AMS
### APPSAQ
### APPSUB
### BWA
### DNS
### FAIS
### RLOC
### RNIS
### SAQ
### SRVSUB
### TIME
### TRAF
### TRANS
### UEAREASUB
### UEDISTLOOK
### UEDISTSUB
### UEINFLOOK
### UEINFSUB
### UELOC
Draft ETSI GS MEC 013 V2.0.3 (2018-10)
https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
TP_MEC_SRV_UELOC_001_OK <span style="color:green">Done</span>
TC_MEC_SRV_UELOC_001_BR <span style="color:yellow">To be tested</span>
TC_MEC_SRV_UELOC_001_NF <span style="color:yellow">To be tested</span>
### UELOCSUB
### UETAG
### UETRACKSUB
### UeIdentity
......@@ -102,9 +102,9 @@ RUN cd /home/etsi/frameworks \
&& make && make install
RUN cd /home/etsi/frameworks \
&& wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
&& tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
&& rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \
&& wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/photon/R/eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz' \
&& tar -zxvf ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
&& rm -f ./eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz \
&& cd /home/etsi/dev/STF569_Mec \
&& cd /home/etsi/dev/STF569_Mec/ttcn \
&& git clone https://forge.etsi.org/gitlab/LIBS/LibSip.git ./LibSip \
......
......@@ -34,14 +34,14 @@ module AtsMec_LocationAPI_TestCases {
import from LibMec_Pics all;
import from LibMec_Pixits all;
group location {
group ueLocationLookup {
/**
* @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/UeLocation/PlatUeLocation.tplan2
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
*/
testcase TC_MEC_PLAT_LOC_001_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_UELOC_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
......@@ -63,7 +63,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")),
v_headers
)
)
......@@ -96,9 +96,117 @@ module AtsMec_LocationAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_PLAT_LOC_001_OK
} // End of testcase TC_MEC_SRV_UELOC_001_OK
/**
* @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/SRV/UELOC/PlatUeLocationLookup.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
*/
testcase TC_MEC_SRV_UELOC_001_BR() 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_LOCATION_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(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?areaId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), // areaId instead of zoneId
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
)) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_UELOC_001_BR
/**
* @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/SRV/UELOC/PlatUeLocationLookup.tplan2
* @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo
*/
testcase TC_MEC_SRV_UELOC_001_NF() 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_LOCATION_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(
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID_UNKNOWN, "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
)) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a 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_SRV_UELOC_001_NF
} // End of group location
} // End of group ueLocationLookup
group subscription {
......@@ -129,7 +237,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_APP_Q_USERS_SUB_URI,
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI,
v_headers,
m_http_message_body_json(
m_body_json_user_tracking_subscription(
......@@ -197,7 +305,7 @@ module AtsMec_LocationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_APP_Q_USERS_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
"/" & PICS_ROOT_API & PX_ME_APP_Q_USERS_SUB_URI & "/" & PX_SUBSCRIPTION_ID, // TODO Shall be extract from Subscription request
v_headers
)
)
......
......@@ -24,7 +24,9 @@ module AtsMec_TestControl {
if (PICS_MEC_PLAT) {
if (PICS_LOCATION_API_SUPPORTED) {
execute(TC_MEC_PLAT_LOC_001_OK());
execute(TC_MEC_SRV_UELOC_001_OK());
execute(TC_MEC_SRV_UELOC_001_BR());
execute(TC_MEC_SRV_UELOC_001_NF());
execute(TC_MEC_PLAT_INFLOOK_001_OK());
execute(TC_MEC_PLAT_LOCSUB_001_OK());
execute(TC_MEC_PLAT_LOCSUB_002_OK());
......
......@@ -276,7 +276,7 @@ module AtsMec_UEidentityAPI_TestCases {
mw_problem_details(
-, -, 400
)))))) -> value v_response {
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......
......@@ -16,6 +16,8 @@ module LocationAPI_Pixits {
modulepar ZoneId PX_ZONE_ID := "zone01";
modulepar ZoneId PX_ZONE_ID_UNKNOWN := "zone51";
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 };
......
......@@ -3,6 +3,6 @@ module RnisAPI_Pics {
/**
* @desc Does the IUT support all subscriptions?
*/
modulepar boolean PICS_RNIS_ALL_SUBSCRIPTIONS := true;
// modulepar boolean PICS_RNIS_ALL_SUBSCRIPTIONS := true;
} // End of module RnisAPI_Pics
......@@ -10,24 +10,26 @@ module LibMec_Pics {
*/
modulepar boolean PICS_RNIS := false;
modulepar boolean PIC_MEC_SYSTEM := false;
modulepar boolean PICS_MEC_SYSTEM := false;
modulepar boolean PIC_SERVICES := false;
modulepar boolean PICS_SERVICES := false;
modulepar boolean PIC_NOTIFICATIONS := false;
modulepar boolean PICS_NOTIFICATIONS := false;
modulepar boolean PIC_APP_PACKAGE := false;
modulepar boolean PICS_APP_PACKAGE := false;
modulepar boolean PIC_APP_PACKAGE_MANAGEMENT := false;
modulepar boolean PICS_APP_PACKAGE_MANAGEMENT := false;
modulepar boolean PIC_APP_PACKAGE_NOTIFICATIONS := false;
modulepar boolean PICS_APP_PACKAGE_NOTIFICATIONS := false;
modulepar boolean PIC_RNIS_QUERY := false;
modulepar boolean PICS_RNIS_QUERY := false;
modulepar boolean PIC_RNIS_ALL_SUBSCRIPTIONS := false;
modulepar boolean PICS_RNIS_ALL_SUBSCRIPTIONS := false;
modulepar boolean PIC_RNIS_SPECIFIC_SUBSCRIPTION := false;
modulepar boolean PICS_RNIS_SPECIFIC_SUBSCRIPTION := false;
modulepar boolean PIC_RNIS_NOTIFICATIONS := false;
modulepar boolean PICS_RNIS_NOTIFICATIONS := false;
modulepar charstring PICS_ROOT_API := "exampleAPI";
} // End of module LibMec_Pics
module LibMec_Pixits {
modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/exampleAPI/location/v2/zones";
modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/zones";
modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/exampleAPI/location/v2/users";
modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/users";
modulepar charstring PX_ME_APP_Q_DIST_URI := "/exampleAPI/location/v2/subscriptions/distance";
modulepar charstring PX_ME_APP_Q_DIST_URI := "/location/v2/subscriptions/distance";
modulepar charstring PX_ME_APP_Q_USERS_SUB_URI := "/exampleAPI/location/v2/subscriptions/userTracking";
modulepar charstring PX_ME_APP_Q_USERS_SUB_URI := "/location/v2/subscriptions/userTracking";
modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/exampleAPI/ui/v2/";
modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v2/";
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/exampleAPI/rni/v2/subscriptions/";
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions/";
modulepar charstring PX_ME_BWM_URI := "/exampleAPI/bwm/v2/bw_allocations";
modulepar charstring PX_ME_BWM_URI := "/bwm/v2/bw_allocations";
} // End of module LibMec_Pixits
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment