Commit b3a54087 authored by Najam UI Hassan's avatar Najam UI Hassan Committed by Giacomo Bernini
Browse files

minor bugs fixed and redundant post-conditions removed

parent e7529d2a
Loading
Loading
Loading
Loading
+4 −25
Original line number Diff line number Diff line
@@ -14,15 +14,14 @@ POST Individual NFV-MANO Performance Job - Method not implemented
    ...    Reference: clause 6.5.4.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO Performance Job is not created on the NFV-MANO
    ...    Post-Conditions: none
    Send Post request for individual NFV-MANO Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Performance Job is not Created
    
GET individual NFV-MANO Performance Job
    [Documentation]    Test ID: 8.3.2.2.2
    ...    Test title: Get individual NFV-MANO Performance Job
    ...    Test objective: The objective is to test the retrieval of an individual performance monitoring job and perform a JSON schema and content validation of the collected job data structure
    ...    Test objective: The objective is to test the retrieval of an individual performance monitoring job and perform a JSON schema validation of the collected job data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated.
    ...    Reference: clause 6.5.4.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -54,10 +53,9 @@ PUT Individual NFV-MANO Performance Job - Method not implemented
    ...    Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO Performance Job is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for individual NFV-MANO Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Performance Job is Unmodified (Implicit)

PATCH Individual NFV-MANO Performance Job - Method not implemented
    [Documentation]    Test ID: 8.3.2.2.5
@@ -67,10 +65,9 @@ PATCH Individual NFV-MANO Performance Job - Method not implemented
    ...    Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO Performance Job is not modified by the operation
    ...    Post-Conditions: none
    Send Patch request for individual NFV-MANO Performance Job
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Performance Job is Unmodified (Implicit)

DELETE Individual NFV-MANO Performance Job
    [Documentation]    Test ID: 8.3.2.2.6
@@ -157,24 +154,6 @@ Send Patch request for individual NFV-MANO Performance Job
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check Postcondition NFV-MANO Performance Job is not Created
    Log    Trying to get a new Pm Job
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    404

Check Postcondition NFV-MANO Performance Job is Unmodified (Implicit)
    Log    Check Postcondition NFV-MANO PM job is not modified
    GET individual NFV-MANO Performance Job
    Log    Check Response matches original NFV-MANO Pm Job
    ${pmJob}=    evaluate    json.loads('''${response['body']}''')    json
    Should Be Equal    ${origresponse['body']['id']}    ${pmJob.id}
    Should Be Equal    ${origresponse['body']['criteria']}    ${pmJob.criteria}
    Should Be Equal    ${origresponse['body']['_links']}    ${pmJob._links}

Check Postcondition NFV-MANO Pm Job is Deleted
    Log    Check Postcondition
    GET individual NFV-MANO Performance Job
+4 −28
Original line number Diff line number Diff line
@@ -14,10 +14,9 @@ POST Individual Performance Report - Method not implemented
    ...    Reference: clause 6.5.5.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO performance report is not created.
    ...    Post-Conditions: none
    Send Post request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Individual Performance Report is not Created
    
Get Individual Performance Report
    [Documentation]    Test ID: 8.3.2.3.2
@@ -52,10 +51,9 @@ PUT Individual Performance Report - Method not implemented
    ...    Reference: clause 6.5.5.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO performance report is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Individual Performance Report is Unmodified (Implicit)

PATCH Individual Performance Report - Method not implemented
    [Documentation]    Test ID: 8.3.2.3.5
@@ -65,10 +63,9 @@ PATCH Individual Performance Report - Method not implemented
    ...    Reference: clause 6.5.5.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO performance report is not modified by the operation
    ...    Post-Conditions: none
    Send Patch request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Individual Performance Report is Unmodified (Implicit)

DELETE Individual Performance Report - Method not implemented
    [Documentation]    Test ID: 8.3.2.3.6
@@ -78,10 +75,9 @@ DELETE Individual Performance Report - Method not implemented
    ...    Reference: clause 6.5.5.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANOM
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO performance report is not deleted by the operation
    ...    Post-Conditions: none
    Send Delete request for Individual Performance Report
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Individual Performance Report Exists

*** Keywords ***
Get Individual Performance Report
@@ -134,26 +130,6 @@ Send Delete request for Individual Performance Report
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check Postcondition NFV-MANO Individual Performance Report Exists
    Log    Checking that report still exists
    Get Individual Performance Report

Check Postcondition NFV-MANO Individual Performance Report is not Created
    Log    Trying to get a new report
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    404

Check Postcondition NFV-MANO Individual Performance Report is Unmodified (Implicit)
    Log    Check Postcondition NFV-MANO PM job is not modified
    Get Individual Performance Report
    Log    Check Response matches original NFV-MANO report
    ${report}=    evaluate    json.loads('''${response['body']}''')    json
    Should Be Equal    ${origResponse['body']['entries'][0]['objectInstanceId']}    ${report['entries'][0]['objectInstanceId']}

Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}
    ${status}=    Convert To Integer    ${expected_status}    
+5 −25
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ Resource environment/individualSubscription.txt
GET Individual Performance Subscription
    [Documentation]    Test ID: 8.3.2.7.1
    ...    Test title: GET Individual Performance Subscription
    ...    Test objective: The objective is to test the retrieval of individual performance subscription and perform a JSON schema and content validation of the returned subscription data structure.
    ...    Test objective: The objective is to test the retrieval of individual performance subscription and perform a JSON schema validation of the returned subscription data structure.
    ...    Pre-conditions: An instance is instantiated. At least one performance subscription is available in the NFV-MANO.
    ...    Reference: clause 6.5.9.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -66,10 +66,9 @@ POST Individual Performance Subscription - Method not implemented
    ...    Reference: clause 6.5.9.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The Performance Subscription is not created on the NFV-MANO
    ...    Post-Conditions: none
    Send Post request for individual Performance Subscription
    Check HTTP Response Status Code Is    405
    Check Postcondition Performance Subscription is not Created

PUT Individual Performance Subscription - Method not implemented
    [Documentation]    Test ID: 8.3.2.7.6
@@ -79,10 +78,9 @@ PUT Individual Performance Subscription - Method not implemented
    ...    Reference: clause 6.5.9.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The Performance subscription is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for individual Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition Performance Subscription is Unmodified (Implicit)

PATCH Individual Performance Subscription - Method not implemented
    [Documentation]    Test ID: 8.3.2.7.7
@@ -92,10 +90,9 @@ PATCH Individual Performance Subscription - Method not implemented
    ...    Reference: clause 6.5.9.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The Performance subscription is not modified by the operation
    ...    Post-Conditions: none
    Send Patch request for individual Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition Performance Subscription is Unmodified (Implicit)

*** Keywords ***
Check HTTP Response Status Code Is
@@ -154,15 +151,6 @@ Send Post request for individual Performance Subscription
    ${output}=    Output    response
    Set Suite Variable    @{response}    ${output}
    
Check Postcondition Performance Subscription is not Created
    Log    Trying to get a new subscription
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId}
    ${output}=    Output    response
    Set Suite Variable    @{response}    ${output}
    Check HTTP Response Status Code Is    404
    
Send Put request for individual Performance Threshold
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": ${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
@@ -180,11 +168,3 @@ Send Patch request for individual Performance Threshold
    PATCH    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
    ${output}=    Output    response
    Set Suite Variable    @{response}    ${output}
 No newline at end of file

Check Postcondition Performance Subscription is Unmodified (Implicit)
    Log    Check postconidtion subscription not modified
    GET individual Performance Subscription
    Log    Check Response matches original Subscription
    ${subscription}=    evaluate    json.loads('''${response['body']}''')    json
    Should Be Equal As Strings    ${origResponse['body']['id']}    ${subscription.id}
    Should Be Equal As Strings    ${origResponse['body']['callbackUri']}    ${subscription.callbackUri}
 No newline at end of file
+3 −23
Original line number Diff line number Diff line
@@ -15,10 +15,9 @@ POST Individual Threshold - Method not implemented
    ...    Reference: clause 6.5.7.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The Performance Threshold is not created on the NFV-MANO
    ...    Post-Conditions: none
    Send Post request for individual Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition Performance Threshold is not Created
    
GET Individual Threshold
    [Documentation]    Test ID: 8.3.2.5.2
@@ -54,10 +53,9 @@ PUT Individual Threshold - Method not implemented
    ...    Reference: clause 6.5.7.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The Performance Threshold is not modified by the operation
    ...    Post-Conditions: none
    Send Put request for individual Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition Performance Threshold is Unmodified (Implicit)

PATCH Individual Threshold - Method not implemented
    [Documentation]    Test ID: 8.3.2.5.5
@@ -67,10 +65,9 @@ PATCH Individual Threshold - Method not implemented
    ...    Reference: clause 6.5.7.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The Performance Threshold is not modified by the operation
    ...    Post-Conditions: none
    Send Patch request for individual Performance Threshold
    Check HTTP Response Status Code Is    405
    Check Postcondition Performance Threshold is Unmodified (Implicit)
    
DELETE Individual Threshold
    [Documentation]    Test ID: 8.3.2.5.6
@@ -157,23 +154,6 @@ Send Patch request for individual Performance Threshold
    ${output}=    Output    response
    Set Suite Variable    @{response}    ${output}

Check Postcondition Performance Threshold is Unmodified (Implicit)
    Log    Check postconidtion threshold not modified
    GET individual Performance Threshold
    Log    Check Response matches original Threshold
    ${threshold}=    evaluate    json.loads('''${response['body']}''')    json
    Should Be Equal    ${origresponse['body']['id']}    ${threshold.id}
    Should Be Equal    ${origresponse['body']['criteria']}    ${threshold.criteria}
    
Check Postcondition Performance Threshold is not Created
    Log    Trying to get a new Threshold
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId}
    ${output}=    Output    response
    Set Suite Variable    @{response}    ${output}
    Check HTTP Response Status Code Is    404

Check Postcondition Performance Threshold is Deleted
    Log    Check Postcondition Threshold is deleted
    GET individual Performance Threshold
+4 −8
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector
    ...    Post-Conditions: none
    GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails
    
GET information about multiple Performance Monitoring Jobs to get Paged Response
    [Documentation]    Test ID: 8.3.2.1.10
@@ -137,7 +138,7 @@ GET information about multiple Performance Monitoring Jobs to get Paged Response
    ...    Post-Conditions:  none
    GET all NFV-MANO Performance Monitoring Jobs
    Check HTTP Response Status Code Is    200
    Check LINK in Header 
    Check HTTP Response Header Contains Link
    
GET information about multiple Performance Monitoring Jobs for Bad Request Response too big
    [Documentation]    Test ID: 8.3.2.1.11
@@ -175,7 +176,7 @@ Get information about multiple Performance Monitoring Jobs with malformed author
    ...    Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests.
    ...    Post-Conditions: none
    GET Performance Monitoring Jobs with malformed authorization token
    Check HTTP Response Status Code Is    400
    Check HTTP Response Status Code Is    401

Get information about multiple Performance Monitoring Jobs without authorization token
    [Documentation]    Test ID: 8.3.2.1.14
@@ -236,7 +237,6 @@ DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Post-Conditions: none
    Send DELETE Request for all NFV-MANO Performance Monitoring Jobs
    Check HTTP Response Status Code Is    405
    Check Postcondition NFV-MANO Performance Monitoring Jobs Exist
    
*** Keywords ***
GET all NFV-MANO Performance Monitoring Jobs
@@ -408,10 +408,6 @@ Check HTTP Response Body Json Schema Is
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
    
Check Postcondition NFV-MANO Performance Monitoring Jobs Exist
    Log    Checking that Pm Job still exists
    GET all NFV-MANO Performance Monitoring Jobs
    
Check LINK in Header
Check HTTP Response Header Contains Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
 No newline at end of file
Loading