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

templating, minor bugs fix and new testcases added

parent 874406f9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ PUT Individual Logging Job - Method not implemented
    [Documentation]    Test ID: 8.3.4.2.4
    ...    Test title: PUT Individual Logging Job - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing Logging Job
    ...    Pre-conditions: Logging Job is already created.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.4.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -62,7 +62,7 @@ PATCH Individual Logging Job - Method not implemented
    [Documentation]    Test ID: 8.3.4.2.5
    ...    Test title: PATCH Individual Logging Job - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing new Logging Job
    ...    Pre-conditions: Logging Job is already created.
    ...    Pre-conditions: none
    ...    Reference: clause 6.5.4.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
+4 −4
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ POST Individual Log Report - Method not implemented
    [Documentation]    Test ID: 8.3.4.3.1
    ...    Test title: POST Individual Log Report - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new log report.
    ...    Pre-conditions: Logging Job is already created.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.5.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -61,7 +61,7 @@ PUT Individual Log Report - Method not implemented
    [Documentation]    Test ID: 8.3.4.3.5
    ...    Test title: PUT Individual Log Report - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing log report.
    ...    Pre-conditions: One or more log reports are set.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.5.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -73,7 +73,7 @@ PATCH Individual Log Report - Method not implemented
    [Documentation]    Test ID: 8.3.4.3.6
    ...    Test title: PATCH Individual Log Report - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existinglog report.
    ...    Pre-conditions: One or more log reports are set.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.5.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -85,7 +85,7 @@ DELETE Individual Log Report - Method not implemented
    [Documentation]    Test ID: 8.3.4.3.7
    ...    Test title: DELETE Individual Log Report - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete an existing log report.
    ...    Pre-conditions: One or more log reports are set.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.5.3.5 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
+3 −3
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ POST Individual Subscription - Method not implemented
    [Documentation]    Test ID: 8.3.4.6.5
    ...    Test title: POST Individual Subscription - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new Subscription
    ...    Pre-conditions:
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.8.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -74,7 +74,7 @@ PUT Individual Subscription - Method not implemented
    [Documentation]    Test ID: 8.3.4.6.6
    ...    Test title: PUT Individual Subscription - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to update an existing subscription
    ...    Pre-conditions: At least one subscription is available in the NFV-MANO.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.8.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -86,7 +86,7 @@ PATCH Individual Subscription - Method not implemented
    [Documentation]    Test ID: 8.3.4.6.7
    ...    Test title: PATCH Individual Subscription - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify an existing subscription
    ...    Pre-conditions: At least one subscription is available in the NFV-MANO.
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.8.3.4 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
+24 −11
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ GET Logging jobs - Bad Request Response too Big
GET information about logging jobs with attribute-based filter
    [Documentation]    Test ID: 8.3.4.1.6
    ...    Test title: GET information about logging jobs with attribute-based filter
    ...    Test objective: The objective is to retrieve information about the logging jobs with attribute filters
    ...    Test objective: The objective is to retrieve information about the logging jobs with attribute filters, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one logging job is created.
    ...    Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -90,7 +90,7 @@ GET information about logging jobs with attribute-based filter
GET information about logging jobs with "all_fields" attribute selector
    [Documentation]    Test ID: 8.3.4.1.7
    ...    Test title: GET information about logging jobs with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about logging jobs with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about logging jobs with "all_fields" attribute selector, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one logging job is created.
    ...    Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -103,7 +103,7 @@ GET information about logging jobs with "all_fields" attribute selector
GET information about Logging Jobs with "exclude_default" attribute selector
    [Documentation]    Test ID: 8.3.4.1.8
    ...    Test title: GET information about Logging Jobs with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve information about logging jobs with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve information about logging jobs with "exclude_default" attribute selector, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one logging job is created.
    ...    Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -117,7 +117,7 @@ GET information about Logging Jobs with "exclude_default" attribute selector
GET information about Logging Jobs with "fields" attribute selector
    [Documentation]    Test ID: 8.3.4.1.9
    ...    Test title: GET information about Logging Jobs with fields attribute selector
    ...    Test objective: The objective is to retrieve information about Logging Jobs with fields attribute selector
    ...    Test objective: The objective is to retrieve information about Logging Jobs with fields attribute selector, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one logging job is created.
    ...    Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -130,7 +130,7 @@ GET information about Logging Jobs with "fields" attribute selector
GET information about Logging Jobs with "exclude_fields" attribute selector
    [Documentation]    Test ID: 8.3.4.1.10
    ...    Test title: GET information about Logging Jobs with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the Logging Jobs with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the Logging Jobs with "exclude_fields" attribute selector, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one logging job is created.
    ...    Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
@@ -140,8 +140,21 @@ GET information about Logging Jobs with "exclude_fields" attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    LoggingJobs
    
GET information about Logging Jobs with Paged Response
GET information about Logging Jobs with "fields" and "exclude_default" attribute selector
    [Documentation]    Test ID: 8.3.4.1.11
    ...    Test title: GET information about Logging Jobs with fields and exclude_default attribute selector
    ...    Test objective: The objective is to retrieve information about Logging Jobs with fields and exclude_default attribute selector, and perform the JSON schema validation of the failed operation HTTP response.
    ...    Pre-conditions: At least one logging job is created.
    ...    Reference: clause 8.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Logging Jobs with fields and exclude_default attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    LoggingJobs
    
GET information about Logging Jobs with Paged Response
    [Documentation]    Test ID: 8.3.4.1.12
    ...    Test title: GET information about Logging Jobs with Paged Response
    ...    Test objective: The objective is to query information about Logging Jobs to get Paged Response.
    ...    Pre-conditions:  At least one logging job is created.
@@ -154,10 +167,10 @@ GET information about Logging Jobs with Paged Response
    Check HTTP Response Header Contains Link
    
PUT Logging Jobs - Method not implemented
    [Documentation]    Test ID: 8.3.4.1.12
    [Documentation]    Test ID: 8.3.4.1.13
    ...    Test title: PUT Logging Jobs - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: 
    ...    Pre-conditions: none
    ...    Reference: clause 8.5.3.3.3 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
@@ -166,7 +179,7 @@ PUT Logging Jobs - Method not implemented
    Check HTTP Response Status Code Is    405

PATCH Logging Jobs - Method not implemented
    [Documentation]    Test ID: 8.3.4.1.13
    [Documentation]    Test ID: 8.3.4.1.14
    ...    Test title: PATCH Logging Jobs - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
@@ -178,7 +191,7 @@ PATCH Logging Jobs - Method not implemented
    Check HTTP Response Status Code Is    405

DELETE Logging Jobs - Method not implemented
    [Documentation]    Test ID: 8.3.4.1.14
    [Documentation]    Test ID: 8.3.4.1.15
    ...    Test title: DELETE Logging Jobs - Method not implemented
    ...    Test objective: The objective is to test that the method is not implemented
    ...    Pre-conditions: none
+24 −10
Original line number Diff line number Diff line
*** Settings ***
Library    String
Resource   environment/variables.txt
Library    REST    ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT}    ssl_verify=false
Library    MockServerLibrary 
@@ -100,6 +101,14 @@ GET Logging Jobs with fields attribute selector
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
GET Logging Jobs with fields and exclude_default attribute selector
    Log    Queries information about Logging Jobs, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs?exclude_default&fields=${fields}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
GET Logging Jobs with exclude_fields attribute selector
    Log    Query NFV-MANO The GET method queries information about multiple alarms, using fields
    Set Headers    {"Accept": "${ACCEPT_JSON}"}
@@ -261,7 +270,8 @@ Send Log data Request in Synchronous mode
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/compileLogRequest.json
    ${template}=    Get File    jsons/compileLogRequest.json
    ${body}=        Format String   ${template}     objectInstanceId=${objectInstanceId} 
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log    ${body}
    ${body}=    Output    response
    Set Suite Variable    &{response}    ${body}
@@ -276,7 +286,8 @@ Send Log data Request in Asynchronous mode
    Set Headers    {"Accept": "${ACCEPT}"}
    Set Headers    {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body}=    Get File    jsons/compileLogRequest.json
    ${template}=    Get File    jsons/compileLogRequest.json
    ${body}=        Format String   ${template}     objectInstanceId=${objectInstanceId}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log    ${body}
    ${body}=    Output    response
    Set Suite Variable    &{response}    ${body}
@@ -299,7 +310,8 @@ Send Log data Request
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/createLoggingJobRequest.json
    ${template}=    Get File    jsons/createLoggingJobRequest.json
    ${body}=        Format String   ${template}     objectInstanceId=${objectInstanceId}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/log_jobs/${logJobId}/compile_log    ${body}
    ${outputResponse}=    Output    response
	Set Global Variable    @{response}    ${outputResponse}
@@ -351,7 +363,6 @@ Check Notification Endpoint
    Wait Until Keyword Succeeds    ${total_polling_time}   ${polling_interval}   Verify Mock Expectation    ${notification_request}
    Clear Requests  ${callback_endpoint}

    
Get all Subscriptions
    [Documentation]    The api consumer can use this method to query the list of active subscriptions to log management notifications
    Set headers    {"Accept": "application/json"}
@@ -381,14 +392,16 @@ Send Post Request for Subscription
    Set headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": ${AUTHORIZATION}"}
    ${body_request}=    Get File    jsons/subscriptions.json
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body_request}
    ${template}=    Get File    jsons/subscriptions.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Check HTTP Response Body LogmSubscription Attributes Values Match the Issued Subscription
    Log    Check Response matches subscription
    ${body}=    Get File    jsons/subscriptions.json
    ${template}=    Get File    jsons/subscriptions.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    ${subscription}=    evaluate    json.loads('''${body}''')    json
    Should Be Equal As Strings    ${response['body']['callbackUri']}    ${subscription['callbackUri']}

@@ -404,8 +417,9 @@ Send Post Request for Duplicated Subscription
    Set headers    {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Set headers    {"Accept": "${ACCEPT_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization": "${AUTHORIZATION}"}
    ${body_request}=    Get File    jsons/subscriptions.json
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body_request}
    ${template}=    Get File    jsons/subscriptions.json
    ${body}=        Format String   ${template}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    POST    ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}  
    
Loading