From e5bf7c12f28f4aaa3acaf2d7288f690426e3a830 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 4 Sep 2020 12:12:56 +0500 Subject: [PATCH 1/6] new test case added for SOL003 VRQN Subsriptions --- .../Subscriptions.robot | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot index 75c19e158..0c0a309e2 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot @@ -6,8 +6,6 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ - - *** Test Cases *** Create new Virtualised Resources Quota Available Notification subscription [Documentation] Test ID: 7.3.7.1.1 @@ -151,4 +149,17 @@ GET Virtualised Resources Quota Available Notification subscriptions - Bad Reque ... Post-Conditions: none GET Virtualised Resources Quota Available Notification Subscriptions Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +Create new Virtualised Resources Quota Available Notification Subscription - Unprocessable Entity + [Documentation] Test ID: 7.3.7.1.12 + ... Test title: Create new Virtualised Resources Quota Available Notification Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send Post request for new Virtualised Resources Quota Available Notification subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails -- GitLab From 7d4f86655f4b28ee3ec9c4ed7870e15aca3f5084 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 9 Oct 2020 12:50:38 +0500 Subject: [PATCH 2/6] refernce updated --- .../ApiVersion.robot | 20 ++++++++-------- .../IndividualSubscription.robot | 10 ++++---- .../NotificationEndpoint.robot | 2 +- .../Subscriptions.robot | 24 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot index dfb570e1d..223f8d37c 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot @@ -11,7 +11,7 @@ POST API Version - Method not implemented ... Test title: POST API version - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -23,7 +23,7 @@ GET API Version ... Test title: GET API Version ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -36,7 +36,7 @@ PUT API Version - Method not implemented ... Test title: PUT API Version - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ PATCH API Version - Method not implemented ... Test title: PATCH API Version - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -60,7 +60,7 @@ DELETE API Version - Method not implemented ... Test title: DELETE API Version - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -72,7 +72,7 @@ POST API Version with apiMajorVerion - Method not implemented ... Test title: POST API version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -84,7 +84,7 @@ GET API Version with apiMajorVerion ... Test title: GET API Version with apiMajorVerion ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -97,7 +97,7 @@ PUT API Version with apiMajorVerion - Method not implemented ... Test title: PUT API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -109,7 +109,7 @@ PATCH API Version with apiMajorVerion - Method not implemented ... Test title: PATCH API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -121,7 +121,7 @@ DELETE API Version with apiMajorVerion - Method not implemented ... Test title: DELETE API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot index a42c3215c..5f3c46264 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot @@ -15,7 +15,7 @@ Create new Virtualised Resources Quota Available Notification individual subscri ... Test title: Create new Virtualised Resources Quota Available Notification individual subscription ... Test objective: The objective is to test that POST method is not allowed to create a new Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -27,7 +27,7 @@ Get Information about an individual subscription ... Test title: Get Information about an individual subscription ... Test objective: The objective is to read an individual Virtualised Resources Quota Available Notification subscription subscribed by the client and perform a JSON schema and content validation of the returned individual subscription data structure ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 11.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -40,7 +40,7 @@ PUT an individual subscription - Method not implemented ... Test title: PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update a existing Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify a existing Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... Test objective: The objective is to test that Delete method is allowed to remove a existing Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 11.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot index ae3bddf2b..9d81b4580 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot @@ -16,7 +16,7 @@ Deliver a notification - Vr Quota Availibility ... Test title: Deliver a notification - Vr Quota Availibility ... Test objective: The objective is to notify related to the availability of the virtualised resources quota. ... Pre-conditions: The VNF has subscribed to the Vr Quota Availibility resource - ... Reference: Clause 11.4.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot index 0c0a309e2..a5b0e3938 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot @@ -12,7 +12,7 @@ Create new Virtualised Resources Quota Available Notification subscription ... Test title: Create new Virtualised Resources Quota Available Notification subscription ... Test objective: The objective is to create a new Virtualised Resources Quota Available Notification subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: no subscription with the same filter and callbackUri exists - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -27,7 +27,7 @@ Create new Virtualised Resources Quota Available Notification subscription - DUP ... Test title: Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION ... Test objective: The objective is to create a new Virtualised Resources Quota Available Notification subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Post-Conditions: none @@ -41,7 +41,7 @@ Create new Virtualised Resources Quota Available Notification subscription - NO- ... Test title: Create new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION ... Test objective: The objective is to create a nduplicated Virtualised Resources Quota Available Notification subscription and verify that the VNF does not allow duplication ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: the VNFM decides to not create a duplicate subscription resource ... Post-Conditions: none @@ -54,7 +54,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions ... Test title: GET Virtualised Resources Quota Available Notification Subscriptions ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions and perform a JSON schema and content validation of the returned subscriptions data structure ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -67,7 +67,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions with attrib ... Test title: GET Virtualised Resources Quota Available Notification Subscriptions with attribute-based Filter ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions and perform a JSON schema and content validation of the returned subscriptions data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -80,7 +80,7 @@ GET Virtualised Resources Quota Available Notification subscriptions - Bad Reque ... Test title: GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions with invalid attribute-based filtering parameters, and verify that problem details are returned ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -93,7 +93,7 @@ PUT Virtualised Resources Quota Available Notification subscriptions - Method no ... Test title: PUT Virtualised Resources Quota Available Notification subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update existing Virtualised Resources Quota Available Notification subscriptions instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -105,7 +105,7 @@ PATCH Virtualised Resources Quota Available Notification subscriptions - Method ... Test title: PATCH Virtualised Resources Quota Available Notification subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify Virtualised Resources Quota Available Notification subscriptions instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -117,7 +117,7 @@ DELETE Virtualised Resources Quota Available Notification subscriptions - Method ... Test title: DELETE Virtualised Resources Quota Available Notification subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to delete Virtualised Resources Quota Available Notification subscriptions instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -130,7 +130,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions as Paged Re ... Test title: GET Virtualised Resources Quota Available Notification Subscriptions as Paged Response ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions as a Paged Response. ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -143,7 +143,7 @@ GET Virtualised Resources Quota Available Notification subscriptions - Bad Reque ... Test title: GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of active Virtualised Resources Quota Available Notification subscriptions list fails because response is too big, and verify that problem details are returned ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -156,7 +156,7 @@ Create new Virtualised Resources Quota Available Notification Subscription - Unp ... Test title: Create new Virtualised Resources Quota Available Notification Subscription - Unprocessable Entity ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. ... re-conditions: none - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none -- GitLab From d19e170743f9a810cdcb7b11cf5dcab9bb00bff7 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 9 Oct 2020 12:57:25 +0500 Subject: [PATCH 3/6] templating, minor fix and new testcases added --- .../IndividualSubscription.robot | 18 +++++++++++++++--- .../Subscriptions.robot | 2 -- .../VRQANOperationKeywords.robot | 14 +++++++------- .../environment/variables.txt | 1 + .../vrQuotaAvailSubscriptionRequest .json | 6 +++--- .../jsons/vrQuotaAvailSubscriptionRequest.json | 3 --- 6 files changed, 26 insertions(+), 18 deletions(-) delete mode 100644 SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot index 5f3c46264..e1de22b87 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot @@ -10,9 +10,9 @@ Documentation This resource represents an individual subscription. The client Suite Setup Check Individual Subscription existence *** Test Cases *** -Create new Virtualised Resources Quota Available Notification individual subscription +Create new Virtualised Resources Quota Available Notification individual subscription - Method not implemented [Documentation] Test ID: 7.3.7.2.1 - ... Test title: Create new Virtualised Resources Quota Available Notification individual subscription + ... Test title: Create new Virtualised Resources Quota Available Notification individual subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated ... Reference: Clause 11.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 @@ -71,4 +71,16 @@ DELETE an individual subscription Delete Virtualised Resources Quota Available Notification individual subscription Check HTTP Response Status Code Is 204 Check Postcondition VNF Virtualised Resources Quota Available Notification individual Subscriptions is Deleted - \ No newline at end of file + +Get Information about an individual subscription - Not Found + [Documentation] Test ID: 7.3.7.2.2 + ... Test title: Get Information about an individual subscription - Not Found + ... Test objective: The objective is to test that the retrieval of an individual Virtualised Resources Quota Available Notification subscription subscribed by the client fils when resource is not present + ... Pre-conditions: The subscription with the given id does not exists + ... Reference: Clause 11.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Virtualised Resources Quota Available Notification individual subscription + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot index a5b0e3938..1b7cfe68a 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot @@ -21,7 +21,6 @@ Create new Virtualised Resources Quota Available Notification subscription Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is VrQuotaAvailSubscription - Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION [Documentation] Test ID: 7.3.7.1.2 ... Test title: Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION @@ -123,7 +122,6 @@ DELETE Virtualised Resources Quota Available Notification subscriptions - Method ... Post-Conditions: none Send Delete request for Virtualised Resources Quota Available Notification subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF Virtualised Resources Quota Available Notification Subscriptions Exists GET Virtualised Resources Quota Available Notification Subscriptions as Paged Response [Documentation] Test ID: 7.3.7.1.10 diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 20d4a9fc4..641ffcefc 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -1,4 +1,5 @@ *** Settings *** +Library String Resource environment/variables.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library JSONLibrary @@ -42,10 +43,6 @@ Check HTTP Response Header ContentType is Log Validate content type Should Be Equal ${response['headers']['Content-Type']} ${expected_contentType} Log Content Type validated - -Check Postcondition VNF Virtualised Resources Quota Available Notification Subscriptions Exists - Log Checking that subscriptions exists - GET Virtualised Resources Quota Available Notification Subscriptions Check Postcondition VNF Virtualised Resources Quota Available Notification individual Subscriptions is Deleted Log Check Postcondition Subscription is deleted @@ -97,7 +94,8 @@ Send Post request for new Virtualised Resources Quota Available Notification sub Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_subscribe=${callback_subscribe} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -108,7 +106,8 @@ Send Post request for new Virtualised Resources Quota Available Notification sub Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_subscribe=${callback_subscribe} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -119,7 +118,8 @@ Send Post request for new Virtualised Resources Quota Available Notification sub Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_subscribe=${callback_subscribe} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt index 87671b9f8..ea3559c2f 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt @@ -14,6 +14,7 @@ ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${callback_endpoint} /notification +${callback_subscribe} /subscribe ${callback_port} 9091 ${callback_uri} http://localhost ${sleep_interval} 20s diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json index 8d91c2b81..ffed99d47 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json @@ -1,3 +1,3 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}{callback_subscribe}" +}} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json deleted file mode 100644 index 8d91c2b81..000000000 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file -- GitLab From 0e0d6857a63a95b3a39d66428a99afebc2d1f052 Mon Sep 17 00:00:00 2001 From: uihassan Date: Wed, 14 Oct 2020 11:42:17 +0500 Subject: [PATCH 4/6] added majorApiVersion --- .../ApiVersion.robot | 10 +++--- .../VRQANOperationKeywords.robot | 32 +++++++++---------- .../environment/variables.txt | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot index 223f8d37c..c02163dd6 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot @@ -167,35 +167,35 @@ DELETE API Version POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 641ffcefc..f33ff0732 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -18,7 +18,7 @@ Create Sessions Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check HTTP Response Status Code Is @@ -53,7 +53,7 @@ Send Post request for Virtualised Resources Quota Available Notification Individ log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -61,7 +61,7 @@ Put Virtualised Resources Quota Available Notification individual Subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -69,7 +69,7 @@ Patch Virtualised Resources Quota Available Notification individual subscription log Trying to perform a Patch. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -77,7 +77,7 @@ Get Virtualised Resources Quota Available Notification individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -85,18 +85,18 @@ Delete Virtualised Resources Quota Available Notification individual subscriptio log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Send Post request for new Virtualised Resources Quota Available Notification subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_subscribe=${callback_subscribe} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -108,7 +108,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_subscribe=${callback_subscribe} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -120,7 +120,7 @@ Send Post request for new Virtualised Resources Quota Available Notification sub Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_subscribe=${callback_subscribe} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -129,7 +129,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -138,7 +138,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions with Filter Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -146,7 +146,7 @@ Get Virtualised Resources Quota Available Notification subscriptions with Bad Re Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -155,7 +155,7 @@ Send Put request for Virtualised Resources Quota Available Notification subscrip Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -164,7 +164,7 @@ Send Patch request for Virtualised Resources Quota Available Notification subscr Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -173,7 +173,7 @@ Send Delete request for Virtualised Resources Quota Available Notification subsc Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt index ea3559c2f..7e9f441fc 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt @@ -22,7 +22,7 @@ ${sleep_interval} 20s ${apiRoot} / ${apiName} vrqan -${apiVersion} v1 +${apiMajorVersion} v1 ${VrQuotaAvailNotification} {} ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -- GitLab From 04d7f1750f4697dc6512dea7c6631c721c92224f Mon Sep 17 00:00:00 2001 From: uihassan Date: Mon, 9 Nov 2020 11:10:38 +0500 Subject: [PATCH 5/6] New Resource NotificationConsumer added --- .../NotificationConsumer.robot | 47 +++++++++++++++++++ .../environment/variables.txt | 4 +- .../jsons/VrQuotaAvailNotification.json | 9 ++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot create mode 100644 SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot new file mode 100644 index 000000000..47465a390 --- /dev/null +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationConsumer.robot @@ -0,0 +1,47 @@ +*** Settings *** +Library String +Resource environment/variables.txt +Library OperatingSystem +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Vr Quota Availibility Notification + [Documentation] Test ID: 7.3.7.4.1 + ... Test title: Vr Quota Availibility Notification + ... Test objective: The objective is to test that Vr Quota Availibility Notification is delivered with success to the notification consumer + ... Pre-conditions: The VNF has subscribed to the Vr Quota Availibility resource + ... Reference: Clause 11.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Vr Quota Avail Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VrQuotaAvailSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Vr Quota Avail Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/VrQuotaAvailNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt index 7e9f441fc..742e6b3b6 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt @@ -27,4 +27,6 @@ ${apiMajorVersion} v1 ${VrQuotaAvailNotification} {} ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -${response} {} \ No newline at end of file +${response} {} + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json new file mode 100644 index 000000000..e24fb8108 --- /dev/null +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json @@ -0,0 +1,9 @@ + +{{ + "id":"", + "notificationType":"VrQuotaAvailNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "resourceGroupId":"", + "_links":"" +}} \ No newline at end of file -- GitLab From fa33b13f767b47c2b085010e5353b0f66e00fe61 Mon Sep 17 00:00:00 2001 From: Najam UI Hassan Date: Wed, 18 Nov 2020 08:50:54 +0100 Subject: [PATCH 6/6] Update ApiVersion.robot --- .../ApiVersion.robot | 420 +++++++++--------- 1 file changed, 210 insertions(+), 210 deletions(-) diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot index c02163dd6..37cd37715 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot @@ -1,211 +1,211 @@ -*** Settings *** -Resource environment/variables.txt -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.7.3.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.7.3.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.7.3.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.7.3.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file -- GitLab