Commits (2)
[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;
LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39"
LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibHttp_Pics.PICS_USE_TOKEN_HEADER := true
#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken"
LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application'
# LibMec_Pixits
[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/AtsMec/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
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=192.168.1.39,port=30030,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)"
#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,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
[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
[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;
LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"192.168.1.39"
LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibHttp_Pics.PICS_USE_TOKEN_HEADER := true
#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken"
LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application'
# LibMec_Pixits
[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/AtsMec/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
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=192.168.1.39,port=30030,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)"
#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,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
[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
......@@ -7,7 +7,7 @@
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.1.1 (2020-06)
* @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06)
*/
module AtsMec_TrafficManagementAPI_TestCases {
......@@ -42,692 +42,387 @@ module AtsMec_TrafficManagementAPI_TestCases {
group me_app_role {
/**
* @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none
*/
testcase TC_MEC_MEC015_SRV_TM_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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(
PX_ME_BWM_URI,
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_bw_info_list
)))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***");
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_MEC015_SRV_TM_001_OK
/**
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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(
PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_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_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***");
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_MEC015_SRV_TM_002_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/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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(
PX_ME_BWM_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter
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_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
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_MEC015_SRV_TM_002_BR
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_002_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
testcase TC_MEC_MEC015_SRV_TM_001_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI,
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_bw_info_list
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// 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(
PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_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_problem_details(
mw_problem_details(
-, -, 404
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
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_MEC015_SRV_TM_002_NF
/**
* @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_003_OK_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
// 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_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_bw_allocation_id;
f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***");
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_MEC015_SRV_TM_003_OK_01
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK
/**
* @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_TM_003_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
testcase TC_MEC_MEC015_SRV_TM_001_OK_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "?app_instance_id=" & PX_APP_INSTANCE_ID,
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_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// 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_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
SESSION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
//{ m_session_filter("10.10.10.10", 1010) }
)
)
)
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id,
SESSION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
//{ mw_session_filter }
)))))) -> value v_response {
tc_ac.stop;
if (f_check_headers(valueof(v_response.response.header)) == false) {
log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_bw_allocation_id;
f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***");
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_MEC015_SRV_TM_003_OK_02
/**
* @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/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_003_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
// 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_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"Invalid", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
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_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
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_MEC015_SRV_TM_003_BR_01
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_02
/**
* @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/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name
*/
testcase TC_MEC_MEC015_SRV_TM_003_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
testcase TC_MEC_MEC015_SRV_TM_001_OK_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "?app_name=" & PX_APP_NAME,
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_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
PX_APP_NAME
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// 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_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
//{ m_session_filter("10.10.10.10", 1010) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit
)
)
)
)
)
);
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_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
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_MEC015_SRV_TM_003_BR_02
/**
* @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/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_003_BR_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
// 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_post(
PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
SESSION_SPECIFIC_BW_ALLOCATION, // Request type
"1024", // FixedAllocation
Downlink // AllocationDirection
// MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be present
)
)
)
)
)
);
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_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
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_MEC015_SRV_TM_003_BR_03
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_03
/**
* @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id
*/
testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
testcase TC_MEC_MEC015_SRV_TM_001_OK_04() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "?session_id=" & PX_APP_ALLOCATION_ID,
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_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
PX_APP_NAME,
PX_APP_ALLOCATION_ID
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers
)
)
);
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
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_MEC015_SRV_TM_004_OK
[] 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_MEC015_SRV_TM_001_OK_04
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_001_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "?appInstId=" & PX_APP_INSTANCE_ID,
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_001_BR
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id
*/
testcase TC_MEC_MEC015_SRV_TM_001_NF_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "?app_instance_id=" & PX_UNKNOWN_APP_INSTANCE_ID,
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_001_NF_01
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name
*/
testcase TC_MEC_MEC015_SRV_TM_001_NF_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "?app_name=" & PX_UNKNOWN_APP_NAME,
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_001_NF_02
/**
* @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id
*/
testcase TC_MEC_MEC015_SRV_TM_001_NF_03() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -743,30 +438,24 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_get(
PX_ME_BWM_URI & "/Unknown_bw_allocation_id",
PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_UNKNOWN_APP_ALLOCATION_ID,
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_problem_details(
mw_problem_details(
-, -, 404
)))))) {
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -777,20 +466,586 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_NF
} // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_03
/**
* @desc Check that the IUT acknowledges a creation of a bandwidthAllocation resource
*/
testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_post(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
"1024",
Downlink,
PX_APP_NAME,
PX_APP_ALLOCATION_ID
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
PX_APP_NAME,
PX_APP_ALLOCATION_ID
)))))) -> value v_response {
tc_ac.stop;
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_bw_allocation_id := regexp(
v_header_location[0],
"?+" & PX_ME_BWM_URI & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, CreationID: ", v_bw_allocation_id," ***");
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_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_002_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
*/
testcase TC_MEC_MEC015_SRV_TM_002_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_post(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
"1024",
Downlink,
PX_APP_NAME,
PX_APP_ALLOCATION_ID,
{ m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_002_BR_01
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
*/
testcase TC_MEC_MEC015_SRV_TM_002_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_post(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")),
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
SESSION_SPECIFIC_BW_ALLOCATION,
"1024",
Downlink,
PX_APP_NAME,
PX_APP_ALLOCATION_ID,
- // Session shall be present
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_002_BR_02
/**
* @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
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_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
-, -, -,
v_bw_allocation_id
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct BwInfo ***");
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_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_003_OK
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_003_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_003_NF
/**
* @desc Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***");
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_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
*/
testcase TC_MEC_MEC015_SRV_TM_004_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
v_bw_info.sessionFilter := { valueof(m_session_filter("10.10.10.10", 1010)) }; // FIXME Use PIXITs
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
v_bw_info
)))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_01
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
*/
testcase TC_MEC_MEC015_SRV_TM_004_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
v_bw_info.requestType := SESSION_SPECIFIC_BW_ALLOCATION;
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
v_bw_info
)))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_02
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
"2048", // FixedAllocation
Downlink
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC015_SRV_TM_004_NF
/**
* @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -805,33 +1060,24 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
m_http_request_patch(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
......@@ -840,15 +1086,14 @@ module AtsMec_TrafficManagementAPI_TestCases {
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id,
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
"5096", // FixedAllocation
Downlink // AllocationDirection
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -858,20 +1103,18 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_005_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/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
*/
testcase TC_MEC_MEC015_SRV_TM_005_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_005_BR_01() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -886,33 +1129,26 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"Invalid", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
m_http_request_patch(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION,
v_bw_info.allocationId,
{ m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
......@@ -922,81 +1158,10 @@ module AtsMec_TrafficManagementAPI_TestCases {
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
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_MEC015_SRV_TM_005_BR
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
*/
testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_put(
PX_ME_BWM_URI & "/InvalidAllocationId",
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
m_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"2048", // FixedAllocation
Downlink // AllocationDirection
)
)
)
)
)
);
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 404
)))))) {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1006,21 +1171,18 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_005_NF
} // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_01
/**
* @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
*/
testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_005_BR_02() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1035,48 +1197,39 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_patch(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION // Request type
)
)
)
)
)
);
PX_APP_INSTANCE_ID,
SESSION_SPECIFIC_BW_ALLOCATION,
v_bw_info.allocationId
//{ m_session_filter("10.10.10.10", 1010) } sessionFilter shall be present
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_bw_info(
mw_bw_info(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type
"5096", // FixedAllocation
Downlink // AllocationDirection
)))))) -> value v_response {
mw_http_response_400_bad_request(
mw_http_message_body_json(
mw_body_json_problem_details(
mw_problem_details(
-, -, 400
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1086,20 +1239,16 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_006_OK
} // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_02
/**
* @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/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_006_BR() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1115,44 +1264,28 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
httpPort.send(
m_http_request(
m_http_request_patch(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION // Request type
)
)
)
)
)
);
PX_APP_INSTANCE_ID,
APPLICATION_SPECIFIC_BW_ALLOCATION
))))));
// 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_problem_details(
mw_problem_details(
-, -, 400
)))))) {
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id);
log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1163,19 +1296,16 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_006_BR
} // End of testcase TC_MEC_MEC015_SRV_TM_005_NF
/**
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1190,39 +1320,30 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
}
f_init_default_headers_list(-, -, v_headers);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
httpPort.send(
m_http_request(
m_http_request_patch(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers,
m_http_message_body_json(
m_body_json_bw_info_deltas(
m_bw_info_deltas(
v_app_instance_id,
APPLICATION_SPECIFIC_BW_ALLOCATION // Request type
)
)
)
)
m_http_request_delete(
PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id,
v_headers
)
)
);
// 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_problem_details(
mw_problem_details(
-, -, 404
)))))) {
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***");
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
......@@ -1233,19 +1354,16 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_006_NF
} // End of testcase TC_MEC_MEC015_SRV_TM_006_OK
/**
* @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2
* @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml
* @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
*/
testcase TC_MEC_MEC015_SRV_TM_007_OK() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var charstring v_bw_allocation_id;
var BwInfo v_bw_info;
var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005"));
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) {
......@@ -1260,29 +1378,25 @@ module AtsMec_TrafficManagementAPI_TestCases {
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info);
f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info);
if (v_bw_allocation_id == "") {
f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
} else {
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
}
// Test Body
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_BWM_URI & "/" & v_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID,
v_headers
)
)
);
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***");
......@@ -1295,8 +1409,9 @@ module AtsMec_TrafficManagementAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC015_SRV_TM_007_OK
} // End of testcase TC_MEC_MEC015_SRV_TM_006_NF
} // End of group me_app_role
......
......@@ -12,10 +12,34 @@ module AtsMec_TrafficManagementAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) {
execute(TC_MEC_MEC015_SRV_TM_001_OK());
execute(TC_MEC_MEC015_SRV_TM_001_OK_01());
execute(TC_MEC_MEC015_SRV_TM_001_OK_02());
execute(TC_MEC_MEC015_SRV_TM_001_OK_03());
execute(TC_MEC_MEC015_SRV_TM_001_OK_04());
execute(TC_MEC_MEC015_SRV_TM_001_BR());
execute(TC_MEC_MEC015_SRV_TM_001_NF_01());
execute(TC_MEC_MEC015_SRV_TM_001_NF_02());
execute(TC_MEC_MEC015_SRV_TM_001_NF_03());
execute(TC_MEC_MEC015_SRV_TM_002_OK());
execute(TC_MEC_MEC015_SRV_TM_002_BR());
execute(TC_MEC_MEC015_SRV_TM_002_NF());
execute(TC_MEC_MEC015_SRV_TM_002_BR_01());
execute(TC_MEC_MEC015_SRV_TM_002_BR_02());
execute(TC_MEC_MEC015_SRV_TM_003_OK());
execute(TC_MEC_MEC015_SRV_TM_003_NF());
execute(TC_MEC_MEC015_SRV_TM_004_OK());
execute(TC_MEC_MEC015_SRV_TM_004_BR_01());
execute(TC_MEC_MEC015_SRV_TM_004_BR_02());
execute(TC_MEC_MEC015_SRV_TM_004_NF());
execute(TC_MEC_MEC015_SRV_TM_005_OK());
execute(TC_MEC_MEC015_SRV_TM_005_BR_01());
execute(TC_MEC_MEC015_SRV_TM_005_BR_02());
execute(TC_MEC_MEC015_SRV_TM_005_NF());
execute(TC_MEC_MEC015_SRV_TM_006_OK());
execute(TC_MEC_MEC015_SRV_TM_006_NF());
}
} // End of 'control' statement
......
......@@ -455,7 +455,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "subscription_type=assoc_sta",
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
......@@ -770,7 +770,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "&filter=(eq,ap/macId,00:01:02:03:04:04)",
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
......@@ -1319,9 +1319,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/queries/measurements",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1332,7 +1330,7 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_wlan_measurement_config_link_list
)))) -> value v_response {
)))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of measurement config ***");
......@@ -1348,125 +1346,14 @@ module AtsMec_WlanInformationAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_012_OK
/**
* @desc Check that the IUT responds with the list of WLAN Access Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
/*testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/invalid_measurements",
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
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_MEC028_SRV_WAI_012_BR
/**
* @desc Check that the IUT responds with the list of WLAN Access Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_012_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/invalid_measurements",
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
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***");
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_MEC028_SRV_WAI_012_NF
/**
* @desc Check that the IUT responds with a new measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_013_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1485,7 +1372,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS,
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -1501,7 +1388,7 @@ module AtsMec_WlanInformationAPI_TestCases {
},
PX_MEASUREMENT_ID,
m_measurement_info(1000, 10)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1521,9 +1408,14 @@ module AtsMec_WlanInformationAPI_TestCases {
)},
PX_MEASUREMENT_ID,
mw_measurement_info
)))))) -> value v_response {
)))))) -> value v_response {
tc_ac.stop;
v_measurement_config_id := regexp(
oct2char(unichar2oct(v_response.response.body.json_body.measurementConfig.links.self_.href)),
"?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......@@ -1534,14 +1426,12 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_response.response.body.json_body.measurementConfig);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_013_OK
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_013_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1564,7 +1454,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS,
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -1580,7 +1470,7 @@ module AtsMec_WlanInformationAPI_TestCases {
},
PX_MEASUREMENT_ID,
m_measurement_info(1000, 10)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1589,7 +1479,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***");
......@@ -1605,83 +1495,14 @@ module AtsMec_WlanInformationAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_013_BR
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
/*testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/Invalid_measurements",
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
m_measurement_config(
-,
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
-,
PX_IP_ADDRESS
)
},
PX_MEASUREMENT_ID,
m_measurement_info(1000, 10)
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***");
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_MEC028_SRV_WAI_013_NF
/**
* @desc Check that the IUT responds with the specified measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_014_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1696,16 +1517,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href,
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & v_measurement_config_id,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1728,7 +1547,7 @@ module AtsMec_WlanInformationAPI_TestCases {
},
PX_MEASUREMENT_ID,
mw_measurement_info
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -1741,19 +1560,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_response.response.body.json_body.measurementConfig);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_014_OK
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_014_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1768,16 +1586,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href & "_Invalid",
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & v_measurement_config_id & "_Invalid",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1786,7 +1602,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***");
......@@ -1799,20 +1615,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_measurement_config);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_014_NF
/**
* @desc Check that the IUT responds with the modified measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_015_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1827,12 +1641,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href,
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id,
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -1848,7 +1662,7 @@ module AtsMec_WlanInformationAPI_TestCases {
},
PX_MEASUREMENT_ID,
m_measurement_info(2000, 20)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1869,7 +1683,7 @@ module AtsMec_WlanInformationAPI_TestCases {
)},
PX_MEASUREMENT_ID,
mw_measurement_info(2000, 20)
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -1882,19 +1696,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_response.response.body.json_body.measurementConfig);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_015_OK
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_015_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1909,12 +1722,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_Invalid",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_Invalid",
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -1930,7 +1743,7 @@ module AtsMec_WlanInformationAPI_TestCases {
},
PX_MEASUREMENT_ID,
m_measurement_info(2000, 20)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1939,7 +1752,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -1952,19 +1765,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_measurement_config);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_015_NF
/**
* @desc Check that the IUT responds with with 204 when requested to delete the specified measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_016_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1979,14 +1791,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href,
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id,
v_headers
)));
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1995,7 +1807,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -2013,13 +1825,12 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_016_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -2034,14 +1845,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_invalid",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_invalid",
v_headers
)));
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -2050,7 +1861,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
......@@ -2063,7 +1874,7 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_measurement_config);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_016_NF
......
......@@ -40,6 +40,20 @@ module AtsMec_WlanInformationAPI_TestControl {
execute(TC_MEC_MEC028_SRV_WAI_010_NF());
execute(TC_MEC_MEC028_SRV_WAI_011_OK());
execute(TC_MEC_MEC028_SRV_WAI_012_OK());
execute(TC_MEC_MEC028_SRV_WAI_013_OK());
execute(TC_MEC_MEC028_SRV_WAI_013_BR());
execute(TC_MEC_MEC028_SRV_WAI_014_OK());
execute(TC_MEC_MEC028_SRV_WAI_014_NF());
execute(TC_MEC_MEC028_SRV_WAI_015_OK());
execute(TC_MEC_MEC028_SRV_WAI_015_NF());
execute(TC_MEC_MEC028_SRV_WAI_016_OK());
execute(TC_MEC_MEC028_SRV_WAI_016_NF());
}
} // End of 'control' statement
......
......@@ -40,7 +40,7 @@ module TrafficManagementAPI_Functions {
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
PICS_ROOT_API & PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
......@@ -60,16 +60,18 @@ module TrafficManagementAPI_Functions {
mw_bw_info(
p_app_instance_id
)))))) -> value v_response {
var charstring_list v_bw_allocation_id;
var charstring_list v_header_location;
tc_ac.stop;
log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response);
f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
if (lengthof(v_bw_allocation_id) != 0) {
p_bw_allocation_id := v_bw_allocation_id[0];
p_bw_info := v_response.response.body.json_body.bwInfo;
}
f_get_header(valueof(v_response.response.header), "Location", v_header_location);
p_bw_allocation_id := regexp(
v_header_location[0],
"?+" & PX_ME_BWM_URI & "/(?*)",
0
);
p_bw_info := v_response.response.body.json_body.bwInfo;
}
[] tc_ac.timeout {
log("f_create_bw_allocation_resource: Expected message not received");
......@@ -87,7 +89,7 @@ module TrafficManagementAPI_Functions {
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_BWM_URI & "/" & p_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & p_bw_allocation_id,
v_headers
)));
tc_ac.start;
......
module TrafficManagementAPI_Pixits {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
......@@ -8,9 +11,19 @@ module TrafficManagementAPI_Pixits {
// LibMec/LocationAPI
import from LocationAPI_TypesAndValues all;
modulepar Address PX_APP_INSTANCE_ID := "appInst01";
modulepar Json.String PX_APP_INSTANCE_ID := "appInst01";
modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01";
modulepar Json.String PX_APP_NAME := "appName01";
modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99";
modulepar Json.String PX_UNKNOWN_APP_NAME := "appName99";
modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99";
modulepar Address PX_UNKNOWN_APP_INSTANCE_ID := "appInst99";
modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99";
modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1";
......
......@@ -18,6 +18,7 @@ module TrafficManagementAPI_Templates {
in BwRequestType p_requestType,
in FixedAllocation p_fixedAllocation,
in AllocationDirection p_allocationDirection,
in template (omit) Json.String p_appName := omit,
in template (omit) AllocationId p_allocationId := omit,
in template (omit) SessionFilter p_sessionFilter := omit,
in template (omit) FixedBWPriority p_fixedBWPriority := omit
......@@ -25,6 +26,7 @@ module TrafficManagementAPI_Templates {
allocationId := p_allocationId,
timeStamp := omit,
appInsId := p_appInsId,
appName := p_appName,
requestType := p_requestType,
sessionFilter := p_sessionFilter,
fixedBWPriority := p_fixedBWPriority,
......@@ -37,6 +39,7 @@ module TrafficManagementAPI_Templates {
template (present) BwRequestType p_requestType := ?,
template (present) FixedAllocation p_fixedAllocation := ?,
template (present) AllocationDirection p_allocationDirection := ?,
template Json.String p_appName := *,
template AllocationId p_allocationId := *,
template SessionFilter p_sessionFilter := *,
template FixedBWPriority p_fixedBWPriority := *
......@@ -44,6 +47,7 @@ module TrafficManagementAPI_Templates {
allocationId := p_allocationId,
timeStamp := *,
appInsId := p_appInsId,
appName := p_appName,
requestType := p_requestType,
sessionFilter := p_sessionFilter,
fixedBWPriority := p_fixedBWPriority,
......
......@@ -21,7 +21,8 @@ module TrafficManagementAPI_TypesAndValues {
type record BwInfo {
AllocationId allocationId optional,
TimeStamp timeStamp optional,
AppInsId appInsId,
AppInsId appInsId optional,
Json.String appName,
BwRequestType requestType,
SessionFilter sessionFilter optional,
FixedBWPriority fixedBWPriority optional,
......
......@@ -129,7 +129,8 @@ module WlanInformationAPI_Functions {
} // End of function f_delete_assoc_sta_subscription
function f_create_measurement_config(
out MeasurementConfig p_measurement_config
out MeasurementConfig p_measurement_config,
out Json.String p_measurement_config_id
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
......@@ -138,7 +139,7 @@ module WlanInformationAPI_Functions {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS,
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -169,7 +170,13 @@ module WlanInformationAPI_Functions {
tc_ac.stop;
p_measurement_config := v_response.response.body.json_body.measurementConfig;
p_measurement_config_id := regexp(
oct2char(unichar2oct(p_measurement_config.links.self_.href)),
"?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)",
0
);
log("f_create_measurement_config: INFO: IUT successfully responds to the subscription: ", p_measurement_config);
log("f_create_measurement_config: INFO: p_measurement_config_id = ", p_measurement_config_id);
}
[] tc_ac.timeout {
log("f_create_measurement_config: INCONC: Expected message not received");
......@@ -179,21 +186,15 @@ module WlanInformationAPI_Functions {
} // End of function "f_create_measurement_config
function f_delete_measurement_config(
in MeasurementConfig p_measurement_config
in Json.String p_measurement_config_id
) runs on HttpComponent {
var Headers v_headers;
var charstring v_uri := regexp(
oct2char(unichar2oct(p_measurement_config.links.self_.href)),
"?+(" & PX_ME_WLAN_URI & "?*)",
0
);
log("====> v_uri: ", v_uri);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & v_uri,
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & p_measurement_config_id,
v_headers
)));
......
......@@ -34,6 +34,8 @@ module LibMec_Pixits {
modulepar charstring PX_ME_WLAN_URI_SUB := "wai/v2/subscriptions";
modulepar charstring PX_ME_WLAN_URI_MEAS := "wai/v2/measurements";
modulepar charstring PX_ME_V2X_URI := "vis/v1";
modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries";
......