......@@ -3,7 +3,7 @@
Documentation
... A test suite for validating Transport (TRANS) operations.
Resource ../../GenericKeywords.robot
Resource ../../../GenericKeywords.robot
Resource environment/variables.txt
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
......@@ -13,12 +13,12 @@ Default Tags TC_MEC_SRV_TRANS
*** Test Cases ***
TC_MEC_SRV_TRANS_001_OK
TP_MEC_MEC011_SRV_TRANS_001_OK
[Documentation]
... Check that the IUT responds with a list of available transports
... when queried by a MEC Application
...
... Reference ETSI GS MEC 011 V2.1.1, clause 8.2.5.3.1
... Reference ETSI GS MEC 011 V2.2.1, clause 8.2.5.3.1
... OpenAPI https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/TransportInfo
[Tags] PIC_MEC_PLAT PIC_SERVICES
......@@ -30,6 +30,7 @@ TC_MEC_SRV_TRANS_001_OK
Get list of available transports
Set Headers {"Accept":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Type":"*/*"}
Get ${apiRoot}/${apiName}/${apiVersion}/transports
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
*** Variables ***
# Generic variables
${SCHEMA} http
${HOST} 10.192.2.172
${HOST} 127.0.0.1
${PORT} 8081
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
......
......@@ -3,26 +3,28 @@
*** Settings ***
Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Resource resources/RadioNetworkInformationAPI.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
Library BuiltIn
Library OperatingSystem
Library MockServerLibrary
Suite Setup Create Mock Session ${callback_uri}:${callback_port}
Test Teardown Reset All Requests
*** Test Cases ***
Cell change notification
[Documentation] TC_MEC_SRV_RNIS_001_OK
TC_MEC_MEC012_SRV_RNIS_001_OK
[Documentation] Cell change notification
... Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.2
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/CellChangeNotification.schema.json
Log Creating mock request and response to handle Cell change notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/cell_change body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=&{appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -31,16 +33,17 @@ Cell change notification
Clear Requests ${callback_endpoint}
RAB Establishment notification
[Documentation] TC_MEC_SRV_RNIS_002_OK
TC_MEC_MEC012_SRV_RNIS_002_OK
[Documentation] RAB Establishment notification
... Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.3
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/RabEstNotification.schema.json
Log Creating mock request and response to handle RAB establishment notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/rab_est body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/rab_est body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -49,16 +52,17 @@ RAB Establishment notification
Clear Requests ${callback_endpoint}
RAB modification notification
[Documentation] TC_MEC_SRV_RNIS_003_OK
TC_MEC_MEC012_SRV_RNIS_003_OK
[Documentation] RAB modification notification
... Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.4
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/RabModNotification.schema.json
Log Creating mock request and response to handle RAB modification notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/rab_mod body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/rab_mod body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -67,16 +71,17 @@ RAB modification notification
Clear Requests ${callback_endpoint}
RAB release notification
[Documentation] TC_MEC_SRV_RNIS_004_OK
TC_MEC_MEC012_SRV_RNIS_004_OK
[Documentation] RAB release notification
... Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.5
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/RabRelNotification.schema.json
Log Creating mock request and response to handle RAB release notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/rab_rel body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/rab_rel body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -85,16 +90,17 @@ RAB release notification
Clear Requests ${callback_endpoint}
UE measurement notification
[Documentation] TC_MEC_SRV_RNIS_005_OK
TC_MEC_MEC012_SRV_RNIS_005_OK
[Documentation] UE measurement notification
... Check that the RNIS service sends an RNIS notification about UE measurement report if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.6
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/MeasRepUeNotification.schema.json
Log Creating mock request and response to handle UE measurement notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/MeasRepUeNotification body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/MeasRepUeNotification body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -103,16 +109,17 @@ UE measurement notification
Clear Requests ${callback_endpoint}
UE timing advance notification
[Documentation] TC_MEC_SRV_RNIS_006_OK
TC_MEC_MEC012_SRV_RNIS_006_OK
[Documentation] UE timing advance notification
... Check that the RNIS service sends an RNIS notification about UE timing advance if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.7
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/MeasTaSubscription.schema.json
Log Creating mock request and response to handle UE timing advance notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/MeasTaNotification body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/MeasTaNotification body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -121,16 +128,17 @@ UE timing advance notification
Clear Requests ${callback_endpoint}
UE carrier aggregation reconfiguration notification
[Documentation] TC_MEC_SRV_RNIS_007_OK
TC_MEC_MEC012_SRV_RNIS_007_OK
[Documentation] UE carrier aggregation reconfiguration notification
... Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.8
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/CaReconfSubscription.schema.json
Log Creating mock request and response to handle UE carrier aggregation reconfiguration notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/CaReconfSubscription body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/CaReconfSubscription body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -139,16 +147,17 @@ UE carrier aggregation reconfiguration notification
Clear Requests ${callback_endpoint}
S1-U bearer notification
[Documentation] TC_MEC_SRV_RNIS_008_OK
TC_MEC_MEC012_SRV_RNIS_008_OK
[Documentation] S1-U bearer notification
... Check that the RNIS service sends an RNIS notification about S1-U bearer if the RNIS service has an associated subscription and the event is generated
... ETSI GS MEC 012 2.1.1, clause 6.4.9
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/S1BearerSubscription.schema.json
Log Creating mock request and response to handle S1-U bearer notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/S1BearerSubscription body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/S1BearerSubscription body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=${appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -165,8 +174,9 @@ TC_MEC_SRV_RNIS_009_OK
Should Be True ${PIC_RNIS_NOTIFICATIONS} == 1
${json}= Get File schemas/NrMeasRepUeSubscription.schema.json
Log Creating mock request and response to handle UE Measurement notification
&{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint}/meas_rep_ue body_type="JSON_SCHEMA" body=${json}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
&{req}= Create Mock Request Matcher POST ${callback_endpoint}/meas_rep_ue body_type="JSON_SCHEMA" body=${json}
&{appjson_hdrs}= Create Dictionary Content-type=application/json
&{rsp}= Create Mock Response headers=&{appjson_hdrs} status_code=204
Create Mock Expectation ${req} ${rsp}
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
Log Verifying results
......@@ -184,7 +194,8 @@ TC_MEC_SRV_RNIS_009_OK
# ${json}= Get File schemas/RadioNetworkInformationAPI.schema.json
# Log Creating mock request and response to handle UE Measurement notification
# &{req}= Create Mock Request Matcher POST ${callback_uri}${callback_endpoint} body_type="JSON_SCHEMA" body=${json}
# &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
#&{appjson_hdrs}= Create Dictionary Content-type=application/json
# &{rsp}= Create Mock Response &{appjson_hdrs} status_code=204
# Create Mock Expectation ${req} ${rsp}
# Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${req}
# Log Verifying results
......
......@@ -3,93 +3,94 @@
*** Settings ***
Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Resource resources/RadioNetworkInformationAPI.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
*** Test Cases ***
Request RabInfo info using wrong parameters
[Documentation] TC_MEC_SRV_RNIS_016_BR
TC_MEC_MEC012_SRV_RNIS_016_BR
[Documentation] Request RabInfo info using wrong parameters
... Check that the RNIS service returns an error when the RAB information is requested with a malformatted message
... ETSI GS MEC 012 2.1.1, clause 7.3.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo
Get RabInfo info using wrong parameters
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 400
Request RabInfo info using non existing cell id
[Documentation] TC_MEC_SRV_RNIS_016_BR
TC_MEC_MEC012_SRV_RNIS_016_NF
[Documentation] Request RabInfo info using non existing cell id
... Check that the RNIS service returns an error when the RAB information for a not existing element is requested
... ETSI GS MEC 012 2.1.1, clause 7.3.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo
Get RabInfo info using non existing cell id
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
Check HTTP Response Status Code Is 200
# TODO Check the returned list is empty
# Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 404
Request Plmn info using wrong parameters
[Documentation] TC_MEC_SRV_RNIS_017_BR
TC_MEC_MEC012_SRV_RNIS_017_BR
[Documentation] Request Plmn info using wrong parameters
... Check that the RNIS service returns an error when the PLMN information is requested with a malformatted message
... ETSI GS MEC 012 2.1.1, clause 7.4.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/PlmnInfo
Get PLMN info using wrong parameters
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 400
Request Plmn info using non existing application id
[Documentation] TC_MEC_SRV_RNIS_017_NF
TC_MEC_MEC012_SRV_RNIS_017_NF
[Documentation] Request Plmn info using non existing application id
... Check that the RNIS service returns an error when the PLMN information for a not existing element is requested
... ETSI GS MEC 012 2.1.1, clause 7.4.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/PlmnInfo
Get PLMN info using non existing application id
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
Check HTTP Response Status Code Is 200
# TODO Check the returned list is empty
# Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 404
Request S1Bearer info using wrong parameters
[Documentation] TC_MEC_SRV_RNIS_018_BR
TC_MEC_MEC012_SRV_RNIS_018_BR
[Documentation] Request S1Bearer info using wrong parameters
... Check that the RNIS service returns an error when the S1 bearer information is requested with a malformatted message
... ETSI GS MEC 012 2.1.1, clause 7.5.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
Get S1Bearer info using wrong parameters
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 400
Request S1Bearer info using non existing cell id
[Documentation] TC_MEC_SRV_RNIS_018_BR
TC_MEC_MEC012_SRV_RNIS_018_NF
[Documentation] Request S1Bearer info using non existing cell id
... Check that the RNIS service returns an error when the S1 bearer information is requested with a malformatted message
... ETSI GS MEC 012 2.1.1, clause 7.5.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
Get S1Bearer info using non existing cell id
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
Check HTTP Response Status Code Is 200
# TODO Check the returned list is empty
#Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 404
Request L2Meas info using wrong parameters
[Documentation] TC_MEC_SRV_RNIS_019_BR
TC_MEC_MEC012_SRV_RNIS_019_BR
[Documentation] Request L2Meas info using wrong parameters
... Check that the RNIS service returns an error when the L2 measurements information is requested with a malformatted message
... ETSI GS MEC 012 2.1.1, clause 7.5a.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
Get L2Meas info using wrong parameters
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
Run Keyword If ${PIC_PROBLEM_DETAILS_ON_4xx} == 1 Check ProblemDetails 400
Request L2Meas info using non existing cell id
[Documentation] TC_MEC_SRV_RNIS_019_BR
TC_MEC_MEC012_SRV_RNIS_019_NF
[Documentation] Request L2Meas info using non existing cell id
... Check that the RNIS service returns an error when the L2 measurements information for a not existing element is requested
... ETSI GS MEC 012 2.1.1, clause 7.5a.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
Get L2Meas info using non existing cell id
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
Check HTTP Response Status Code Is 200
# TODO Check the returned list is empty
*** Keywords ***
Get RabInfo info using wrong parameters
......@@ -98,7 +99,7 @@ Get RabInfo info using wrong parameters
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/rni/v2/queries/rab_info?c_id=${C_ID}
Get ${apiRoot}/rni/${apiVersion}/queries/rab_info?c_id=${C_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -108,7 +109,7 @@ Get RabInfo info using non existing cell id
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/rni/v2/queries/rab_info?cell_id=${NOT_EXISTENT_CELL_ID}
Get ${apiRoot}/rni/${apiVersion}/queries/rab_info?cell_id=${NOT_EXISTENT_CELL_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -119,7 +120,7 @@ Get Plmn info using wrong parameters
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/rni/v2/queries/plmn_info?app_id=${APP_ID}
Get ${apiRoot}/rni/${apiVersion}/queries/plmn_info?app_id=${APP_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -130,7 +131,7 @@ Get Plmn info using non existing application id
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/rni/v2/queries/plmn_info?app_ins_id=${NOT_EXISTENT_APP_INS_ID}
Get ${apiRoot}/rni/${apiVersion}/queries/plmn_info?app_ins_id=${NOT_EXISTENT_APP_INS_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -141,7 +142,7 @@ Get S1Bearer info using wrong parameters
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/rni/v2/queries/s1_bearer_info?c_id=${C_ID}
Get ${apiRoot}/rni/${apiVersion}/queries/s1_bearer_info?c_id=${C_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
......
......@@ -3,38 +3,38 @@
*** Settings ***
Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Resource resources/RadioNetworkInformationAPI.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
*** Test Cases ***
Request RabInfo info
[Documentation] TC_MEC_SRV_RNIS_016_OK
TC_MEC_MEC012_SRV_RNIS_016_OK
[Documentation] Request RabInfo info
... Check that the RNIS service returns the RAB information when requested
... ETSI GS MEC 012 2.1.1, clause 7.3.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/RabInfo
Get RabInfo info
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is RabInfos
Check HTTP Response Body Json Schema Is RabInfo
Check RabInfo ${response['body']}
Request Plmn info
[Documentation] TC_MEC_SRV_RNIS_017_OK
TC_MEC_MEC012_SRV_RNIS_017_OK
[Documentation] Request Plmn info
... Check that the RNIS service returns the PLMN information when requested
... ETSI GS MEC 012 2.1.1, clause 7.4.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/PlmnInfo
Get PLMN info
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is PlmnInfos
Check PlmnInfo ${response['body']}
Check PlmnInfo ${response['body'][0]}
Request S1Bearer info
[Documentation] TC_MEC_SRV_RNIS_018_OK
TC_MEC_MEC012_SRV_RNIS_018_OK
[Documentation] Request S1Bearer info
... Check that the RNIS service returns the S1 bearer information
... ETSI GS MEC 012 2.1.1, clause 7.5.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/S1BearerInfo
......@@ -43,15 +43,16 @@ Request S1Bearer info
Check HTTP Response Body Json Schema Is S1BearerInfos
#log ${response['body']}
Check S1BearerInfo ${response['body']}
Request L2Meas info
[Documentation] TC_MEC_SRV_RNIS_019_OK
TC_MEC_MEC012_SRV_RNIS_019_OK
[Documentation] Request L2Meas info
... Check that the RNIS service returns the L2 measurements information
... ETSI GS MEC 012 2.1.1, clause 7.5a.3.1
... Reference https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/L2Meas
Get Layer2Meas Info
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is Layer2MeasInfos
Check HTTP Response Body Json Schema Is L2Meas
Check L2MeasInfo ${response['body']}
......
......@@ -3,16 +3,14 @@
*** Settings ***
Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Resource resources/RadioNetworkInformationAPI.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
*** Test Cases ***
Request RNIS subscription list using bad parameters
[Documentation] TC_MEC_SRV_RNIS_011_BR
TC_MEC_MEC012_SRV_RNIS_011_BR
[Documentation] Request RNIS subscription list using bad parameters
... Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type
... ETSI GS MEC 012 2.1.1, clause 7.6.3.1
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml#/definitions/SubscriptionLinkList
......@@ -20,15 +18,14 @@ Request RNIS subscription list using bad parameters
Check HTTP Response Status Code Is 400
Create RNIS subscription using bad parameters
[Documentation] TC_MEC_SRV_RNIS_012_BR
TC_MEC_MEC012_SRV_RNIS_012_BR
[Documentation] Create RNIS subscription using bad parameters
... Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format
... ETSI GS MEC 012 2.1.1, clause 7.6.3.4
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": "CelCangeSubscription", "callbackReference": "${HREF}", "_links": {"self": "${LINKS_SELF}"}, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}}
Post RNIS subscription request {"CellChangeSubscription": {"subscriptionType": "CelCangeSubscription", "callbackReference": "${HREF}", "_links": {"self": { "href": "${LINKS_SELF}" } }, "filterCriteria": {"appInsId": "01", "associateId": [{"type": "UE_IPV4_ADDRESS", "value": 1}], "plmn": {"mcc": "01", "mnc": "001"}, "cellId": ["800000"], "hoStatus": "COMPLETED"}, "expiryDeadline": {"seconds": 1577836800, "nanoSeconds": 0}}}
Check HTTP Response Status Code Is 400
*** Keywords ***
Get RNIS subscription list with wrong parameter
Should Be True ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1
......
......@@ -4,57 +4,59 @@
*** Settings ***
Library OperatingSystem
Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Resource ../../../GenericKeywords.robot
Resource resources/RadioNetworkInformationAPI.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
Library String
*** Test Cases ***
Request RNIS subscription list
[Documentation] TC_MEC_SRV_RNIS_011_OK
TC_MEC_MEC012_SRV_RNIS_011_OK
[Documentation] Request RNIS subscription list
... Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested
... ETSI GS MEC 012 2.1.1, clause 7.6.3.1
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml#/definitions/SubscriptionLinkList
Get RNIS subscription list
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SubscriptionLinkList
Check Subscription ${response['body']} ${SUBSCRIPTION_VALUE}
# The following step is faulty in the design, thus it is commented. It is kept since
# it is required by the Test Purpose TP_MEC_SRV_RNIS_011_OK
# Check Subscription ${response['body']} ${SUBSCRIPTION_VALUE}
Create RNIS subscription
[Documentation] TC_MEC_SRV_RNIS_012_OK
TC_MEC_MEC012_SRV_RNIS_012_OK
[Documentation] Create RNIS subscription
... Check that the RNIS service creates a new RNIS subscription
... ETSI GS MEC 012 2.1.1, clause 7.6.3.4
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Post RNIS subscription request CellChangeSubscription
Post RNIS subscription request CellChangeSubscriptionRequest
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is CellChangeSubscriptionRequest
Check HTTP Response Body Json Schema Is CellChangeSubscription
Check CellChangeSubscription ${response['body']}
Get an Individual RNIS subscription
[Documentation] TC_MEC_SRV_RNIS_013_OK
TC_MEC_MEC012_SRV_RNIS_013_OK
[Documentation] Get an Individual RNIS subscription
... Check that the RNIS service sends a RNIS subscription when requested
... ETSI GS MEC 012 2.1.1, clause 7.8.3.1
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Get Individual RNIS Subscription
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is CellChangeSubscriptionRequest
Check HTTP Response Body Json Schema Is CellChangeSubscription
Update an Individual RNIS subscription
[Documentation] TC_MEC_SRV_RNIS_014_OK
TC_MEC_MEC012_SRV_RNIS_014_OK
[Documentation] Update an Individual RNIS subscription
... Check that the RNIS service modifies a RNIS subscription when requested
... ETSI GS MEC 012 2.1.1, clause 7.8.3.2
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
Update Individual RNIS Subscription
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is CellChangeSubscriptionRequest
Check HTTP Response Body Json Schema Is CellChangeSubscription
Remove an Individual RNIS subscription
[Documentation] TC_MEC_SRV_RNIS_015_OK
TC_MEC_MEC012_SRV_RNIS_015_OK
[Documentation] Remove an Individual RNIS subscription
... Check that the RNIS service deletes a RNIS subscription when requested
... ETSI GS MEC 012 2.1.1, clause 7.8.3.5
... Reference https://forge.etsi.org/rep/mec/gs012-rnis-api/blob/automatic_generation/RniAPI.yaml
......@@ -79,7 +81,11 @@ Post RNIS subscription request
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${body} Get File jsons/CellChangeSubscriptionRequest.json
${json_file} = Catenate SEPARATOR= jsons/ ${content} .json
${body}= Get File ${json_file}
${body}= Replace String ${body} \${HREF} ${HREF}
${body}= Replace String ${body} \${LINKS_SELF} ${LINKS_SELF}
Log ${body}
Post ${apiRoot}/rni/${apiVersion}/subscriptions ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -94,7 +100,7 @@ Get Individual RNIS Subscription
Get ${apiRoot}/rni/${apiVersion}/subscriptions/${SUBSCRIPTION_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
Update Individual RNIS Subscription
Should Be True ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1
......@@ -102,10 +108,13 @@ Update Individual RNIS Subscription
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
${body} Get File jsons/UpdateCellChangeSubscriptionRequest.json
${body}= Replace String ${body} \${HREF} ${HREF}
${body}= Replace String ${body} \${LINKS_SELF} ${LINKS_SELF}
Log ${body}
Put ${apiRoot}/rni/${apiVersion}/subscriptions/${SUBSCRIPTION_ID} ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Delete Individual RNIS Subscription
Should Be True ${PIC_RNIS_SPECIFIC_SUBSCRIPTION} == 1
......
*** Variables ***
${MEC-APP_SCHEMA} http
#${MEC-APP_HOST} 172.28.4.87
#${MEC-APP_HOST} 127.0.0.1
${MEC-APP_HOST} 192.168.56.1
${MEC-APP_PORT} 8081
${MEC-APP_HOST} my-rnis-example.com
${MEC-APP_PORT} 8080
${SUBSCRIPTION_ID} 7777
${NON_EXISTENT_SUBSCRIPTION_ID} 6666
${LINKS_SELF} http://example.com/exampleAPI/rni/v2/subscriptions
${SUBSCRIPTION_HREF_VALUE} cell_changed
${SUBSCRIPTION_TYPE} CELL_CHANGE
${HREF} http://meAppClient.example.com/rni/v1/notifications/cell_change/77777
${SUBSCRIPTION_VALUE} {'href': '${HREF}', 'subscriptionType': '${SUBSCRIPTION_TYPE}'}
${CELL_ID} 0x800000A
${C_ID} 0xFFFFFFF
${HREF} http://notify-me.com:80/notify
${SUBSCRIPTION_VALUE} {'href': 'http://notify-me.com:80/notify', 'subscriptionType': 'CELL_CHANGE'}
${CELL_ID} 6060606
${C_ID} 6060606
${NOT_EXISTENT_CELL_ID} 0x8000099
${APP_INS_ID} 01
${APP_INS_ID}
${APP_ID} 10
${NOT_EXISTENT_APP_INS_ID} 99
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}
${apiRoot} /example
${apiVersion} v2
${PIC_PROBLEM_DETAILS_ON_4xx} 0
# Notifications variables
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
${callback_port} 9091
${callback_uri} http://192.168.56.103:${callback_port}
${callback_endpoint} /subscriptions
${callback_port} 80
${callback_uri} http://notify-me.com
${callback_endpoint} /notify
${callback_endpoint_error} /subs_404
${total_polling_time} 2 min
${polling_interval} 10 sec
*** Settings ***
Resource ../environment/variables.txt
Resource ../../../pics.txt
Resource ../../../GenericKeywords.robot
Resource ../../../../pics.txt
Resource ../../../../GenericKeywords.robot
Library REST ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT} ssl_verify=false
Library JSONSchemaLibrary schemas/
......@@ -19,16 +19,14 @@ Check Subscription
Check CellChangeSubscription
[Arguments] ${received_value}
Should Be Equal ${received_value['_links']['self']} ${LINKS_SELF}
Should Be Equal ${received_value['_links']['self']['href']} ${LINKS_SELF}
Check RabInfo
[Arguments] ${received_value}
log ${received_value}
Should Be Equal As Strings ${received_value['appInstanceId']} ${APP_INS_ID}
Should Not Be Empty ${received_value['requestId']}
Should Be Equal As Strings ${received_value['cellUserInfo'][0]['ecgi']['cellId']} ${CELL_ID}
Run Keyword If 'cellUserInfo' in ${received_value} Should Be Equal As Strings ${received_value['cellUserInfo'][0]['ecgi']['cellId']} ${CELL_ID}
Check PlmnInfo
[Arguments] ${received_value}
......@@ -46,4 +44,4 @@ Check S1BearerInfo
Check L2MeasInfo
[Arguments] ${received_value}
log ${received_value}
Should Be Equal As Strings ${received_value['cellInfo']['ecgi']['cellId']} ${CELL_ID}
Should Be Equal As Strings ${received_value['cellInfo'][0]['ecgi']['cellId']} ${CELL_ID}