Commit 871e9680 authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

templating, minor fix and new testcases added

parent e7218e57
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ Library JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    OperatingSystem


*** Test Cases ***
POST Alarms - Method not implemented
     [Documentation]    Test ID: 7.3.5.1.1
@@ -64,11 +63,11 @@ GET information about multiple alarms with "all_fields" attribute selector
    [Documentation]    Test ID: 7.3.5.1.5
    ...    Test title: GET information about multiple alarms with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Alarms Task with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms
@@ -77,11 +76,11 @@ GET information about multiple alarms with exclude_default attribute selector
    [Documentation]    Test ID: 7.3.5.1.6
    ...    Test title: GET information about multiple alarms with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
    ...    Pre-conditions: none
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Alarms Task with exclude_default attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms
@@ -90,11 +89,11 @@ GET information about multiple alarms with fields attribute selector
    [Documentation]    Test ID: 7.3.5.1.7
    ...    Test title: GET information about multiple alarms with fields attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Post-Conditions: 
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Alarms Task with fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    alarms
@@ -103,10 +102,10 @@ GET information about multiple alarms with "exclude_fields" attribute selector
    [Documentation]    Test ID: 7.3.5.1.8
    ...    Test title: GET information about multiple alarms with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve information about the alarm list
    ...    Pre-conditions: 
    ...    Pre-conditions: none 
    ...    Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: 
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Alarms Task with exclude_fields attribute selector
    Check HTTP Response Status Code Is    200
@@ -147,7 +146,6 @@ DELETE Alarms - Method not implemented
    ...    Post-Conditions:  none
    DELETE Fault management Alarms
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF fault management alarms Exists
    
Get information about multiple alarms as a Paged Response
    [Documentation]    Test ID: 7.3.5.1.12
@@ -160,7 +158,7 @@ Get information about multiple alarms as a Paged Response
    ...    Post-Conditions: none
    GET Fault Management Alarms
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    Check HTTP Response Header Contain Link
    
Get information about multiple alarms - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.5.1.13
+11 −13
Original line number Diff line number Diff line
*** Settings ***
Library    String
Resource   environment/variables.txt
Library    REST     ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
Library    JSONLibrary
@@ -27,13 +28,8 @@ Check Postcondition FaultManagement Subscription Is Set
Check Operation Occurrence Id
    ${opOccId}=    Get Value From Json    ${response['headers']}    $..Location
    Should Not Be Empty    ${opOccId}
Check Postcondition VNF fault management alarms Exists
    Log    Checking that alarms exists
    GET Fault Management Alarms
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    Alarms

Check Postcondition VNF fault management individual alarm Exists
Check Precondition VNF fault management individual alarm Exists
    Log    Checking that individual alarm exists
    GET Fault Management Individual Alarm
    Check HTTP Response Status Code Is    200
@@ -254,13 +250,13 @@ PATCH Fault Management Individual Alarm Conflict
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
       
    
POST Subscription
    Log    Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}    vnfdIds=${vnfdIds}      callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
@@ -271,7 +267,8 @@ Send POST Request for duplicated subscription
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}    vnfdIds=${vnfdIds}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
@@ -282,7 +279,8 @@ Send POST Request for duplicated subscription not permitted
    Set Headers  {"Accept":"${ACCEPT}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"}
    ${body}=    Get File    jsons/fmSubscriptionRequest.json
    ${template}=    Get File    jsons/fmSubscriptionRequest.json
    ${body}=        Format String   ${template}    vnfdIds=${vnfdIds}     callback_uri=${callback_uri}    callback_endpoint=${callback_endpoint}
    Post    ${apiRoot}/${apiName}/${apiVersion}/subscriptions    ${body}
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
@@ -402,7 +400,7 @@ DELETE Individual Subscription
    ${outputResponse}=    Output    response
    Set Global Variable    ${response}    ${outputResponse}
    
Check LINK in Header
Check HTTP Response Header Contain Link
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
    
+17 −7
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@ Library JSONLibrary
Library    JSONSchemaLibrary    schemas/
Library    DependencyLibrary



*** Test Cases ***
POST Alarm - Method not implemented
     [Documentation]    Test ID: 7.3.5.2.1
@@ -57,7 +55,7 @@ PATCH Fault Management Individual Alarm
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Check Postcondition VNF fault management individual alarm Exists
    Check Precondition VNF fault management individual alarm Exists
    PATCH Fault Management Individual Alarm
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is  alarmModification
@@ -71,7 +69,7 @@ Modify an individual alarm resource - Precondition failed
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Check Postcondition VNF fault management individual alarm Exists  
    Check Precondition VNF fault management individual alarm Exists  
    PATCH Fault Management Individual Alarm - precondition failed
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is  ProblemDetails
@@ -86,7 +84,7 @@ Modify an individual alarm resource - Conflict
    ...    Applicability: none
    ...    Post-Conditions: none
    Depends On Test    PATCH Fault Management Individual Alarm
    Check Postcondition VNF fault management individual alarm Exists
    Check Precondition VNF fault management individual alarm Exists
    PATCH Fault Management Individual Alarm Conflict
    Check HTTP Response Status Code Is    412
    Check HTTP Response Body Json Schema Is     ProblemDetails
@@ -99,7 +97,19 @@ DELETE Alarm - Method not implemented
    ...    Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  The individual alarm still exists 
    ...    Post-Conditions:  none
    DELETE Fault Management Individual Alarm
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF fault management individual alarm Exists
 No newline at end of file
    
Get information about an fault management individual alarm - Not Found
    [Documentation]    Test ID: 7.3.5.2.8
    ...    Test title: Get information about an fault management individual alarm - Not Found
    ...    Test objective: The objective is to test that retrieval of information about an individual alarm fails when individual alarm is not present
    ...    Pre-conditions: The related alarm does not exists
    ...    Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  none 
    GET Fault Management Individual Alarm
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is    ProblemDetails
 No newline at end of file
+14 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ Post Individual Subscription - Method not implemented
    ...    Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  none
    ...    Post-Conditions:  subscription is not created
    ...    Post-Conditions:  none
    POST Individual Subscription
    Check HTTP Response Status Code Is    405

@@ -67,3 +67,16 @@ DELETE an individual subscription
    DELETE Individual Subscription
    Check HTTP Response Status Code Is    204
    Check Individual Subscription deleted

Get Information about an individual subscription - Not Found
    [Documentation]    Test ID: 7.3.5.4.6
    ...    Test title: Get Information about an individual subscription - Not Found
    ...    Test objective: The objective is to test that the retrieval of an individual subscription for NFVO alarms subscribed by the client fails when subscription is not present
    ...    Pre-conditions: The subscription with the given id does not exists
    ...   Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1
    ...    Config ID: Config_prod_VNFM
    ...    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
+1 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ Create a new Fault Management alarm subscription
    Check HTTP Response Body Json Schema Is  FmSubscription
    Check created Subscription existence 
  

Create a new alarm subscription - DUPLICATION
     [Documentation]    Test ID: 7.3.5.3.2
    ...    Test title: Create a new alarm subscription - DUPLICATION
@@ -191,7 +190,7 @@ Retrieve a list of alarm subscriptions as Paged Response
    ...    Post-Conditions: noe
    GET Subscriptions
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    Check HTTP Response Header Contain Link
    
GET subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.5.3.15
Loading