blob: 6153afa0a4e70dc656fde243c1e4f04a75c3b421 [file] [log] [blame]
Filip Krzywkad95a6702018-08-06 10:07:03 +02001*** Settings ***
Filip Krzywkabc1f8962018-09-03 11:05:11 +02002Library DcaeAppSimulatorLibrary
Filip Krzywkae2634752018-08-06 10:37:39 +02003Library XnfSimulatorLibrary
4Library VesHvContainersUtilsLibrary
5Library Collections
6
Filip Krzywkabc1f8962018-09-03 11:05:11 +02007Resource resources/common-keywords.robot
8
Filip Krzywkae2634752018-08-06 10:37:39 +02009Suite Setup Message Routing Suite Setup
10Suite Teardown VES-HV Collector Suite Teardown
11Test Teardown VES-HV Collector Test Shutdown
Filip Krzywkad95a6702018-08-06 10:07:03 +020012
Filip Krzywkabc1f8962018-09-03 11:05:11 +020013*** Keywords ***
14Message Routing Suite Setup
15 Log Started Suite: VES-HV Message Routing
16 ${XNF_PORTS_LIST}= Create List 7000
17 Configure Valid xNF Simulators On Ports ${XNF_PORTS_LIST}
18 Log Suite setup finished
19
Filip Krzywka93185782018-08-06 09:31:40 +020020*** Test Cases ***
Filip Krzywkae2634752018-08-06 10:37:39 +020021Correct Messages Routing
22 [Documentation] VES-HV Collector should route all valid messages to topics specified in configuration
23 ... and do not change message payload generated in XNF simulator
24
Filip Krzywkabc1f8962018-09-03 11:05:11 +020025 ${SIMULATORS_LIST}= Get Valid xNF Simulators 1
Filip Krzywkae2634752018-08-06 10:37:39 +020026 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_FIXED_PAYLOAD_REQUEST}
27
Filip Krzywkad95a6702018-08-06 10:07:03 +020028 Wait until keyword succeeds 60 sec 5 sec
Filip Krzywkae2634752018-08-06 10:37:39 +020029 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
Filip Krzywka81f5d522018-08-06 10:44:47 +020030 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST}
Filip Krzywkae2634752018-08-06 10:37:39 +020031
Jakub Dudycze50e9172018-08-06 10:52:37 +020032
33Too big payload message handling
34 [Documentation] VES-HV Collector should interrupt the stream when encountered message with too big payload
35
Filip Krzywkabc1f8962018-09-03 11:05:11 +020036 ${SIMULATORS_LIST}= Get Valid xNF Simulators 1
Jakub Dudycze50e9172018-08-06 10:52:37 +020037 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_TOO_BIG_PAYLOAD_REQUEST}
38
39 Wait until keyword succeeds 60 sec 5 sec
40 ... Assert Dcae App Consumed Less Equal Than ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
41
42
43Invalid wire frame message handling
44 [Documentation] VES-HV Collector should skip messages with invalid wire frame
45
Filip Krzywkabc1f8962018-09-03 11:05:11 +020046 ${SIMULATORS_LIST}= Get Valid xNF Simulators 1
Jakub Dudycze50e9172018-08-06 10:52:37 +020047 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_INVALID_WIRE_FRAME_REQUEST}
48
49 Wait until keyword succeeds 60 sec 5 sec
50 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
51 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST}
52
53
54Invalid GPB data message handling
55 [Documentation] VES-HV Collector should skip messages with invalid GPB data
56
Filip Krzywkabc1f8962018-09-03 11:05:11 +020057 ${SIMULATORS_LIST}= Get Valid xNF Simulators 1
Jakub Dudycze50e9172018-08-06 10:52:37 +020058 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_INVALID_GPB_DATA_REQUEST}
59
60 Wait until keyword succeeds 60 sec 5 sec
61 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
62 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST}
63
64
65Unsupported domain message handling
66 [Documentation] VES-HV Collector should skip messages with unsupported domain
67
Filip Krzywkabc1f8962018-09-03 11:05:11 +020068 ${SIMULATORS_LIST}= Get Valid xNF Simulators 1
Jakub Dudycze50e9172018-08-06 10:52:37 +020069 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_UNSUPPORTED_DOMAIN_REQUEST}
70
71 Wait until keyword succeeds 60 sec 5 sec
72 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
73 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST}
74
Filip Krzywkae2634752018-08-06 10:37:39 +020075*** Variables ***
76${HTTP_METHOD_URL} http://
77
78${XNF_SIM_API_PATH} /simulator/async
79
80${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
81${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json
Jakub Dudycze50e9172018-08-06 10:52:37 +020082${XNF_TOO_BIG_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/too-big-payload/xnf-too-big-payload-request.json
83${XNF_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/xnf-invalid-wire-frame-request.json
84${XNF_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/xnf-invalid-gpb-data-request.json
85${XNF_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/xnf-unsupported-domain-request.json
Filip Krzywkae2634752018-08-06 10:37:39 +020086
Jakub Dudycze50e9172018-08-06 10:52:37 +020087${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json
88${DCAE_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/dcae-invalid-wire-frame-request.json
89${DCAE_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/dcae-invalid-gpb-data-request.json
90${DCAE_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/dcae-unsupported-domain-request.json
91
92${AMOUNT_25000} 25000
93${AMOUNT_50000} 50000