Skip to content
Snippets Groups Projects
Commit a12add45 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

added doc to SOL002 vnf indicators - individual indicators

parent 232ef462
No related branches found
No related tags found
No related merge requests found
......@@ -5,61 +5,160 @@ Resource environment/individualVnfIndicator.txt
Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
*** Test Cases ***
GET Individual VNF Indicator
Log The GET method reads a VNF indicator.
Get Individual Indicator for VNF Instance
[Documentation] Test ID: 6.3.2.3.1
... Test title: Get individual performance indicator for a VNF instance
... Test objective: The objective is to test the retrieval of a performance indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure
... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
... Reference: section 8.4.4.3.2 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators
... Post-Conditions: none
Get Individual Indicator for a VNF instance
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfIndicator
Check HTTP Response Body Matches VNF Instance ID
Check HTTP Response Body Matches Indicator ID
Get Individual Indicator for VNF Instance with invalid indicator identifier
[Documentation] Test ID 6.3.2.3.2
... Test title: Get individual performance indicator for a VNF instance with invalid indicator identifier
... Test objective: The objective is to test that the retrieval of a performance indicator for a given VNF instance fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
... Reference: section 8.4.4.3.2 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
... Post-Conditions: none
Get Individual Indicator for a VNF instance with invalid indicator identifier
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
POST Individual VNF Indicator - Method not implemented
[Documentation] Test ID 6.3.2.3.3
... Test title: POST individual performance indicator for VNF instance - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create a new performance indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated.
... Reference: section 8.4.4.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
... Post-Conditions: none
Send POST Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
PUT Individual VNF Indicator - Method not implemented
[Documentation] Test ID 6.3.2.3.4
... Test title: PUT individual performance indicator for VNF instance - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify an existing performance indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
... Reference: section 8.4.4.3.3 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
... Post-Conditions: none
Send PUT Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
PATCH Individual VNF Indicator - Method not implemented
[Documentation] Test ID 6.3.2.3.5
... Test title: PATCH individual performance indicator for VNF instance - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update an existing performance indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
... Reference: section 8.4.4.3.4 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
... Post-Conditions: none
Send PUT Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
DELETE Individual VNF Indicator - Method not implemented
[Documentation] Test ID 6.3.2.3.6
... Test title: DELETE individual performance indicator indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete an existing performance indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance.
... Reference: section 8.4.3.3.5 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
... Post-Conditions: The individual performance indicator for the VNF instance is not deleted by the unsuccessful operation
Send DELETE Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
Check Postcondition Indicator for VNF instance Exist
*** Keywords ***
Get Individual Indicator for a VNF instance
Log This resource represents a VNF indicator related to a VNF instance.
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
Log Trying to validate response
${result}= Output response body
Validate Json vnfIndicator.schema.json ${result}
Log Validation OK
${output}= Output response
Set Suite Variable @{response} ${output}
GET Individual VNF Indicator - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID
Get Individual Indicator for a VNF instance with invalid indicator identifier
Log Trying to perform a negative get, using wrong identifier
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId}
Integer response status 404
Log Received 404 Not Found as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
${output}= Output response
Set Suite Variable @{response} ${output}
POST Individual VNF Indicator (Method not implemented)
Send POST Request for individual indicator in VNF instance
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId}
${output}= Output response
Set Suite Variable @{response} ${output}
PUT Individual VNF Indicator (Method not implemented)
Send PUT Request for individual indicator in VNF instance
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
PATCH Individual VNF Indicator (Method not implemented)
${output}= Output response
Set Suite Variable @{response} ${output}
Send PATCH Request for individual indicator in VNF instance
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
DELETE Individual VNF Indicator (Method not implemented)
${output}= Output response
Set Suite Variable @{response} ${output}
Send DELETE Request for individual indicator in VNF instance
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 405
Log Received 405 Method not implemented as expected
${output}= Output response
Set Suite Variable @{response} ${output}
Check HTTP Response Status Code Is
[Arguments] ${expected_status}
${status}= Convert To Integer ${expected_status}
Should Be Equal ${response[0]['status']} ${status}
Log Status code validated
Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE}
Log ${response[0]['headers']}
Should Contain ${response[0]['headers']} ${CONTENT_TYPE}
Log Header is present
Check HTTP Response Body Json Schema Is
[Arguments] ${schema}
Should Contain ${response[0]['headers']['Content-Type']} application/json
Validate Json ${schema} ${response[0]['body']}
Log Json Schema Validation OK
Check HTTP Response Body Matches Indicator ID
Log Check Response includes propoer VNF instance and Indicator identifiers
Should Be Equal ${response[0]['body']['id']} ${indicatorId}
Check HTTP Response Body Matches VNF Instance ID
Log Check Response includes propoer VNF instance and Indicator identifiers
Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId}
Check Postcondition Indicator for VNF instance Exist
Log Check Response includes VNF Indicator
Get Individual Indicator for a VNF instance
Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId}
Should Be Equal ${response[0]['body']['id']} ${indicatorId}
......@@ -9,7 +9,7 @@ Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT}
*** Test Cases ***
Get Indicators for VNF Instance
[Documentation] Test ID: 6.3.2.2.1
... Test title: Get all indicators for a VNF instance
... Test title: Get all performance indicators for a VNF instance
... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL002 v2.4.1
......@@ -19,11 +19,11 @@ Get Indicators for VNF Instance
Get all indicators for a VNF instance
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfIndicators
Check HTTP Response Body Match VNF Instance ID
Check HTTP Response Body Matches VNF Instance ID
GET Indicators for VNF Instance with attribute-based filter
[Documentation] Test ID 6.3.2.2.2
... Test title: Get all Indicators for a VNF instance with attribute-based filter
... Test title: Get all performance indicators for a VNF instance with attribute-based filter
... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL002 v2.4.1
......@@ -37,7 +37,7 @@ GET Indicators for VNF Instance with attribute-based filter
Get Indicators for VNF Instance with invalid attribute-based filter
[Documentation] Test ID 6.3.2.2.3
... Test title: Get all Indicators for a VNF instance with invalid attribute-based filter
... Test title: Get all performance indicators for a VNF instance with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL002 v2.4.1
......@@ -50,7 +50,7 @@ Get Indicators for VNF Instance with invalid attribute-based filter
Get Indicators for VNF Instance with invalid resource identifier
[Documentation] Test ID 6.3.2.2.4
... Test title: Get all Indicators for a VNF instance with invalid resource identifier
... Test title: Get all performance indicators for a VNF instance with invalid resource identifier
... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL002 v2.4.1
......@@ -63,8 +63,8 @@ Get Indicators for VNF Instance with invalid resource identifier
POST Indicators for VNF instance - Method not implemented
[Documentation] Test ID 6.3.2.2.5
... Test title: POST indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create new indicators for a VNF instance
... Test title: POST performance indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create new performance indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated.
... Reference: section 8.4.3.3.1 - SOL002 v2.4.1
... Config ID: Config_prod_VE
......@@ -75,9 +75,9 @@ POST Indicators for VNF instance - Method not implemented
PUT Indicators for VNF instance - Method not implemented
[Documentation] Test ID 6.3.2.2.6
... Test title: PUT indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify new indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated.
... Test title: PUT performance indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify existing performance indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.3 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
......@@ -87,9 +87,9 @@ PUT Indicators for VNF instance - Method not implemented
PATCH Indicators for VNF instance - Method not implemented
[Documentation] Test ID 6.3.2.2.7
... Test title: PATCH indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update new indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated.
... Test title: PATCH performance indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update existing performance indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.4 - SOL002 v2.4.1
... Config ID: Config_prod_VE
... Applicability: The VNF supports the generation and maintenance of performance indicators.
......@@ -99,8 +99,8 @@ PATCH Indicators for VNF instance - Method not implemented
DELETE Indicators for VNF instance - Method not implemented
[Documentation] Test ID 6.3.2.2.8
... Test title: DELETE all VNF Indicators - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete indicators for a VNF instance
... Test title: DELETE performance indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete performance indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance.
... Reference: section 8.4.3.3.5 - SOL002 v2.4.1
... Config ID: Config_prod_VE
......@@ -193,7 +193,7 @@ Check HTTP Response Body Json Schema Is
Validate Json ${schema} ${response[0]['body']}
Log Json Schema Validation OK
Check HTTP Response Body Match VNF Instance ID
Check HTTP Response Body Matches VNF Instance ID
Log Check Response includes Indicators according to resource identifier
#todo
......
*** Variables ***
${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0
${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8
${notAllowedIndicatorId} notAllowedId
${erroneousIndicatorId} erroneousIndicatorId
@{response}= httpresponse
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment