Skip to content
Snippets Groups Projects
Commit 3af90362 authored by AHMADABB's avatar AHMADABB
Browse files
parents 1d5f607b 89ffd168
No related branches found
No related tags found
No related merge requests found
Showing
with 827 additions and 391 deletions
......@@ -34,7 +34,7 @@ Get VNF Indicators with attribute-based filter
Check HTTP Response Body Json Schema Is vnfIndicators
Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter
Get all VNF Indicators with invalid attribute-based filter
Get VNF Indicators with invalid attribute-based filter
[Documentation] Test ID: 6.3.2.1.3
... Test title: Get VNF Indicators with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response.
......@@ -121,7 +121,7 @@ PUT all VNF Indicators - Method not implemented
PATCH all VNF Indicators - Method not implemented
[Documentation] Test ID: 6.3.2.1.10
... Test title: POST all VNF Indicators - Method not implemented
... Test title: PATCH all VNF Indicators - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF
... Reference: section 8.4.2.3.4 - SOL002 v2.4.1
......@@ -133,7 +133,7 @@ PATCH all VNF Indicators - Method not implemented
DELETE all VNF Indicators - Method not implemented
[Documentation] Test ID: 6.3.2.1.11
... Test title: POST all VNF Indicators - Method not implemented
... Test title: DELETE all VNF Indicators - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF
... Reference: section 8.4.2.3.5 - SOL002 v2.4.1
......
......@@ -14,4 +14,11 @@ ${NEG_AUTHORIZATION} Bearer negativetoken
${FIELD_USAGE} 1
${AUTHORIZATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
${AUTH_USAGE} 1
${VNFM_DUPLICATION} 1
\ No newline at end of file
${VNFM_DUPLICATION} 1
${VNFM_CHECKS_NOTIF_ENDPOINT} 1
${callback_uri} http://localhost
${callback_port} 9091
${callback_endpoint} /endpoint
${callback_endpoint_error} /endpoint_404
${sleep_interval} 20s
${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar
\ No newline at end of file
......@@ -2,94 +2,96 @@
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Resource environment/individualSubscription.txt
Resource VNFIndicatorsKeywords.robot
Library OperatingSystem
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
*** Test Cases ***
GET Individual Subscription
Log Trying to get a given subscription identified by subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 200
Log Received a 200 OK as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${result}= Output response body
Log Trying to validate result with VnfIndicatorSubscription schema
Validate Json VnfIndicatorSubscription.schema.json ${result}
Log Validated VnfIndicatorSubscription schema
GET Individual VNF Indicator Subscription
[Documentation] Test ID: 7.3.6.5.1
... Test title: GET Individual VNF Indicator Subscription
... Test objective: The objective is to test the retrieval of individual VNF indicator subscription and perform a JSON schema validation of the returned subscription data structure
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.6.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get Individual VNF Indicator Subscription
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is VnfIndicatorSubscription
GET Subscription - Negative (Not Found)
Log Trying to perform a request on a subscriptionID which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
Integer response status 404
Log Received 404 Not Found as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${problemDetails}= Output response body
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
GET Individual VNF Indicator Subscription with invalid resource identifier
[Documentation] Test ID: 7.3.6.5.2
... Test title: GET Individual VNF Indicator Subscription with invalid resource identifier
... Test objective: The objective is to test that the retrieval of individual VNF indicator subscription fails when using an invalid resource identifier.
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.6.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
GET Individual VNF Indicator Subscription with invalid resource identifier
Check HTTP Response Status Code Is 404
GET Subscription - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 401
Log Received 401 Unauthorized 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
DELETE Individual VNF Indicator Subscription
[Documentation] Test ID: 7.3.6.5.3
... Test title: DELETE Individual VNF Indicator Subscription
... Test objective: The objective is to test the deletion of an individual VNF indicator subscription.
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.6.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The subscription to VNF indicators is deleted
Send Delete Request for Individual VNF Indicator Subscription
Check HTTP Response Status Code Is 204
Check Postcondition Individual VNF Indicator Subscription is Deleted
DELETE Subscription
Log Trying to perform a DELETE on a subscriptionId
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 204
Log Received 204 No Content as expected
DELETE Individual VNF Indicator Subscription with invalid resource identifier
[Documentation] Test ID: 7.3.6.5.4
... Test title: DELETE Individual VNF Indicator Subscription with invalid resource identifier
... Test objective: The objective is to test that the deletion of an individual VNF indicator subscription fails when using an invalid resource identifier.
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.6.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier
Check HTTP Response Status Code Is 404
DELETE Subscription - Negative (Not Found)
Log Trying to perform a DELETE on a subscriptionId which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId}
Integer response status 404
Log The subscriptionId is not present in database
${contentType}= Output response headers Content-Type
Should Contain ${contentType} application/json
${problemDetails}= Output
Log Trying to validate ProblemDetails
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PUT Individual VNF Indicator Subscription - Method not implemented
[Documentation] Test ID: 7.3.6.5.5
... Test title: PUT Individual VNF Indicator Subscription - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF indicator subscription
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.6.3.3 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The individual VNF indicator subscription is not modified by the operation
Send Put Request for Individual VNF Indicator Subscription
Check HTTP Response Status Code Is 405
Check Postcondition VNF indicator subscription Unmodified (Implicit)
PUT Subscription - (Method not implemented)
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}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
PATCH Individual VNF Indicator Subscription - Method not implemented
[Documentation] Test ID: 7.3.6.5.6
... Test title: PATCH Individual VNF Indicator Subscription - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update an individual VNF indicator subscription
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.6.3.4 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The individual VNF indicator subscription is not modified by the operation
Send Patch Request for Individual VNF Indicator Subscription
Check HTTP Response Status Code Is 405
Check Postcondition VNF indicator subscription Unmodified (Implicit)
PATCH Subscription - (Method not implemented)
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}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
POST Subscription - (Method not implemented)
Log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId}
Integer response status 405
Log Received 405 Method not implemented as expected
POST Individual VNF Indicator Subscription - Method not implemented
[Documentation] Test ID: 7.3.6.5.7
... Test title: POST Individual VNF Indicator Subscription - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator subscription
... Pre-conditions: A VNF instance is instantiated.
... Reference: section 8.4.6.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The individual VNF indicator subscription is not created by the operation
Send Post Request for Individual VNF Indicator Subscription
Check HTTP Response Status Code Is 405
Check Postcondition VNF indicator subscription is not created
\ No newline at end of file
......@@ -2,93 +2,82 @@
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Resource environment/individualVnfIndicator.txt
Resource VNFIndicatorsKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
*** Test Cases ***
GET Individual VNF Indicator
Log The GET method reads a VNF indicator.
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
Get Individual Indicator for VNF Instance
[Documentation] Test ID: 7.3.6.3.1
... Test title: Get Individual Indicator for VNF Instance
... Test objective: The objective is to test the retrieval of an 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 VNF indicator is available in the VNFM.
... Reference: section 8.4.4.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... 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 Includes Requested VNF Instance ID
Check HTTP Response Body Includes Requested Indicator ID
GET Individual VNF Indicator - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID
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
Get Individual Indicator for VNF Instance with invalid indicator identifier
[Documentation] Test ID: 7.3.6.3.2
... Test title: Get Individual Indicator for VNF Instance with invalid indicator identifier
... Test objective: The objective is to test that the retrieval of an 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 VNF indicator is available in the VNFM.
... Reference: section 8.4.4.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get Individual Indicator for a VNF instance with invalid indicator identifier
Check HTTP Response Status Code Is 404
GET Individual VNF Indicator - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept" : "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 401
Log Received 401 Unauthorized 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
POST Individual VNF Indicator for VNF Instance - Method not implemented
[Documentation] Test ID: 7.3.6.3.3
... Test title: POST Individual VNF Indicator for VNF Instance - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator in the VNFM
... Pre-conditions: A VNF instance is instantiated.
... Reference: section 8.4.4.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send POST Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
GET Individual VNF Indicator - Negative (Unauthorized: No Token)
Log Trying to perform a negative get, without authentication token.
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId}
Integer response status 401
Log Received 401 Unauthozired 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
PUT Individual VNF Indicator for VNF Instance - Method not implemented
[Documentation] Test ID: 7.3.6.3.4
... Test title: PUT Individual VNF Indicator for VNF Instance - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify an existing indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM
... Reference: section 8.4.4.3.3 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send PUT Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
POST Individual VNF Indicator (Method not implemented)
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
PATCH Individual VNF Indicator for VNF Instance - Method not implemented
[Documentation] Test ID: 7.3.6.3.5
... Test title: PATCH Individual VNF Indicator for VNF Instance - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update an existing indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available for the given VNF instance.
... Reference: section 8.4.4.3.4 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send PATCH Request for individual indicator in VNF instance
Check HTTP Response Status Code Is 405
PUT Individual VNF Indicator (Method not implemented)
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)
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)
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
DELETE Individual VNF Indicator for VNF Instance - Method not implemented
[Documentation] Test ID: 7.3.6.3.6
... Test title: DELETE Individual VNF Indicator for VNF Instance - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete an existing indicator for a VNF instance
... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM
... Reference: section 8.4.3.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The individual 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
\ No newline at end of file
......@@ -12,76 +12,138 @@ Suite Setup Create Sessions
Suite Teardown Terminate All Processes kill=true
*** Test Cases ***
GET All VNF Indicators Subscriptions
GET All VNF Indicator Subscriptions
[Documentation] Test ID: 7.3.6.4.1
... Test title: GET All VNF Indicator Subscriptions
... Test objective: The objective is to test the retrieval of all VNF indicator subscriptions and perform a JSON schema validation of the returned subscriptions data structure
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get All VNF Indicators Subscriptions
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is VnfIndicatorSubscriptions
GET VNF Indicators Subscriptions with attribute-based filter
GET VNF Indicator Subscriptions with attribute-based filter
[Documentation] Test ID: 7.3.6.4.2
... Test title: GET VNF Indicator Subscriptions with attribute-based filter
... Test objective: The objective is to test the retrieval of VNF indicator subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF Indicators Subscriptions with filter
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is VnfIndicatorSubscriptions
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
GET VNF Indicators Subscriptions with invalid attribute-based filter
GET VNF Indicator Subscriptions with invalid attribute-based filter
[Documentation] Test ID: 7.3.6.4.3
... Test title: GET VNF Indicator Subscriptions with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of VNF indicator subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF Indicators Subscriptions with invalid filter
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
GET VNF Indicators Subscriptions with invalid resource endpoint
GET VNF Indicator Subscriptions with invalid resource endpoint
[Documentation] Test ID: 7.3.6.4.4
... Test title: GET VNF Indicator Subscriptions with invalid resource endpoint
... Test objective: The objective is to test that the retrieval of all VNF indicator subscriptions fails when using invalid resource endpoint.
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF Indicators Subscriptions with invalid resource endpoint
Check HTTP Response Status Code Is 404
GET VNF Indicators Subscriptions with invalid authentication token
Get VNF Indicators Subscriptions with invalid authentication token
Check HTTP Response Status Code Is 401
Check HTTP Response Body Json Schema Is ProblemDetails
Create new VNF indicator subscription
[Documentation] Test ID: 7.3.6.4.5
... Test title: Create new VNF indicator subscription
... Test objective: The objective is to test the creation of a new VNF indicator subscription and perform a JSON schema and content validation of the returned subscription data structure
... Pre-conditions: A VNF instance is instantiated.
... Reference: section 8.4.5.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF indicator subscription is successfully set and it matches the issued subscription
Send Post Request for VNF Indicator Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is VnfIndicatorSubscription
Check HTTP Response Body Matches the Subscription
Check Postcondition VNF Indicator Subscription Is Set
Create duplicated VNF indicator subscription with duplication handler
Create duplicated VNF indicator subscription with VNFM not creating duplicated subscriptions
[Tags] no-duplicated-subs
[Documentation] Test ID: 7.3.6.4.6
... Test title: Create duplicated VNF indicator subscription with VNFM not creating duplicated subscriptions
... Test objective: The objective is to test the attempt of a creation of a duplicated VNF indicator subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: The VNFM does not support the creation of duplicated subscriptions
... Post-Conditions: The existing VNF indicator subscription returned is available in the VNFM
Send Post Request for Duplicated VNF indicator Subscription
Check HTTP Response Status Code Is 303
Check HTTP Response Body Is Empty
Check HTTP Response Header Contains Location
Check Postcondition VNF indicator Subscription Is Set Location
Create duplicated VNF indicator subscription without duplication handler
Check Postcondition Subscription Resource Returned in Location Header Is Available
Create duplicated VNF indicator subscription with VNFM creating duplicated subscriptions
[Tags] duplicated-subs
[Documentation] Test ID: 7.3.6.4.7
... Test title: Create duplicated VNF indicator subscription with VNFM creating duplicated subscriptions
... Test objective: The objective is to test the creation of a duplicated VNF indicator subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: The VNFM supports the creation of duplicated subscriptions
... Post-Conditions: The duplicated VNF indicator subscription is successfully set and it matches the issued subscription
Send Post Request for Duplicated VNF indicator Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription
Check Postcondition VNF indicator Subscription Is Set
PUT VNF Indicator Subscriptions - Method not implemented
[Documentation] TTest ID: 7.3.6.4.8
... Test title: PUT VNF Indicator Subscriptions - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicator subscriptions
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.3 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send Put Request for VNF Indicator Subscriptions
Check HTTP Response Status Code Is 405
PATCH VNF Indicator Subscriptions - Method not implemented
[Documentation] Test ID: 7.3.6.4.9
... Test title: PATCH VNF Indicator Subscriptions - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicator subscriptions
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.4 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send Patch Request for VNF Indicator Subscriptions
Check HTTP Response Status Code Is 405
DELETE VNF Indicator Subscriptions - Method not implemented
[Documentation] Test ID: 7.3.6.4.10
... Test title: DELETE VNF Indicator Subscriptions - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators subscriptions
... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM.
... Reference: section 8.4.5.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF indicator subscriptions are not deleted by the failed operation
Send Delete Request for VNF Indicator Subscriptions
Check HTTP Response Status Code Is 405
Check Postcondition VNF Indicator Subscriptions Exists
......@@ -3,122 +3,143 @@ Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Library JSONLibrary
Resource environment/vnfIndicators.txt
Resource VNFIndicatorsKeywords.robot
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
*** Test Cases ***
GET all Indicators
Log The GET method queries multiple VNF indicators
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators
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 vnfIndicators.schema.json ${result}
Log Validation OK
Get all VNF Indicators
[Documentation] Test ID: 7.3.6.1.1
... Test title: Get all VNF Indicators
... Test objective: The objective is to test the retrieval of all the available VNF indicators and perform a JSON schema validation of the collected indicators data structure
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all VNF indicators
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfIndicators
Get VNF Indicators with attribute-based filter
[Documentation] Test ID: 7.3.6.1.2
... Test title: Get VNF Indicators with attribute-based filter
... Test objective: The objective is to test the retrieval of VNF indicators using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF indicators with filter
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfIndicators
Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter
GET all Indicators - Filter
Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS}
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 vnfIndicators.schema.json ${result}
Log Validation OK
Get VNF Indicators with invalid attribute-based filter
[Documentation] Test ID: 7.3.6.1.3
... Test title: Get VNF Indicators with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response.
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get VNF indicators with invalid filter
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
GET all Indicators - Negative (wronge filter name)
Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters. Negative case, with erroneous attribute name
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS}
Integer response status 400
Log Received 400 Bad Request 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
Get all VNF Indicators with malformed authorization token
[Documentation] Test ID: 7.3.6.1.4
... Test title: Get all VNF Indicators with malformed authorization token
... Test objective: The objective is to test that the retrieval of VNF indicators fails when using malformed authorization token
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 4.5.3.3, 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: The VNFM requires the usage of access tokens for authorizing the API requests.
... Post-Conditions: none
Get all VNF indicators with malformed authorization token
Check HTTP Response Status Code Is 400
GET all Indicators - Negative (Unauthorized: Wrong Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM \ is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 401
Log Received 401 Unauthorized 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
Get all VNF Indicators without authorization token
[Documentation] Test ID: 7.3.6.1.5
... Test title: Get all VNF Indicators without authorization token
... Test objective: The objective is to test that the retrieval of VNF indicators fails when omitting the authorization token
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 4.5.3.3, 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: The VNF requires the usage of access tokens for authorizing the API requests.
... Post-Conditions: none
Get all VNF indicators without authorization token
Check HTTP Response Status Code Is 401
GET all Indicators - Negative (Unauthorized: No Token)
Log Trying to perform a negative get, using wrong authorization bearer
Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Authorization": "${NEG_AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators
Integer response status 401
Log Received 401 Unauthorized 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
GET all VNF Indicators with expired or revoked authorization token
[Documentation] Test ID: 7.3.6.1.6
... Test title: GET all VNF Indicators with expired or revoked authorization token
... Test objective: The objective is to test that the retrieval of VNF indicators fails when using expired or revoked authorization token
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 4.5.3.3, 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: The VNF requires the usage of access tokens for authorizing the API requests.
... Post-Conditions: none
Get all VNF indicators with expired or revoked authorization token
Check HTTP Response Status Code Is 401
GET all Indicators (Negative: Not found)
Log Trying to perform a GET on a erroneous URI
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicator
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
Get all VNF Indicators with invalid resource endpoint
[Documentation] Test ID: 7.3.6.1.7
... Test title: Get all VNF Indicators with invalid resource endpoint
... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid resource endpoint
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM.
... Reference: section 8.4.2.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all VNF indicators with invalid resource endpoint
Check HTTP Response Status Code Is 404
POST all Indicators (Method not implemented)
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
Integer response status 405
Log Received 405 Method not implemented as expected
POST all VNF Indicators - Method not implemented
[Documentation] Test ID: 7.3.6.1.8
... Test title: POST all VNF Indicators - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create new VNF indicators
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM
... Reference: section 8.4.2.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send POST Request for all VNF indicators
Check HTTP Response Status Code Is 405
PUT all Indicators (Method not implemented)
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
Integer response status 405
Log Received 405 Method not implemented as expected
PUT all VNF Indicators - Method not implemented
[Documentation] Test ID: 7.3.6.1.9
... Test title: PUT all VNF Indicators - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicators
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM
... Reference: section 8.4.2.3.3 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send PUT Request for all VNF indicators
Check HTTP Response Status Code Is 405
PATCH all Indicators (Method not implemented)
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
Integer response status 405
Log Received 405 Method not implemented as expected
DELETE all Indicators (Method not implemented)
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
Integer response status 405
Log Received 405 Method not implemented as expected
PATCH all VNF Indicators - Method not implemented
[Documentation] Test ID: 7.3.6.1.10
... Test title: PATCH all VNF Indicators - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF
... Reference: section 8.4.2.3.4 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send PATCH Request for all VNF indicators
Check HTTP Response Status Code Is 405
DELETE all VNF Indicators - Method not implemented
[Documentation] Test ID: 7.3.6.1.11
... Test title: DELETE all VNF Indicators - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF
... Reference: section 8.4.2.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The VNF indicators are not deleted by the unsuccessful operation
Send DELETE Request for all VNF indicators
Check HTTP Response Status Code Is 405
Check Postcondition VNF Indicators Exist
This diff is collapsed.
......@@ -2,91 +2,111 @@
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Resource environment/vnfIndicatorinVnfInstance.txt
Resource VNFIndicatorsKeywords.robot
Library JSONLibrary
Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}
*** Test Cases ***
GET Indicators on VNF Instance
Log This resource represents VNF indicators 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}
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate response
${result}= Output response body
Validate Json vnfIndicators.schema.json ${result}
Log Validation OK
GET Indicators on VNF Instance - Filter
Log This resource represents VNF indicators 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}?${POS_FIELDS}
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate response
${result}= Output response body
Validate Json vnfIndicators.schema.json ${result}
Log Validation OK
*** Test Cases ***
Get Indicators for VNF Instance
[Documentation] Test ID: 7.3.6.2.1
... Test title: Get Indicators for VNF Instance
... Test objective: The objective is to test the retrieval of all 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 VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
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 Includes Requested VNF Instances ID
GET Indicators on VNF Instance - Negative Filter
Log This resource represents VNF indicators 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}?${NEG_FIELDS}
Integer response status 400
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
GET Indicators for VNF Instance with attribute-based filter
[Documentation] Test ID: 7.3.6.2.2
... Test title: GET Indicators for VNF Instance with attribute-based filter
... Test objective: The objective is to test the retrieval of all 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 VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all indicators for a VNF instance with filter
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfIndicators
Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter
GET Indicators on VNF Instance - Negative (Not Found)
Log Trying to perform a negative get, using wrong authorization bearer
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId}
Integer response status 404
Log Received 404 Not Found as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
Get Indicators for VNF Instance with invalid attribute-based filter
[Documentation] Test ID: 7.3.6.2.3
... Test title: Get Indicators for VNF Instance with invalid attribute-based filter
... Test objective: The objective is to test that the retrieval of all 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 VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all indicators for a VNF instance with invalid filter
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
POST Indicators on VNF Instance - (Method not implemented)
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}
Integer response status 405
Log Received 405 Method not implemented as expected
Get Indicators for VNF Instance with invalid resource identifier
[Documentation] Test ID: 7.3.6.2.4
... Test title: Get Indicators for VNF Instance with invalid resource identifier
... Test objective: The objective is to test that the retrieval of all 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 VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Get all indicators for a VNF instance with invalid resource identifier
Check HTTP Response Status Code Is 404
Check HTTP Response Body Json Schema Is ProblemDetails
PUT Indicators on VNF Instance - (Method not implemented)
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}
Integer response status 405
Log Received 405 Method not implemented as expected
POST Indicators for VNF instance - Method not implemented
[Documentation] Test ID: 7.3.6.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
... Pre-conditions: A VNF instance is instantiated.
... Reference: section 8.4.3.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send POST Request for indicators in VNF instance
Check HTTP Response Status Code Is 405
PATCH Indicators on VNF Instance - (Method not implemented)
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}
Integer response status 405
Log Received 405 Method not implemented as expected
PUT Indicators for VNF instance - Method not implemented
[Documentation] Test ID: 7.3.6.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 existing indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.3 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send PUT Request for indicators in VNF instance
Check HTTP Response Status Code Is 405
DELETE Indicators on VNF Instance - (Method not implemented)
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}
Log Received 405 Method not implemented as expected
PATCH Indicators for VNF instance - Method not implemented
[Documentation] Test ID: 7.3.6.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 existing indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.4 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: none
Send PATCH Request for indicators in VNF instance
Check HTTP Response Status Code Is 405
DELETE Indicators for VNF instance - Method not implemented
[Documentation] Test ID: 7.3.6.2.8
... Test title: DELETE Indicators for VNF instance - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete indicators for a VNF instance
... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
... Reference: section 8.4.3.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_VNFM
... Applicability: none
... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation
Send DELETE Request for indicators in VNF instance
Check HTTP Response Status Code Is 405
Check Postcondition Indicators for VNF instance Exist
*** Variables ***
${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586
${erroneousSubscriptionId} erroneousSubscriptionId # Not existing ID on the subscriptions
${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa
${erroneousSubscriptionId} erroneousSubscriptionId
${newSubscriptionId} newSubsciptionId
${response} httpresponse
${origResponse} httpresponse
*** Variables ***
${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0
${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8
${notAllowedIndicatorId} notAllowedId
${erroneousIndicatorId} erroneousIndicatorId
${response}= httpresponse
......@@ -5,6 +5,7 @@ ${VNFM_SCHEMA} https
${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${NEG_AUTHORIZATION} Bearer negativetoken
${BAD_AUTHORIZATION} Bear sometoken
${ACCEPT_JSON} application/json
${AUTH_USAGE} 1
${CONTENT_TYPE_JSON} application/json
......
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