From e490aec370c253e5c1ee3b2b8a7b9464c867fef9 Mon Sep 17 00:00:00 2001 From: zafar <zafar@etsi.org> Date: Fri, 11 Dec 2020 18:22:02 +0500 Subject: [PATCH] New test cases added --- .../IndividualSubscription.robot | 29 ++++++++---- .../NSInstanceUsageNotificationKeywords.robot | 12 +++-- .../Subscriptions.robot | 45 ++++++++++++------- .../Grants.robot | 2 +- .../IndividualGrant.robot | 17 ++++++- 5 files changed, 75 insertions(+), 30 deletions(-) diff --git a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot index 25580082..c742db50 100644 --- a/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot +++ b/SOL011/NSInstanceUsageNotification-API/IndividualSubscription.robot @@ -15,15 +15,15 @@ POST Individual Subscription - Method not implemented ... Reference: Clause 8.5.4.3.1 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance usage notification subscription is not created on the NFVO + ... Post-Conditions: none POST Individual Subscription Check HTTP Response Status Code Is 405 -GET Information about an individual subscription +GET Information about an individual subscription - Successful [Documentation] Test ID: 9.3.4.2.2 - ... Test title: GET Information about an individual subscription + ... Test title: GET Information about an individual subscription - Successful ... Test objective: The objective is to test the retrieval of NS instance usage notification subscription and perform a JSON schema validation of the returned subscription data structure - ... Pre-conditions: none + ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none @@ -35,12 +35,12 @@ GET Information about an individual subscription PUT an individual subscription - Method not implemented [Documentation] Test ID: 9.3.4.2.3 ... Test title: PUT an individual subscription - Method not implemented - ... Test objective: TThe objective is to test that PUT method is not implemented + ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none ... Reference: Clause 8.5.4.3.3 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance usage notification subscription is not modified by the operation + ... Post-Conditions: none PUT Individual Subscription Check HTTP Response Status Code Is 405 @@ -52,7 +52,7 @@ PATCH an individual subscription - Method not implemented ... Reference: Clause 8.5.4.3.4 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance usage notification subscription is not modified by the operation + ... Post-Conditions: none PATCH Individual Subscription Check HTTP Response Status Code Is 405 @@ -66,4 +66,17 @@ DELETE an individual subscription ... Applicability: none ... Post-Conditions: The NS instance usage notification subscription is not available anymore on NFVO DELETE Individual Subscription - Check HTTP Response Status Code Is 204 \ No newline at end of file + Check HTTP Response Status Code Is 204 + +GET Information about an individual subscription - NOT FOUND + [Documentation] Test ID: 9.3.4.2.6 + ... Test title: GET Information about an individual subscription - NOT FOUND + ... Test objective: The objective is to test that the retrieval of individual NS instance usage notification subscription fails when using an invalid resource identifier. + ... Pre-conditions: An NS instance is instantiated. At least one NS instance usage notification subscription is available in the NFVO. + ... Reference: Clause 8.5.4.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET 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/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot index 199ad8c4..0a71abbb 100644 --- a/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot +++ b/SOL011/NSInstanceUsageNotification-API/NSInstanceUsageNotificationKeywords.robot @@ -17,7 +17,7 @@ Check HTTP Response Header Contains Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present -Check Resource URI +Check HTTP Response Header Contains Resource URI ${uri}= Get Value From Json ${response['headers']} $..Location Should Not Be Empty ${uri} Log URI is present @@ -29,7 +29,7 @@ Check subscription existence Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} Integer response status 200 -Check LINK in Header +Check HTTP Response Header Contains Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} @@ -218,4 +218,10 @@ POST NS Instance Usage Notification ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - \ No newline at end of file +Get subscriptions with exclude_default and fields attribute selector + Log Get the list of active subscriptions, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot index 94f20c51..dd9d259e 100644 --- a/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot +++ b/SOL011/NSInstanceUsageNotification-API/Subscriptions.robot @@ -20,7 +20,7 @@ POST Create a new subscription Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is subscription - Check Resource URI + Check HTTP Response Header Contains Resource URI POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 9.3.4.1.2 @@ -107,11 +107,11 @@ GET subscriptions with "all_fields" attribute selector [Documentation] Test ID: 9.3.4.1.8 ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "all_fields" attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is subscriptions @@ -120,11 +120,11 @@ GET subscriptions with "exclude_default" attribute selector [Documentation] Test ID: 9.3.4.1.9 ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_default"s attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is subscriptions @@ -133,11 +133,11 @@ GET subscriptions with "fields" attribute selector [Documentation] Test ID: 9.3.4.1.10 ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "fields" attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is subscriptions @@ -146,11 +146,11 @@ GET subscriptions with "exclude_fields" attribute selector [Documentation] Test ID: 9.3.4.1.11 ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_fields" attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is subscriptions @@ -166,7 +166,7 @@ GET Subscriptions as Paged Response ... Post-Conditions: none GET Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Link PUT subscriptions - Method not implemented [Documentation] Test ID: 9.3.4.1.13 @@ -200,6 +200,19 @@ DELETE subscriptions - Method not implemented ... Reference: Clause 8.5.3.3.5 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Subscription is not deleted + ... Post-Conditions: Subscriptions are not deleted DELETE subscriptions - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +GET subscriptions with "exclude_default" and "fields" attribute selector + [Documentation] Test ID: 9.3.4.1.16 + ... Test title: GET subscriptions with "exclude_default" and "fields" attribute selector + ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_default" and "fields" attribute selector + ... Pre-conditions: + ... Reference: Clause 8.5.3.3.2 - ETSI GS NFV-SOL 011 [6] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: + ... Post-Conditions: + Get subscriptions with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is subscriptions \ No newline at end of file diff --git a/SOL011/NSLifecycleOperationGranting-API/Grants.robot b/SOL011/NSLifecycleOperationGranting-API/Grants.robot index 3c6d92ec..8b5cd238 100644 --- a/SOL011/NSLifecycleOperationGranting-API/Grants.robot +++ b/SOL011/NSLifecycleOperationGranting-API/Grants.robot @@ -79,7 +79,7 @@ DELETE Grants - Method not implemented ... Reference: Clause 7.5.3.3.5 - ETSI GS NFV-SOL 011 [6] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resources are not deleted + ... Post-Conditions: Resources are not deleted Delete Grants Check HTTP Response Status Code Is 405 Get an individual grant - Successful \ No newline at end of file diff --git a/SOL011/NSLifecycleOperationGranting-API/IndividualGrant.robot b/SOL011/NSLifecycleOperationGranting-API/IndividualGrant.robot index 56c233e1..e85fd0df 100644 --- a/SOL011/NSLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL011/NSLifecycleOperationGranting-API/IndividualGrant.robot @@ -67,6 +67,19 @@ DELETE an individual grant - Method not implemented ... Reference: Clause 7.5.4.3.5 - ETSI GS NFV-SOL 011 [1] v3.3.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: Grant is not deleted Delete individual Grant - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +GET an individual grant - NOT FOUND + [Documentation] Test ID: 9.3.3.2.6 + ... Test title: GET an individual grant - NOT FOUND + ... Test objective: The objective is to test that the retrieval of individual grant for a particular Lifecycle operation fails when using an invalid resource identifier + ... Pre-conditions: The grant information is available to the NFVO + ... Reference: Clause 7.5.4.3.2 - ETSI GS NFV-SOL 011 [1] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: Invalid resource identifier is used + ... Post-Conditions: none + Get individual grant + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file -- GitLab