Commit 355eab15 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

Merge branch '5.2.1-dev-SOL025' into '5.2.1-dev'

Merge 5.2.1-dev-SOL025 into 5.2.1-dev

See merge request !416
parents 1bd4b1cb a61ee810
Loading
Loading
Loading
Loading

SOL025/README.md

0 → 100644
+3 −0
Original line number Diff line number Diff line
# NFV API Tests

This folder includes the NFV API conformance test descriptions for NFV SOL025 APIs.
+236 −0
Original line number Diff line number Diff line
*** Settings ***
Resource    environment/variables.txt
Resource    DataAnalyticsOperationKeywords.robot
Library     REST    ${TCDAS_SCHEMA}://${TCDAS_HOST}:${TCDAS_PORT}    ssl_verify=false
Library     OperatingSystem
Library     JSONLibrary
Library     JSONSchemaLibrary    schemas/

*** Test Cases ***
POST Create a new data analytics
    [Documentation]    Test ID: 12.3.1.1.1
    ...    Test title: POST Create a new data analytics
    ...    Test objective: The objective is to create a new data analytics resource
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-conditions: A new data analytics resource is created
    POST Create a new data analytics
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    individualTelcoCloudAnalytics
    Check HTTP Response Header Contains    Location
    Check Postcondition Resource Returned in Location Header Is Available
POST Create a new data analytics - UNPROCESSABLE CONTENT
    [Documentation]    Test ID: 12.3.1.1.2
    ...    Test title: POST Create a new data analytics - UNPROCESSABLE CONTENT
    ...    Test objective: The objective is to test that a new data analytics resource is not created with invalid content
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Create a new data analytics with Invalid tcdaType	
    Check HTTP Response Status Code Is    422
    Check HTTP Response Body Json Schema Is    ProblemDetails

POST Create a new data analytics with permitted authorization scope
    [Documentation]    Test ID:  12.3.1.1.3
    ...    Test title: POST Create a new data analytics with permitted authorization scope
    ...    Test objective: The objective is to create a new data analytics resource with permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: A new data analytics resource is created
    POST Create a new data analytics with permitted authorization scope
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    individualTelcoCloudAnalytics
    Check HTTP Response Header Contains    Location
    Check Postcondition Resource Returned in Location Header Is Available
POST Create a new data analytics with not permitted authorization scope
    [Documentation]    Test ID: 12.3.1.1.4
    ...    Test title: POST Create a new data analytics with not permitted authorization scope
    ...    Test objective: The objective is to create a new data analytics resource with not permitted authorization scope
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Create a new data analytics with not permitted authorization scope
    Check HTTP Response Status Code Is    403
    Check HTTP Response Body Json Schema Is    ProblemDetails

POST Create a new data analytics - Unauthorized
    [Documentation]    Test ID: 12.3.1.1.5
    ...    Test title: POST Create a new data analytics - Unauthorized 
    ...    Test objective: The objective is to Create a new data analytics without authorization
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    POST Create a new data analytics - Unauthorized
    Check HTTP Response Status Code Is    401
    Check HTTP Response Body Json Schema Is    ProblemDetails

GET information about Analytics 
    [Documentation]    Test ID: 12.3.1.1.6
    ...    Test title: GET information about Analytics 
    ...    Test objective: The objective is to GET information about Analytics 
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics 
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    telcoCloudAnalytics

GET information about Analytics Bad Request Invalid attribute-based filtering parameters
    [Documentation]    Test ID: 12.3.1.1.7
    ...    Test title: GET information about Analytics Bad Request Invalid attribute-based filtering parameters
    ...    Test objective: The objective is to get information about Analytics with Invalid attribute-based filtering parameters
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics with bad attribute
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails

GET information about Analytics Bad Request Invalid attribute selector
    [Documentation]    Test ID: 12.3.1.1.8
    ...    Test title: GET information about Analytics Bad Request Invalid attribute selector
    ...    Test objective: The objective is to get information about Analytics with Invalid attribute-based filtering parameters
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics with bad filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails
GET information about Analytics with all_fields attribute selector
    [Documentation]    Test ID: 12.3.1.1.9
    ...    Test title: GET information about Analytics with "all_fields" attribute selector
    ...    Test objective: The objective is to query information about Analytics 
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    telcoCloudAnalytics
    Check Response should Contains    reports
GET information about Analytics with exclude_default attribute selector
    [Documentation]    Test ID: 12.3.1.1.10
    ...    Test title: GET information about Analytics with "exclude_default" attribute selector
    ...    Test objective: The objective is to query information about Analytics
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics with exclude_default attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    telcoCloudAnalytics
    Check Response should not Contains    reports

GET information about Analytics with fields attribute selector
    [Documentation]    Test ID: 12.3.1.1.11
    ...    Test title: GET information about Analytics with "fields" attribute selector
    ...    Test objective: The objective is to query information about Analytics
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics with fields attribute selector
    Check HTTP Response Status Code Is    200
    Validate Fields Selector Transformation    ${requested_fields} 
GET information about Analytics with exclude_fields attribute selector
    [Documentation]    Test ID: 12.3.1.1.12
    ...    Test title: GET information about Analytics with "exclude_fields" attribute selector
    ...    Test objective: The objective is to query information about Analytics
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET Analytics with exclude_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    telcoCloudAnalytics

GET information about Analytics to get Paged Response
    [Documentation]    Test ID: 12.3.1.1.13
    ...    Test title: GET information about Analytics to get Paged Response
    ...    Test objective: The objective is to query information about Analytics to get Paged Response
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: The Telco-cloud DAF supports response paging for the Analytics resources
    ...    Post-Conditions: none
    GET Analytics
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Contain Link to next page

GET information about Analytics as a Paged Response with nextpage_opauque_marker parameter 
    [Documentation]    Test ID: 12.3.1.1.13a
    ...    Test title: GET information about Analytics as a Paged Response with nextpage_opauque_marker parameter 
    ...    Test objective: The objective is to query information about Analytics as a Paged Response and retrieve the next page using the nextpage_opaque_marker parameter
    ...    Pre-conditions: A request for retrieving Analytics as a paged response has been successfully issued (Test ID 12.3.1.1.13)
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: The Telco-cloud DAF supports response paging for the Analytics resources
    ...    Post-Conditions: none 
    Get Analytics with nextpage_opaque_marker parameter 
    Check HTTP Response Status Code Is    200
GET information about Analytics - Bad Request Response too big
    [Documentation]    Test ID: 12.3.1.1.14
    ...    Test title: GET information about Analytics - Bad Request Response too big
    ...    Test objective: The objective is to test that GET method fail retrieving information about Analytics because Response is too big.
    ...    Pre-conditions: none
    ...    Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET Analytics
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
PUT Analytics - Method not implemented
    [Documentation]    Test ID: 12.3.1.1.15
    ...    Test title: PUT Analytics - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.3 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    PUT Analytics
    Check HTTP Response Status Code Is    405

PATCH Analytics - Method not implemented
    [Documentation]    Test ID: 12.3.1.1.16
    ...    Test title: PATCH Analytics - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.4 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    PATCH Analytics
    Check HTTP Response Status Code Is    405
DELETE Analytics - Method not implemented
    [Documentation]    Test ID: 12.3.1.1.17
    ...    Test title: DELETE Analytics - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions:  none
    ...    Reference: Clause 5.5.3.3.5 - ETSI GS NFV-SOL 025 [12] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none
    DELETE Analytics
    Check HTTP Response Status Code Is    405
 No newline at end of file
+214 −0
Original line number Diff line number Diff line
*** Settings ***
Resource    environment/variables.txt
Resource    DataAnalyticsOperationKeywords.robot
Library     REST
...         ${TCDAS_SCHEMA}://${TCDAS_HOST}:${TCDAS_PORT}
...         ssl_verify=false
Library     OperatingSystem
Library     JSONLibrary
Library     JSONSchemaLibrary    schemas/

*** Test Cases ***
POST API Version - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.1
    ...    Test title: POST API version - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none    
    POST API Version
	Check HTTP Response Status Code Is    405
    
GET API Version
    [Documentation]    Test ID: 12.3.1.8.2
    ...    Test title: GET API Version
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET API Version
	Check HTTP Response Status Code Is    200
	Check HTTP Response Body Json Schema Is    ApiVersionInformation

PUT API Version - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.3
    ...    Test title: PUT API Version - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT API Version
	Check HTTP Response Status Code Is    405

PATCH API Version - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.4
    ...    Test title: PATCH API Version - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH API Version
	Check HTTP Response Status Code Is    405
    
DELETE API Version - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.5
    ...    Test title: DELETE API Version - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE API Version
	Check HTTP Response Status Code Is    405
	
POST API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.6
    ...    Test title: POST API version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that POST method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none    
    POST API Version
	Check HTTP Response Status Code Is    405
    
GET API Version with apiMajorVerion
    [Documentation]    Test ID: 12.3.1.8.7
    ...    Test title: GET API Version with apiMajorVerion
    ...    Test objective: The objective is to test that GET method successfully return ApiVersionInformation
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    GET API Version
	Check HTTP Response Status Code Is    200
	Check HTTP Response Body Json Schema Is    ApiVersionInformation

PUT API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.8
    ...    Test title: PUT API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    PUT API Version
	Check HTTP Response Status Code Is    405

PATCH API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.9
    ...    Test title: PATCH API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    PATCH API Version
	Check HTTP Response Status Code Is    405
    
DELETE API Version with apiMajorVerion - Method not implemented
    [Documentation]    Test ID: 12.3.1.8.10
    ...    Test title: DELETE API Version with apiMajorVerion - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not implemented
    ...    Pre-conditions: none
    ...    Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.2.1
    ...    Config ID: config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: none 
    DELETE API Version
	Check HTTP Response Status Code Is    405

*** Keywords ***
POST API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
POST API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Post    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
GET API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Get    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PUT API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Put    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
PATCH API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Patch    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
DELETE API Version with apiMajorVersion
    Set Headers    {"Accept":"${ACCEPT}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions
    ${outputResponse}=    Output    response
	Set Global Variable    ${response}    ${outputResponse} 
	
Check HTTP Response Status Code Is
    [Arguments]    ${expected_status}    
    Should Be Equal As Strings    ${response['status']}    ${expected_status}
    Log    Status code validated 

Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    ${schema} =    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
 No newline at end of file
+698 −0

File added.

Preview size limit exceeded, changes collapsed.

+123 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading