Commit cb85f49c authored by Yann Garcia's avatar Yann Garcia
Browse files

Finalyze BWA

parent 943e1559
......@@ -16,7 +16,7 @@ Request the list of configured bandwidth allocations
... Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.4.3.1
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Get the list of configured bandwidth allocations ${APP_INSTANCE_ID}
Retrieve the list of configured bandwidth allocations ${APP_INSTANCE_ID}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is bwInfo
Check AppInstanceId ${APP_INSTANCE_ID}
......@@ -27,28 +27,28 @@ Request the list of configured bandwidth allocations with wrong app instance id
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.4.3.1
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Get the list of configured bandwidth allocations ${NON_EXISTENT_APP_INSTANCE_ID}
Retrieve the list of configured bandwidth allocations ${NON_EXISTENT_APP_INSTANCE_ID}
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
Request for the requested bandwidth requirements
Request to register Bandwidth Management Services
[Documentation] TC_MEC_SRV_BWA_002_OK
... Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.4.3.4
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Registration for bandwidth requirements ${APP_INSTANCE_ID} ${REQUEST_FOR_BW_REQUIREMENTS}
Registration for bandwidth services ${APP_INSTANCE_ID} ${REQUEST_FOR_BW_REQUIREMENTS}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is bwInfo
Check AppInstanceId ${APP_INSTANCE_ID}
Request for the requested bandwidth requirements using wrong parameters
Request to register Bandwidth Management Services using wrong parameters
[Documentation] TC_MEC_SRV_BWA_002_BR
... Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.4.3.4
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Registration for bandwidth requirements ${APP_INSTANCE_ID} ${REQUEST_FOR_BW_REQUIREMENTS_BR}
Registration for bandwidth services ${APP_INSTANCE_ID} ${REQUEST_FOR_BW_REQUIREMENTS_BR}
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
......@@ -79,21 +79,31 @@ Updates the requested bandwidth requirements
... Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.2
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Update a bandwidth allocation ${ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS}
# Preamble
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Update a bandwidth allocation ${allocation_id} ${REQUEST_FOR_BW_REQUIREMENTS}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is bwInfo
Check AppInstanceId ${APP_INSTANCE_ID}
Check Allocation ${ALLOCATION_ID}
Check Allocation ${allocation_id}
# Postamble
Unregister Bandwidth Management Service ${allocation_id}
Updates the requested bandwidth requirements using wrong allocationDirection
[Documentation] TC_MEC_SRV_BWA_004_BR
Updates the requested bandwidth requirements using wrong allocationDirection
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.2
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Update a bandwidth allocation ${ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS_ID}
# Preamble
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Update a bandwidth allocation ${allocation_id} ${REQUEST_FOR_BW_REQUIREMENTS_BR}
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
# Postamble
Unregister Bandwidth Management Service ${allocation_id}
Updates the requested bandwidth requirements using wrong allocationId
......@@ -112,13 +122,115 @@ Updates the requested bandwidth requirements using wrong parameters
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.2
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
# TODO Application doesn't comply with a required condition???
Update a bandwidth allocation ${ALLOCATION_ID} ${REQUEST_FOR_BW_REQUIREMENTS}
# Preamble
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Update a bandwidth allocation with invalid ETAG ${allocation_id} ${REQUEST_FOR_BW_REQUIREMENTS}
Check HTTP Response Status Code Is 412
Check ProblemDetails 412
# Postamble
Unregister Bandwidth Management Service ${allocation_id}
Request for deltas changes
[Documentation] TC_MEC_SRV_BWA_005_OK
... Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
# Preamble
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Request a deltas changes ${allocation_id} ${REQUEST_FOR_DELTAS_CHANGES}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is bwInfo
Check AppInstanceId ${APP_INSTANCE_ID}
Check Allocation ${allocation_id}
# Postamble
Unregister Bandwidth Management Service ${allocation_id}
Request for deltas changes using invalid requestType
[Documentation] TC_MEC_SRV_BWA_005_BR
... Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
# Preamble
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Request a deltas changes ${allocation_id} ${REQUEST_FOR_DELTAS_CHANGES_BR}
Check HTTP Response Status Code Is 400
Check ProblemDetails 400
# Postamble
Unregister Bandwidth Management Service ${allocation_id}
Request for deltas changes using an unknown URI
[Documentation] TC_MEC_SRV_BWA_005_NF
... Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
Request a deltas changes ${NOT_EXISTENT_ALLOCATION_ID} ${REQUEST_FOR_DELTAS_CHANGES}
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
Request for deltas changes using wrong parameters
[Documentation] TC_MEC_SRV_BWA_005_PF
... Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.3
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
# Preamble
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Request a deltas changes with invalid ETAG ${allocation_id} ${REQUEST_FOR_DELTAS_CHANGES}
Check HTTP Response Status Code Is 412
Check ProblemDetails 412
# Postamble
Unregister Bandwidth Management Service ${allocation_id}
Request to unregister bandwidth Management Service
[Documentation] TC_MEC_SRV_BWA_006_OK
... Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.5
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
# Preamble
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
${allocation_id} ${etag_value}= Register Bandwidth Management Service
# Test body
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Delete /exampleAPI/bwm/v1/bw_allocations/${allocation_id}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 204
Request to unregister bandwidth Management Service with wrong parameters
[Documentation] TC_MEC_SRV_BWA_006_OK
... Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
... Reference ETSI GS MEC 015 V1.1.1, clause 8.3.3.5
... Reference https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api/blob/master/BwManagementApi.json
# Preamble
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
# Test body
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Delete /exampleAPI/bwm/v1/bw_allocations/${NON_EXISTENT_ALLOCATION_ID}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 404
Check ProblemDetails 404
*** Keywords ***
Get the list of configured bandwidth allocations
Retrieve the list of configured bandwidth allocations
[Arguments] ${app_instance_id}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
......@@ -126,12 +238,12 @@ Updates the requested bandwidth requirements using wrong parameters
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/bwm/v1/bw_allocations?app_instance_id=${app_instance_id}
Get /exampleAPI/bwm/v1/bw_allocations/${app_instance_id}
${output}= Output response
Set Suite Variable ${response} ${output}
Registration for bandwidth requirements
Registration for bandwidth services
[Arguments] ${app_instance_id} ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
......@@ -140,7 +252,7 @@ Updates the requested bandwidth requirements using wrong parameters
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
log ${content}
Put /exampleAPI/bwm/v1/bw_allocations?app_instance_id=${APP_INSTANCE_ID} ${content}
Post /exampleAPI/bwm/v1/bw_allocations/${APP_INSTANCE_ID} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -153,7 +265,7 @@ Updates the requested bandwidth requirements using wrong parameters
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Get /exampleAPI/bwm/v1/bw_allocations?allocation_id=${allocation_id}
Get /exampleAPI/bwm/v1/bw_allocations/${allocation_id}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -165,7 +277,50 @@ Updates the requested bandwidth requirements using wrong parameters
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"${ETAG_LABEL}":"${ETAG}"}
Set Headers {"Content-Length":"0"}
Put /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
Update a bandwidth allocation with invalid ETAG
[Arguments] ${allocation_id} ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"${ETAG_LABEL}":"${INVALID_ETAG}"}
Set Headers {"Content-Length":"0"}
Put /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
Request a deltas changes
[Arguments] ${allocation_id} ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"${ETAG_LABEL}":"${ETAG}"}
Set Headers {"Content-Length":"0"}
Patch /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
Request a deltas changes with invalid ETAG
[Arguments] ${allocation_id} ${content}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"${ETAG_LABEL}":"${INVALID_ETAG}"}
Set Headers {"Content-Length":"0"}
Put /exampleAPI/bwm/v1/bw_allocations?allocation_id=${allocation_id} ${content}
Patch /exampleAPI/bwm/v1/bw_allocations/${allocation_id} ${content}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -4,14 +4,16 @@ ${MEC-APP_SCHEMA} http
#${MEC-APP_HOST} 127.0.0.1
${MEC-APP_HOST} 192.168.56.1
${MEC-APP_PORT} 8081
${ZONE_ID} zone01
${ETAG_LABEL} Location
${INVALID_ETAG} invalid_etag
${APP_INSTANCE_ID} appInst01
${NON_EXISTENT_APP_INSTANCE_ID} appInst99
${ALLOCATION_ID} allInst01
${NON_EXISTENT_ALLOCATION_ID} allInst99
${FIXED_ALLOCATION} string
${REQUEST_FOR_BW_REQUIREMENTS} "{ "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"}"
${REQUEST_FOR_BW_REQUIREMENTS_BR} "{ "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKMOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"}"
${REQUEST_FOR_BW_REQUIREMENTS_ID} "{ "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "99 = DownAndDownlink (towards the UE)"}"
${FIXED_ALLOCATION} fixed_allocation
${REQUEST_FOR_BW_REQUIREMENTS} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"}
${REQUEST_FOR_BW_REQUIREMENTS_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKMOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "${FIXED_ALLOCATION}", "allocationDirection": "00 = Downlink (towards the UE)"}
${REQUEST_FOR_DELTAS_CHANGES} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "APPLICATION_SPECIFIC_BW_ALLOCATION", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"}
${REQUEST_FOR_DELTAS_CHANGES_BR} { "appInsId": "${APP_INSTANCE_ID}", "requestType": "UNKNOWN", "fixedBWPriority": "not defined in the present document", "fixedAllocation": "string", "allocationDirection": "00 = Downlink (towards the UE)"}
${response} {}
${TOKEN} Basic YWxhZGRpbjpvcGVuc2VzYW1l
......@@ -7,6 +7,41 @@ Library JSONSchemaLibrary schemas/
*** Keywords ***
Register Bandwidth Management Service
... Register a Bandwidth Management Service
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Post /exampleAPI/bwm/v1/bw_allocations ${REQUEST_FOR_BW_REQUIREMENTS}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is bwInfo
# Extract ETAG_VALUE
${etag_value}= ${response['status']['${etag_label}']}
# TODO Extract allocationId
${allocation_id}= 'todo'
[return] ${allocation_id} ${etag_value}
Unregister Bandwidth Management Service
... Unregister a Bandwidth Management Service
[Arguments] ${value}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"application/json"}
Set Headers {"Authorization":"${TOKEN}"}
Set Headers {"Content-Length":"0"}
Delete /exampleAPI/bwm/v1/bw_allocations/${value}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Status Code Is 204
Check AppInstanceId
[Arguments] ${value}
Log Check AppInstanceId for bwInfo element
......
......@@ -42,6 +42,18 @@ https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes
- TC_MEC_SRV_BWA_004_PF <font color="color:green">To be tested</font>
- TC_MEC_SRV_BWA_005_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_BWA_005_BR <font color="color:green">To be tested</font>
- TC_MEC_SRV_BWA_005_NF <font color="color:green">To be tested</font>
- TC_MEC_SRV_BWA_005_PF <font color="color:green">To be tested</font>
- TC_MEC_SRV_BWA_006_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_BWA_006_NF <font color="color:green">To be tested</font>
## SRV
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment