VnfIndicatorsInVnfInstanceId.robot 6.83 KB
Newer Older
1
2
*** Settings ***
Library           JSONSchemaLibrary    schemas/
3
Resource          environment/variables.txt    # Generic Parameters
4
Resource          environment/vnfIndicatorinVnfInstance.txt
5
Resource          VNFIndicatorsKeywords.robot
6
Library           JSONLibrary
Elian Kraja's avatar
Elian Kraja committed
7
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
8
9

*** Test Cases ***
10
11
12
13
14
15
16
17
18
19
20
21
22
23
*** Test Cases ***
Get Indicators for VNF Instance
    [Documentation]    Test ID: 7.3.6.2.1
    ...    Test title: Get Indicators for VNF Instance
    ...    Test objective: The objective is to test the retrieval of all indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference:  section 8.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all indicators for a VNF instance
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfIndicators
    Check HTTP Response Body Includes Requested VNF Instances ID
24

25
26
27
28
29
30
31
32
33
34
35
36
37
GET Indicators for VNF Instance with attribute-based filter
    [Documentation]    Test ID: 7.3.6.2.2
    ...    Test title: GET Indicators for VNF Instance with attribute-based filter
    ...    Test objective: The objective is to test the retrieval of all indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference: section 8.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all indicators for a VNF instance with filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfIndicators
    Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter
38

39
40
41
42
43
44
45
46
47
48
49
50
Get Indicators for VNF Instance with invalid attribute-based filter
    [Documentation]    Test ID: 7.3.6.2.3
    ...    Test title: Get Indicators for VNF Instance with invalid attribute-based filter
    ...    Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference: section 8.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all indicators for a VNF instance with invalid filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails
51

52
53
54
55
56
57
58
59
60
61
62
63
Get Indicators for VNF Instance with invalid resource identifier
    [Documentation]    Test ID: 7.3.6.2.4
    ...    Test title: Get Indicators for VNF Instance with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response.
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference: section 8.4.3.3.2 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all indicators for a VNF instance with invalid resource identifier
    Check HTTP Response Status Code Is    404
    Check HTTP Response Body Json Schema Is   ProblemDetails
64

65
66
67
68
69
70
71
72
73
74
75
POST Indicators for VNF instance - Method not implemented
    [Documentation]    Test ID: 7.3.6.2.5
    ...    Test title: POST Indicators for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create new indicators for a VNF instance
    ...    Pre-conditions: A VNF instance is instantiated.
    ...    Reference: section 8.4.3.3.1 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Send POST Request for indicators in VNF instance
    Check HTTP Response Status Code Is    405
76

77
78
79
80
81
82
83
84
85
86
87
PUT Indicators for VNF instance - Method not implemented
    [Documentation]    Test ID: 7.3.6.2.6
    ...    Test title: PUT Indicators for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify existing indicators for a VNF instance
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference: section 8.4.3.3.3 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PUT Request for indicators in VNF instance
    Check HTTP Response Status Code Is    405
88

89
90
91
92
93
94
95
96
97
98
99
PATCH Indicators for VNF instance - Method not implemented
    [Documentation]    Test ID: 7.3.6.2.7
    ...    Test title: PATCH Indicators for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update existing indicators for a VNF instance
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference: section 8.4.3.3.4 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PATCH Request for indicators in VNF instance
    Check HTTP Response Status Code Is    405
100

101
102
103
104
105
106
107
108
109
110
111
112
DELETE Indicators for VNF instance - Method not implemented
    [Documentation]    Test ID: 7.3.6.2.8
    ...    Test title: DELETE Indicators for VNF instance - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete indicators for a VNF instance
    ...    Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance.
    ...    Reference: section 8.4.3.3.5 - SOL003 v2.4.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation
    Send DELETE Request for indicators in VNF instance
    Check HTTP Response Status Code Is    405
    Check Postcondition Indicators for VNF instance Exist