CSIT tests update for Synchronous VES collector
[integration/csit.git] / tests / dcaegen2 / testcases / 03__stndDefined_tests.robot
1 *** Settings ***
2 Resource          ./resources/dcae_keywords.robot
3 *** Test Cases ***
4
5 ###################################################
6 # Section for tests with stndDefined validation ON
7 ###################################################
8 Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS
9     [Tags]    DCAE-VESC-R1
10     [Documentation]   Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
11     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_V7_STND_DEF_FIELDS}  202  stndDefined-gNB-Nokia-PowerLost
12
13 Publish VES Event With Empty Stnd Domain Namespace Parameter
14     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
15     [Documentation]   Post single event with invalid data (empty stnd namespace parameter) to /eventListener/v7 endpoint, expect 400 Response Status Code and "Mandatory input %1 %2 is empty in request" message
16     Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_EMPTY_NAMESPACE}   400   Mandatory input %1 %2 is empty in request
17
18 Publish VES Event With Missing Stnd Domain Namespace Parameter
19     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
20     [Documentation]   Post single event with invalid data (missing stnd namespace parameter) to /eventListener/v7 endpoint, expect 400 Response Status Code and "Mandatory input %1 %2 is missing from request" message
21     Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_MISSING_NAMESPACE}    400   Mandatory input %1 %2 is missing from request
22
23 Publish Single VES Event With Empty JSON
24     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
25     [Documentation]   Post single event with empty json and expect 400 Response Status Code
26     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_EMPTY_JSON}  400
27
28 Publish Single VES Event With Missing SourceName Parameter
29     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
30     [Documentation]   Post single event with empty json and expect 400 Response Status Code
31     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_NAMESPACE_3GPP_PROVISIONING_MISSING_SOURCENAME}  400
32
33 Publish Single VES Event With stndDefinedNamespace = 3GPP-Provisioning
34     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
35     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-Provisioning and event should routed to topic unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
36     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_PROVISIONING}  202  unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
37
38 Publish Single VES Event With stndDefinedNamespace = 3GPP-Heartbeat
39     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
40     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-Heartbeat and event should routed to topic unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
41     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_HEARTBEAT}  202  unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT
42
43 Publish Single VES Event With stndDefinedNamespace = 3GPP-PerformanceAssurance
44     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
45     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-PerformanceAssurance and event should routed to topic unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
46     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_PERFORMANCE_ASSURANCE}  202  unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT
47
48 Publish Single VES Event With stndDefinedNamespace = 3GPP-FaultSupervision
49     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
50     [Documentation]   Post single event with stndDefinedNamespace = 3GPP-FaultSupervision and event should routed to topic unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
51     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_3GPP_FAULTSUPERVISION}  202  unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
52
53 Publish Single VES Event With SchemaReference Field Not Set
54     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
55     [Documentation]   Post single event with schemaReference not set and not perform stndDefined validation, but pass general validation stage
56     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_INVALID_DATA_NO_SCHEMA_REF}  202  unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
57
58 Publish Single VES Event With Incorrect Schema Reference
59     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
60     [Documentation]   Post single event with incorrect schemaReference and return error
61     Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_INCORRECT_SCHEMA_REF}  400  Invalid input value for %1 %2: %3
62
63 Publish Single VES Event With Empty StndDefined Data Field
64     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
65     [Documentation]   Post single event with Empty stndDefined data field and return error
66     Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_EMPTY_DATA}  400  The following service error occurred: %1. Error code is %2
67
68 Publish Single VES Event With Invalid Type Of Multiply StndDefined Data Fields
69     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
70     [Documentation]   Post single event with invalid stndDefined data fields and return error
71     Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_INVALID_TYPE_DATA}  400  The following service error occurred: %1. Error code is %2
72
73 Publish VES Batch Event With Different StndDefinedNamespace Parameters
74     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
75     [Documentation]   Post batch event with invalid data (different stndDefinedNamespace values in events) to /eventListener/v7/eventBatch endpoint, expect 400 Response Status Code and "Value of stndDefinedNamespace fields have to be same when domain is stndDefined" message
76     Send Request And Validate Response And Error Message  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_BATCH_STND_DEFINED_TWO_DIFFERENT_STND_NAMESPACE}    400   Value of stndDefinedNamespace fields have to be same when domain is stndDefined
77
78 Publish Batch VES Event With Correct Data
79     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
80     [Documentation]   Post single event with correct stndDefined data
81     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_BATCH_STND_DEFINED_VALID}  202
82
83
84 #####################################################
85 ## Section for tests with stndDefined validation OFF
86 #####################################################
87 Disable VESC StndDefined Validation Checkflag
88     [Tags]    DCAE-VESC-R1  DCAE-VESC-HC  DCAE-VESC-STNDDEFINED
89     [Documentation]  Disable VESC StndDefined Validation Checkflag and Run Health Check
90     Override Collector Properties  ${VES_DISABLED_STNDDEFINED_COLLECTOR_PROPERTIES}
91     Run Healthcheck  ${https_basic_auth_session}
92
93 Publish Single VES Event With Incorrect StndDefined Data
94     [Tags]    DCAE-VESC-R1 DCAE-VESC-STNDDEFINED
95     [Documentation]   Post single event with incorrect stndDefined data
96     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_STND_DEFINED_INVALID_TYPE_DATA}  202
97
98 ############################################################################################
99 ## Section for tests with stndDefined validation ON and schemas with refernce to other files
100 ############################################################################################
101 Add refeerence to other schemas
102     [Tags]    DCAE-VESC-R1  DCAE-VESC-HC  DCAE-VESC-STNDDEFINED
103     [Documentation]  Add refeerence to other schemas and Run Health Check
104     Override Collector Properties  ${VES_ADD_REFERENCE_TO_OTHER_SCHEMAS}
105     Run Healthcheck  ${https_basic_auth_session}
106
107
108 Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS and valid reference to other file
109     [Tags]    DCAE-VESC-R1  DCAE-VESC-HC  DCAE-VESC-STNDDEFINED
110     [Documentation]   Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and valid reference to ther file and expect 202 Response Status Code
111     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_WITH_RFERENCE_TO_VALID_SCHEMA}  202  stndDefined-gNB-Nokia-PowerLost
112
113
114 Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS and invalid reference to other schema file
115     [Tags]    DCAE-VESC-R1  DCAE-VESC-HC  DCAE-VESC-STNDDEFINED
116     [Documentation]   Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and invalid reference to other schema file and expect 400 Response Status Code
117     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_FILE_REF}  400
118
119
120 Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS and invalid internal schema reference
121     [Tags]    DCAE-VESC-R1  DCAE-VESC-HC  DCAE-VESC-STNDDEFINED
122     [Documentation]   Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and invalid internal schema reference and expect 400 Response Status Code
123     Send Request And Validate Response  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_INTERNAL_REF}  400