blob: 482b698fe35cee95ec3c83c02d3ac03fbecc230b [file] [log] [blame]
Filip Krzywkad95a6702018-08-06 10:07:03 +02001*** Settings ***
2Library DcaeAppSimulatorLibrary
Filip Krzywkae2634752018-08-06 10:37:39 +02003Library XnfSimulatorLibrary
4Library VesHvContainersUtilsLibrary
5Library Collections
6
7Suite Setup Message Routing Suite Setup
8Suite Teardown VES-HV Collector Suite Teardown
9Test Teardown VES-HV Collector Test Shutdown
Filip Krzywkad95a6702018-08-06 10:07:03 +020010
Filip Krzywka93185782018-08-06 09:31:40 +020011*** Test Cases ***
Filip Krzywkae2634752018-08-06 10:37:39 +020012Correct Messages Routing
13 [Documentation] VES-HV Collector should route all valid messages to topics specified in configuration
14 ... and do not change message payload generated in XNF simulator
15
16 ${SIMULATORS_LIST}= Get xNF Simulators 1
17 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_FIXED_PAYLOAD_REQUEST}
18
Filip Krzywkad95a6702018-08-06 10:07:03 +020019 Wait until keyword succeeds 60 sec 5 sec
Filip Krzywkae2634752018-08-06 10:37:39 +020020 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
Filip Krzywka81f5d522018-08-06 10:44:47 +020021 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST}
Filip Krzywkae2634752018-08-06 10:37:39 +020022
Jakub Dudycze50e9172018-08-06 10:52:37 +020023
24Too big payload message handling
25 [Documentation] VES-HV Collector should interrupt the stream when encountered message with too big payload
26
27 ${SIMULATORS_LIST}= Get xNF Simulators 1
28 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_TOO_BIG_PAYLOAD_REQUEST}
29
30 Wait until keyword succeeds 60 sec 5 sec
31 ... Assert Dcae App Consumed Less Equal Than ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
32
33
34Invalid wire frame message handling
35 [Documentation] VES-HV Collector should skip messages with invalid wire frame
36
37 ${SIMULATORS_LIST}= Get xNF Simulators 1
38 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_INVALID_WIRE_FRAME_REQUEST}
39
40 Wait until keyword succeeds 60 sec 5 sec
41 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
42 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST}
43
44
45Invalid GPB data message handling
46 [Documentation] VES-HV Collector should skip messages with invalid GPB data
47
48 ${SIMULATORS_LIST}= Get xNF Simulators 1
49 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_INVALID_GPB_DATA_REQUEST}
50
51 Wait until keyword succeeds 60 sec 5 sec
52 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
53 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST}
54
55
56Unsupported domain message handling
57 [Documentation] VES-HV Collector should skip messages with unsupported domain
58
59 ${SIMULATORS_LIST}= Get xNF Simulators 1
60 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_UNSUPPORTED_DOMAIN_REQUEST}
61
62 Wait until keyword succeeds 60 sec 5 sec
63 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
64 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST}
65
Filip Krzywkae2634752018-08-06 10:37:39 +020066*** Keywords ***
67Message Routing Suite Setup
68 Log Started Suite: VES-HV Message Routing
69 ${XNF_PORTS_LIST}= Create List 7000
70 Configure xNF Simulators On Ports ${XNF_PORTS_LIST}
71 Log Suite setup finished
72
73Configure xNF Simulators On Ports
74 [Arguments] ${XNF_PORTS_LIST}
75 ${XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} True
76 Set Suite Variable ${XNF_SIMULATORS_ADDRESSES}
77
78
79Get xNF Simulators
80 [Arguments] ${AMOUNT}
81 ${SIMULATORS}= Get Slice From List ${XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
82 [Return] ${SIMULATORS}
83
84
85Send Messages From xNF Simulators
86 [Arguments] ${XNF_HOSTS_LIST} ${MESSAGE_FILEPATH}
87 :FOR ${HOST} IN @{XNF_HOSTS_LIST}
88 \ ${XNF_SIM_API_ACCESS}= Get xNF Sim Api Access Url ${HTTP_METHOD_URL} ${HOST}
89 \ ${XNF_SIM_API_URL}= Catenate SEPARATOR= ${XNF_SIM_API_ACCESS} ${XNF_SIM_API_PATH}
90 \ Send messages ${XNF_SIM_API_URL} ${MESSAGE_FILEPATH}
91
92
93VES-HV Collector Test Shutdown
94 Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL}
95
96
97VES-HV Collector Suite Teardown
98 Stop And Remove All Xnf Simulators
99
100*** Variables ***
101${HTTP_METHOD_URL} http://
102
103${XNF_SIM_API_PATH} /simulator/async
104
105${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
106${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json
Jakub Dudycze50e9172018-08-06 10:52:37 +0200107${XNF_TOO_BIG_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/too-big-payload/xnf-too-big-payload-request.json
108${XNF_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/xnf-invalid-wire-frame-request.json
109${XNF_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/xnf-invalid-gpb-data-request.json
110${XNF_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/xnf-unsupported-domain-request.json
Filip Krzywkae2634752018-08-06 10:37:39 +0200111
Jakub Dudycze50e9172018-08-06 10:52:37 +0200112${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json
113${DCAE_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/dcae-invalid-wire-frame-request.json
114${DCAE_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/dcae-invalid-gpb-data-request.json
115${DCAE_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/dcae-unsupported-domain-request.json
116
117${AMOUNT_25000} 25000
118${AMOUNT_50000} 50000