Commit b039e745 authored by Eisha Ayaz's avatar Eisha Ayaz Committed by Giacomo Bernini
Browse files

[test-new][SOL025][DATA-ANALYTICS][v5.2.1][12.3.1.1.x Test-IDs] Implement new...

[test-new][SOL025][DATA-ANALYTICS][v5.2.1][12.3.1.1.x Test-IDs] Implement new test cases for resource: Analytics and include Keywords and Variables.
parent 1bd4b1cb
Loading
Loading
Loading
Loading
+238 −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
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
    Check HTTP Response Body Json Schema Is    telcoCloudAnalytics

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
+409 −0

File added.

Preview size limit exceeded, changes collapsed.

+28 −0
Original line number Diff line number Diff line
*** Variables ***
${TCDAS_SCHEMA}    https
${TCDAS_HOST}      localhost   
${TCDAS_PORT}      8080    
${apiRoot}        /
${apiName}        nfvtcdas
${apiMajorVersion}    v1

${ACCEPT}         application/json
${ACCEPT_JSON}     application/json
${CONTENT_TYPE}    application/json
${CONTENT_TYPE_PATCH}    application/merge-patch+json
${AUTHORIZATION_HEADER}    Authorization
${AUTHORIZATION_TOKEN}    Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
${API_VERSION}         1.0.0
${response}=    httpresponse
${invalidTcdaType}    RANDOM_TYPE
${AUTH_USAGE}     1
${OAUTH_Encryption_ALGORITHM}   HS256
${ANALYTICS_SCOPE}   nfvtcdas:v1:analytics
${NEG_SCOPE}    nfvtcdas:v1:invalid

${notExistingAnalyticsId}     notExistingAnalyticsId 
${notExistingReportId}     notExistingReportId  
${analyticsId}      analyticsID
${reportId}      reportID
${original_etag}    some_etag
+9 −0
Original line number Diff line number Diff line
{{
  "tcdaType": "INCIDENT_ANALYSIS",
  "controlAttributes": {
      "analyticsCollectionInterval": {
          "startTime": "date-time"
      },
    "objectType": "VNF"
  }
}}
 No newline at end of file
+32 −0
Original line number Diff line number Diff line
{
  "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 is reproduced in this structure. Compared to the general framework defined in IETF RFC 7807, the \"status\" and \"details\" attributes are mandated to be included, to ensure that the response contains additional textual information about an  error. IETF RFC 7807 foresees extensibility of the \"ProblemDetails\"  type. It is possible that particular RESTful NFV-MANO API, or  particular implementations, specify extensions to define additional attributes that provide more information about the error.\n",
  "type": "object",
  "required": [
    "status",
    "detail"
  ],
  "properties": {
    "type": {
      "description": "A URI reference according to IETF RFC 3986 that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n",
      "type": "string",
      "format": "URI"
    },
    "title": {
      "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided.\n",
      "type": "string"
    },
    "status": {
      "description": "The HTTP status code for this occurrence of the problem.\n",
      "type": "integer"
    },
    "detail": {
      "description": "A human-readable explanation specific to this occurrence of the problem.\n",
      "type": "string"
    },
    "instance": {
      "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n",
      "type": "string",
      "format": "URI"
    }
  }
}
Loading