Subscriptions.robot 9.42 KB
Newer Older
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
*** Settings ***
Resource    environment/configuration.txt
Resource    environment/variables.txt     
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}     ssl_verify=false
Library    OperatingSystem
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
Resource    VnfLcmMntOperationKeywords.robot
Library           Process
Suite Setup       Create Sessions
Suite Teardown    Terminate All Processes    kill=true
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

*** Test Cases ***
POST Create a new subscription
    [Documentation]    Test ID: 7.3.1.17.1
    ...    Test title: POST Create a new subscription
    ...    Test objective: The POST method creates a new subscription
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: in response header Location shall not be null
    Post Create subscription
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    Subscription
root's avatar
root committed
    
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
Create a new Subscription - DUPLICATION
    [Documentation]    Test ID: 7.3.1.17.2
    ...    Test title: POST Create a new subscription - DUPLICATION
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Test objective: The objective is to test request to create a duplicate (same cakkbackurl and filter) subscription
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
root's avatar
root committed
    ...    Applicability: duplication is supported by SUT
    ...    Post-Conditions: in response header Location shall not be null
    Post Create subscription - DUPLICATION
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    Subscription
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

Create a new Subscription - NO-DUPLICATION
    [Documentation]    Test ID: 7.3.1.17.3
    ...    Test title: POST Create a new subscription - NO-DUPLICATION
Najam UI Hassan's avatar
Najam UI Hassan committed
    ...    Test objective: The objective is to test the request that does not create a duplicate (same callbackurl and filter) subscription
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
root's avatar
root committed
    ...    Applicability: duplication is not supported by SUT
    ...    Post-Conditions: in response header Location shall not be null
    Post Create subscription - NO-DUPLICATION
    Check HTTP Response Status Code Is    303
aureliano sinatra's avatar
aureliano sinatra committed
    Check Operation Occurrence Id existence
mengxuan.zhao's avatar
upd
mengxuan.zhao committed
GET Subscriptions
     [Documentation]    Test ID: 7.3.1.17.4
    ...    Test title: GET Subscriptions
    ...    Test objective: The objective is Get the list of active subscriptions
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get subscriptions
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    Subscriptions
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

GET Subscription - Filter
    [Documentation]    Test ID: 7.3.1.17.5
    ...    Test title: GET Subscriptions - Filter
    ...    Test objective: The objective is Get the list of active subscriptions using a filter
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get subscriptions - filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    Subscriptions
aureliano sinatra's avatar
aureliano sinatra committed

mengxuan.zhao's avatar
upd
mengxuan.zhao committed
    
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
    [Documentation]    Test ID: 7.3.1.17.6
    ...    Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Test objective: The objective is Get the list of active subscriptions using an invalid filter
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get subscriptions - invalid filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET subscriptions with all_fields attribute selector
     [Documentation]    Test ID: 7.3.1.17.7
    ...    Test title: GET subscriptions with all_fields attribute selector
    ...    Test objective: The objective is Get the list of active subscriptions
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    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

GET subscriptions with exclude_default attribute selector
     [Documentation]    Test ID: 7.3.1.17.8
    ...    Test title: GET subscriptions with exclude_default attribute selector
    ...    Test objective: The objective is Get the list of active subscriptions
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    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

GET subscriptions with fields attribute selector
     [Documentation]    Test ID: 7.3.1.17.9
    ...    Test title: GET subscriptions with fields attribute selector
    ...    Test objective: The objective is Get the list of active subscriptions
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    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

GET subscriptions with exclude_fields attribute selector
     [Documentation]    Test ID: 7.3.1.17.10
    ...    Test title: GET subscriptions with exclude_fields attribute selector
    ...    Test objective: The objective is Get the list of active subscriptions
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    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

mengxuan.zhao's avatar
upd
mengxuan.zhao committed
PUT subscriptions - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.17.11
    ...    Test title: PUT subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    PUT subscriptions
	Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

PATCH subscriptions - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.17.12
    ...    Test title: PATCH subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Post-Conditions: subscription not modified
    PATCH subscriptions
	Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
upd
mengxuan.zhao committed

DELETE subscriptions - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
    [Documentation]    Test ID: 7.3.1.17.13
    ...    Test title: DELETE subscriptions - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
aureliano sinatra's avatar
aureliano sinatra committed
    ...    Post-Conditions: subscription not deleted
    DELETE subscriptions
	Check HTTP Response Status Code Is    405
root's avatar
root committed
    
GET Subscriptions as a Paged Response
     [Documentation]    Test ID: 7.3.1.17.14
    ...    Test title: GET Subscriptions as a Paged Response
    ...    Test objective: The objective is Get the list of active subscriptions as a Paged Response.
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get subscriptions
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    
GET subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.1.17.15
    ...    Test title: GET subscriptions - Bad Request Response too Big
    ...    Test objective: The objective is to test that the retrieval of the list of active subscriptions fails because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
    ...    Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get subscriptions
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails