diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 114909043bf8d13c3e24f615e29ce55dd709fc16..7945638df74249cf8921b81e0d25093ed9e4cc73 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -17,8 +17,8 @@ Get Individual Indicator for VNF Instance 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 + Check HTTP Response Body Includes Requested VNF Instance ID + Check HTTP Response Body Includes Requested Indicator ID Get Individual Indicator for VNF Instance with invalid indicator identifier [Documentation] Test ID 6.3.2.3.2 @@ -66,7 +66,7 @@ PATCH Individual VNF Indicator - Method not implemented ... 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 + Send PATCH Request for individual indicator in VNF instance Check HTTP Response Status Code Is 405 DELETE Individual VNF Indicator - Method not implemented @@ -150,11 +150,11 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response[0]['body']} Log Json Schema Validation OK -Check HTTP Response Body Matches Indicator ID +Check HTTP Response Body Includes Requested 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 +Check HTTP Response Body Includes Requested VNF Instance ID Log Check Response includes propoer VNF instance and Indicator identifiers Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId} diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 5c83579937fca3eea36fa6ab25c426fca306b681..290bbdb7623f2620c5888804c456db69b1708231 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -19,7 +19,7 @@ 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 Matches VNF Instance ID + Check HTTP Response Body Includes Requested VNF Instance ID GET Indicators for VNF Instance with attribute-based filter [Documentation] Test ID 6.3.2.2.2 @@ -194,7 +194,7 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response[0]['body']} Log Json Schema Validation OK -Check HTTP Response Body Matches VNF Instance ID +Check HTTP Response Body Includes Requested VNF Instance ID Log Check Response includes Indicators according to resource identifier #todo @@ -204,4 +204,4 @@ Check HTTP Response Body Matches Attribute-Based Filter Check Postcondition Indicators for VNF instance Exist Log Check Response includes VNF Indicators according to filter - #todo \ No newline at end of file + #todo diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index 53676409ae4caf26bacf0d321e7d952e815c54f1..58905d430057969c6b62180911d3879e81049e89 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -6,69 +6,201 @@ Resource environment/IndividualPmJob.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} *** Test Cases *** -GET Individual PM Job +GET individual VNF Performance Job + [Documentation] Test ID: 6.3.3.2.1 + ... Test title: Get individual VNF Performance Job + ... Test objective: The objective is to test the retrieval of an individual VNF performance monitoring job and perform a JSON schema and content validation of the collected job data structure + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: section 6.4.3.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET individual VNF Performance Job + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJob + Check HTTP Response Body Pm Job Identifier + +GET individual VNF Performance Job with invalid resource identifier + [Documentation] Test ID: 6.3.3.2.2 + ... Test title: Get individual VNF Performance Job with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: section 6.4.3.3.2 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET individual VNF Performance Job with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +DELETE Individual VNF Performance Job + [Documentation] Test ID: 6.3.3.2.3 + ... Test title: Delete Individual VNF Performance Job + ... Test objective: The objective is to test the deletion of an individual VNF performance monitoring job + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: section 6.4.3.3.5 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is no more available in the VNFM + Send Delete request for individual VNF Performance Job + Check HTTP Response Status Code Is 204 + Check Postcondition VNF Pm Job is Deleted + +DELETE Individual VNF Performance Job with invalid resource identifier + [Documentation] Test ID: 6.3.3.2.4 + ... Test title: Delete individual VNF Performance Job with invalid resource identifier + ... Test objective: The objective is to test that the deletion of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: section 6.4.3.3.5 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send Delete request for individual VNF Performance Job with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Individual VNF Performance Job - Method not implemented + [Documentation] Test ID: 6.3.3.2.5 + ... Test title: POST Individual VNF Performance Job - method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Monitoring Job + ... Pre-conditions: A VNF instance is instantiated + ... Reference: section 6.4.3.3.1 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not created on the VNFM + Send Post request for individual VNF Performance Job + Check HTTP Response Status Code Is 405 + Check Postcondition VNF Performance Job is not Created + +PUT Individual VNF Performance Job - Method not implemented + [Documentation] Test ID: 6.3.3.2.6 + ... Test title: PUT Individual VNF Performance Job - method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: section 6.4.3.3.4 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not modified by the operation + Send Put request for individual VNF Performance Job + Check HTTP Response Status Code Is 405 + Check Postcondition VNF Performance Job is Unmodified (Implicit) + +PATCH Individual VNF Performance Job - Method not implemented + [Documentation] Test ID: 6.3.3.2.7 + ... Test title: PATCH Individual VNF Performance Job - method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new VNF Performance Monitoring Job + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: section 6.4.3.3.5 - SOL002 v2.4.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not modified by the operation + Send Patch request for individual VNF Performance Job + Check HTTP Response Status Code Is 405 + Check Postcondition VNF Performance Job is Unmodified (Implicit) + +*** Keywords *** +GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - 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 PmJob.schema.json ${result} - Log Validation OK - -GET Individual PM Job - Negative (Not Found) + ${output}= Output response + Set Suite Variable @{response} ${output} + +GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} - 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 - -DELETE Individual PM Job + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 204 - Log Received 204 No Content as expected - -DELETE Individual PM Job - Negative (Not Found) - Log Trying to delete an existing PM Job + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Delete request for individual VNF Performance Job with invalid resource identifier + Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} - Integer response status 404 - Log Received 204 No Content as expected + ${output}= Output response + Set Suite Variable @{response} ${output} -POST Individual PM Job - (Method not implemented) +Send Post request for individual VNF Performance Job 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}/pm_jobs/${pmJobId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -PUT Individual PM Job - (Method not implemented) - Log Trying to perform a PUT. This method should not be implemented + POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Put request for individual VNF Performance Job + 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}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + ${origOutput}= Output response + Set Suite Variable @{origResponse} ${origOutput} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 405 - Log Received 405 Method not implemented as expected - -PATCH Individual PM Job - (Method not implemented) - Log Trying to perform a PATCH. This method should not be implemented + ${output}= Output response + Set Suite Variable @{response} ${output} + +Send Patch request for individual VNF Performance Job + Log Trying to perform a PATCH (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} - Integer response status 405 - Log Received 405 Method not implemented as expected + ${output}= Output response + Set Suite Variable @{response} ${output} + +Check Postcondition VNF Performance Job is not Created + Log Trying to get a new Pm Job + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} + ${output}= Output response + Set Suite Variable @{response} ${output} + Check HTTP Response Status Code Is 404 + +Check Postcondition VNF Performance Job is Unmodified (Implicit) + Log Check Postcondition VNF PM job is not modified + GET individual VNF Performance Job + Log Check Response matches original VNF Pm Job + ${pmJob}= evaluate json.loads('''${response[0]['body']}''') json + Should Be Equal ${origResponse[0]['body']['id']} ${pmJob.id} + Should Be Equal ${origResponse[0]['body']['criteria']} ${pmJob.criteria} + Should Be Equal ${origResponse[0]['body']['_links']} ${pmJob._links} + +Check Postcondition VNF Pm Job is Deleted + Log Check Postcondition + GET individual VNF Performance Job + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body Pm Job Identifier + Log Going to validate Pm Job info retrieved + Should Be Equal ${response[0]['body']['id']} ${pmJobId} + Log Pm Job identifier as expected + +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} + Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log Header is present + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + Should Contain ${response[0]['headers']['Content-Type']} application/json + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response[0]['body']} + Log Json Schema Validation OK + diff --git a/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt index a7823e6bdc74dcb53733685df04b18221ca94825..d1a5866bcb5663805b10660dd9be3faf58a17f24 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt @@ -1,3 +1,6 @@ *** Variables *** ${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e ${erroneousPmJobId} erroneousPmJobId +${newPmJobId} newPmJobId +@{response}= httpresponse +@{OrigResponse}= httpresponse diff --git a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot index 6c0613159cbca6d619e6a0c4cde9b36b7e3edde1..6f8fdec85bcf14b43dc7c2518aeeb321cd574f10 100644 --- a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot @@ -3,6 +3,7 @@ Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem +Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ diff --git a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot index 1e875314c8cc84a49d0b93feb6f89acdfb447954..bc4c081f8f59a224a4e339b374a0d57fe05bb85d 100644 --- a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot @@ -3,6 +3,7 @@ Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem +Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ diff --git a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot index bebe41fd0f69447d901f24377aacf4e452bae750..bd8f6f4837060e15b9cf6d5eb080a8a6a6d9f55b 100644 --- a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot @@ -3,6 +3,7 @@ Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem +Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index 74ec25af1f96f22743e730d23006717fefc50381..df017a18d82cb29c3bf6c3b69cbef907c5126156 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -2,8 +2,10 @@ Resource environment/variables.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library JSONLibrary +Library Process Library JSONSchemaLibrary schemas/ Library OperatingSystem +Library MockServerLibrary *** Keywords *** Create Sessions diff --git a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot index 8937931670b1b1b0a4e018e9b6532f42792ef5b0..9f4c79bfe38afc8556f233e6bce8a5789e50987b 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot @@ -1,7 +1,8 @@ *** Settings *** Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true -Resource environment/variables.txt +Resource environment/variables.txt +Resource NSLCMOperationKeywords.robot Library MockServerLibrary Library Process Library OperatingSystem diff --git a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot index 9dd269cba3f693d346786500a430e0815a7a08a1..ea21b4e81ede1a01a83eff807898521caf715526 100644 --- a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot @@ -3,6 +3,7 @@ Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem +Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ diff --git a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot index 2b46c58c7c8f8edf7de48c0108dc5349ec48ab55..838da60604a46503eaa3965ddde1e0c8151b8bae 100644 --- a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot @@ -3,6 +3,7 @@ Resource environment/variables.txt Resource NSLCMOperationKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} Library OperatingSystem +Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/