From 626bf0cf522e627a3c42be9f73fe98f5bd050ad1 Mon Sep 17 00:00:00 2001 From: uihassan Date: Thu, 29 Oct 2020 15:41:31 +0500 Subject: [PATCH] new testcacse added, postcondition fixed --- .../CancelOperationTask.robot | 4 +- .../CreateNSInstanceWorkflow.robot | 2 - .../IndividualNSInstance.robot | 11 ++--- .../IndividualNSLCMOccurences.robot | 15 ++---- .../IndividualSubscription.robot | 6 +-- .../NSInstances.robot | 48 ++++++++++++------- .../NSLCMOccurences.robot | 15 +++++- .../NSLCMOperationKeywords.robot | 28 +++++------ .../TerminateNSTask.robot | 10 ++-- .../UpdateNSTask.robot | 10 ++-- 10 files changed, 80 insertions(+), 69 deletions(-) diff --git a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot index a930030d..e50e2fcf 100644 --- a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot @@ -93,6 +93,4 @@ DELETE Cancel operation task - Method not implemented ... Applicability: none ... Post-Conditions: none DELETE Cancel operation task - Check HTTP Response Status Code Is 405 - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index 643bb48c..a1dda903 100644 --- a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot @@ -6,9 +6,7 @@ Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ - *** Test Cases *** - NS Instance Creation [Documentation] Test ID: 5.3.2.18.1 ... Test title: NS Instance Creation diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index cd4345a1..32285a8d 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -16,10 +16,9 @@ POST Individual NSInstance - Method not implemented ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Check Postcondition NS Instance is not created + ... Post-Conditions: none POST IndividualNSInstance Check HTTP Response Status Code Is 405 - Check Postcondition NS Instance is not created GET Information about an individual NS Instance [Documentation] Test ID: 5.3.2.2.2 @@ -42,10 +41,9 @@ PUT Individual NSInstance - Method not implemented ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Check Postcondition NS Instance is not modified + ... Post-Conditions: none PUT IndividualNSInstance Check HTTP Response Status Code Is 405 - Check Postcondition NS Instance is not modified PATCH Individual NSInstance - Method not implemented [Documentation] Test ID: 5.3.2.2.4 @@ -55,10 +53,9 @@ PATCH Individual NSInstance - Method not implemented ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Check Postcondition NS Instance is not modified + ... Post-Conditions: none PATCH IndividualNSInstance Check HTTP Response Status Code Is 405 - Check Postcondition NS Instance is not modified DELETE Individual NSInstance [Documentation] Test ID: 5.3.2.2.5 @@ -85,4 +82,4 @@ DELETE Individual NSInstance Conflict DELETE IndividualNSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Check Postcondition NS Instance is not deleted + Check Postcondition NS Instance is not deleted \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot b/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot index fd9eeea9..b0e32dba 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot @@ -15,7 +15,7 @@ Post Individual NS LCM occurrences - Method not implemented ... Reference: Clause 6.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not created in the NFVO + ... Post-Conditions: none POST Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 405 @@ -40,7 +40,7 @@ PUT status information about Individual NS LCM occurrences - Method not implemen ... Reference: Clause 6.4.10.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified from the NFVO + ... Post-Conditions: none PUT Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 405 @@ -52,7 +52,7 @@ PATCH status information about Individual NS LCM occurrences - Method not implem ... Reference: Clause 6.4.10.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified from the NFVO + ... Post-Conditions: none PATCH Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 405 @@ -64,11 +64,6 @@ DELETE status information about Individual NS LCM occurrences - Method not imple ... Reference: Clause 6.4.10.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted from the NFVO + ... Post-Conditions: none DELETE Individual NS LCM OP Occurrence - Check HTTP Response Status Code Is 405 - - - - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot b/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot index 64105600..44191a80 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot @@ -17,7 +17,7 @@ POST Individual Subscription - Method not implemented ... Reference: Clause 6.4.17.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management subscription is not created on the NFVO + ... Post-Conditions: none POST Individual Subscription Check HTTP Response Status Code Is 405 @@ -42,7 +42,7 @@ PUT an individual subscription - Method not implemented ... Reference: Clause 6.4.17.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management subscription is not modified by the operation + ... Post-Conditions: none PUT Individual Subscription Check HTTP Response Status Code Is 405 @@ -54,7 +54,7 @@ PATCH an individual subscription - Method not implemented ... Reference: Clause 6.4.17.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management subscription is not modified by the operation + ... Post-Conditions: none PATCH Individual Subscription Check HTTP Response Status Code Is 405 diff --git a/SOL005/NSLifecycleManagement-API/NSInstances.robot b/SOL005/NSLifecycleManagement-API/NSInstances.robot index e7683755..8c662bca 100644 --- a/SOL005/NSLifecycleManagement-API/NSInstances.robot +++ b/SOL005/NSLifecycleManagement-API/NSInstances.robot @@ -11,7 +11,7 @@ POST Create a new NsInstance [Documentation] Test ID: 5.3.2.1.1 ... Test title: POST Create a new NsInstance ... Test objective: The objective is to test the creation of a new Ns Instances and perform a JSON schema validation of the collected instance data structure - ... Pre-conditions: None. + ... Pre-conditions: none. ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. @@ -59,15 +59,16 @@ GET information about multiple NS instances Bad Request Invalid attribute select GET NsInstance Invalid Attribute Selector Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails + GET NSInstances with "all_fields" attribute selector [Documentation] Test ID: 5.3.2.1.5 ... Test title: GET NSInstances with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -76,11 +77,11 @@ GET NSInstances with "exclude_default" attribute selector [Documentation] Test ID: 5.3.2.1.6 ... Test title: GET NSInstances with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -89,11 +90,11 @@ GET NSInstances with "fields" attribute selector [Documentation] Test ID: 5.3.2.1.7 ... Test title: GET NSInstances with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -102,11 +103,11 @@ GET NSInstances with "exclude_fields" attribute selector [Documentation] Test ID: 5.3.2.1.8 ... Test title: GET NSInstances with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: + ... Pre-conditions: none ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -119,7 +120,7 @@ PUT NSInstances - Method not implemented ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified by the operation + ... Post-Conditions: none PUT NSInstances Check HTTP Response Status Code Is 405 @@ -131,7 +132,7 @@ PATCH NSInstances - Method not implemented ... Reference: Clause 6.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified by the operation + ... Post-Conditions: none PATCH NSInstances Check HTTP Response Status Code Is 405 @@ -143,7 +144,7 @@ DELETE NSInstances - Method not implemented ... Reference: Clause 6.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted by the operation + ... Post-Conditions: none DELETE NSInstances Check HTTP Response Status Code Is 405 @@ -171,4 +172,17 @@ GET information about multiple NS instances - Bad Request Response too Big ... Post-Conditions: none. GET NsInstances 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 + +GET NSInstances with "fields" and "exclude_default" attribute selector + [Documentation] Test ID: 5.3.2.1.14 + ... Test title: GET NSInstances with "fields" and "exclude_default" attribute selector + ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector list and exclude_default + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSInstances with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NsInstances \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot b/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot index 1c434a16..2ba76b8f 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot @@ -170,4 +170,17 @@ GET status information about multiple NS LCM occurrences - Bad Request Response ... Post-Conditions: none GET NS LCM OP Occurrences 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 + +GET status information about multiple NS LCM occurrences with "fields" and "exclude_default" + [Documentation] Test ID: 5.3.2.8.14 + ... Test title: GET status information about multiple NS LCM occurrences with "fields" and "exclude_default" + ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS + ... Pre-conditions: At least one LCM occurrences available in the NFVO + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NS LCM OP Occurrences with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NsLcmOpOccs \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index b9d4fc36..b871442b 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -173,13 +173,6 @@ Check resource existence Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 200 -Check Postcondition NS Instance is not created - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nonExistentNsId} - Integer response status 404 - Check HTTP Response Status Code Is [Arguments] ${expected_status} Log Validate Status code @@ -193,13 +186,6 @@ Check Postcondition NS Instance is deleted Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${disabledNsdId} Integer response status 404 -Check Postcondition NS Instance is not modified - GET IndividualNSInstance - ${resp_dict}= evaluate json.loads('''${response['body']}''') json - ${template}= Get File jsons/CreateNsRequest.json - ${body}= Format String ${template} nsdId=${nsdId} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} - Dictionaries Should Be Equal ${resp_dict} ${body} values=True - Check HTTP Response Header Contains [Arguments] ${HEADER_TOCHECK} Should Contain ${response['headers']} ${HEADER_TOCHECK} @@ -294,6 +280,13 @@ Get NSInstances with fields attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=${fields} ${output}= Output response + Set Suite Variable ${response} ${output} +Get NSInstances with fields and exclude_default attribute selector + Log Get the list of NSInstances, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=${fields}&exclude_default + ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with exclude_fields attribute selector Log Get the list of NSInstances, using fields @@ -684,6 +677,13 @@ Get NS LCM OP Occurrences with fields attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?fields=${fields} ${output}= Output response + Set Suite Variable ${response} ${output} +Get NS LCM OP Occurrences with fields and exclude_default attribute selector + Log Query status information about multiple NS lifecycle management operation occurrences, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?fields=${fields}&exclude_default + ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with exclude_fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot index 942c4748..5f5ad895 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot @@ -55,7 +55,7 @@ PUT Terminate NSInstance - Method not implemented ... Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resource state not modified + ... Post-Conditions: none PUT Terminate NSInstance Check HTTP Response Status Code Is 405 @@ -67,7 +67,7 @@ PATCH Terminate NSInstance - Method not implemented ... Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resource state not modified + ... Post-Conditions: none PATCH Terminate NSInstance Check HTTP Response Status Code Is 405 @@ -79,8 +79,6 @@ DELETE Terminate NSInstance - Method not implemented ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resource state not modified + ... Post-Conditions: none DELETE Terminate NSInstance - Check HTTP Response Status Code Is 405 - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot index 171fac57..eafae6ae 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot @@ -54,7 +54,7 @@ PUT Update NSInstance - Method not implemented ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not updated on the NFVO + ... Post-Conditions: none PUT Update NSInstance Check HTTP Response Status Code Is 405 @@ -66,7 +66,7 @@ PATCH Update NSInstance - Method not implemented ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not updated on the NFVO + ... Post-Conditions: none PATCH Update NSInstance Check HTTP Response Status Code Is 405 @@ -78,8 +78,6 @@ DELETE Update NSInstance - Method not implemented ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted on the NFVO + ... Post-Conditions: none DELETE Update NSInstance - Check HTTP Response Status Code Is 405 - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file -- GitLab