From e2bbf4fcbdf75e36d4b2690c55c51848186e9988 Mon Sep 17 00:00:00 2001 From: uihassan Date: Wed, 12 Aug 2020 11:04:14 +0500 Subject: [PATCH] Added Test Cases for IndividualChangeStateOpperationOccurance.robot --- ...vidualStateChangeOpperationOccurance.robot | 70 +++++++++++++++++++ .../NFVMANOCimKeywords.robot | 41 +++++++++++ .../environment/variables.txt | 4 +- 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 SOL009/NFVManoConfigurationAndInformationManagement-API/IndividualStateChangeOpperationOccurance.robot diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/IndividualStateChangeOpperationOccurance.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/IndividualStateChangeOpperationOccurance.robot new file mode 100644 index 00000000..765b7b86 --- /dev/null +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/IndividualStateChangeOpperationOccurance.robot @@ -0,0 +1,70 @@ +** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library OperatingSystem +Resource NFVMANOCimKeywords.robot +Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT} ssl_verify=false +Library MockServerLibrary + +*** Test Cases *** +POST Individual Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.4.1 + ... Test title: POST Individual Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that POST method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.9.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Post request for Individual Change State Operation Occurance + Check HTTP Response Status Code Is 405 + +GET Individual Change State Operation Occurance + [Documentation] Test ID: 8.3.1.4.2 + ... Test title: GET Individual Change State Operation Occurance + ... Test objective: The objective is to query status information about Individual change state operation occurrences. + ... Pre-conditions: + ... Reference: clause 5.5.9.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: + ... Post-Conditions: + Get Individual Change State OpOcc + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ChangeStateOpOcc + +PUT Individual Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.4.3 + ... Test title: PUT Individual Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.9.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Put request for Individual Change State Operation Occurance + Check HTTP Response Status Code Is 405 + +PATCH Individual Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.4.4 + ... Test title: PATCH Individual Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.9.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Patch request for Individual Change State Operation Occurance + Check HTTP Response Status Code Is 405 + +DELETE Individual Change State Operation Occurance - Method not implemented + [Documentation] Test ID: 8.3.1.4.5 + ... Test title: DELETE Individual Change State Operation Occurance - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemeted. + ... Pre-conditions: + ... Reference: clause 5.5.9.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: + Send Delete request for Individual Change State Operation Occurance + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot b/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot index 5e3d6784..2f849184 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/NFVMANOCimKeywords.robot @@ -213,3 +213,44 @@ Send DELETE request for Change State Operation Occurance Delete ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} + +Send Post request for Individual Change State Operation Occurance + 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}/${apiMajorVersion}/change_state_ops/${changeStateOpOccId} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Individual Change State OpOcc + Log Query to GET information about individual change state operation occurrences. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/change_state_ops/${changeStateOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Send PUT request for Individual Change State Operation Occurance + 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}/${apiMajorVersion}/change_state_ops/${changeStateOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Send PATCH request for Individual Change State Operation Occurance + 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}/${apiMajorVersion}/change_state_ops/${changeStateOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +Send DELETE request for Individual Change State Operation Occurance + 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}/${apiMajorVersion}/change_state_ops/${changeStateOpOccId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} \ No newline at end of file diff --git a/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt b/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt index f94eed9d..c2f296e3 100644 --- a/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt +++ b/SOL009/NFVManoConfigurationAndInformationManagement-API/environment/variables.txt @@ -25,4 +25,6 @@ ${response} ${filter} ${filter_value} -${fields} \ No newline at end of file +${fields} + +${changeStateOpOccId} \ No newline at end of file -- GitLab