blob: 941f66476b7531058ccaf7ecec61303390962ad7 [file] [log] [blame]
marekpl503647c2018-10-24 14:33:25 +02001*** Settings ***
DR695H910097e2019-05-08 13:55:32 -04002Documentation HV-VES 'Sunny Scenario' Robot Framwork test - message is sent to the collector and Kafka topic is checked if the message has been published.
3
4
5Library Rammbock
6Library OperatingSystem
marekpl503647c2018-10-24 14:33:25 +02007Resource ${EXECDIR}/robot/resources/global_properties.robot
8Resource ${EXECDIR}/robot/resources/test_templates/hvves_template.robot
9Suite Teardown Reset Rammbock
10
11*** Variables ***
12
13*** Test Cases ***
14HV-VES test case
DR695H910097e2019-05-08 13:55:32 -040015 [Tags] HVVES ete
16 [Timeout] 10s
marekpl503647c2018-10-24 14:33:25 +020017 ${msg_number_initial}= Check Number Of Messages On Topic ${GLOBAL_DNS_MESSAGE_ROUTER_KAFKA_NAME} ${GLOBAL_MESSAGE_ROUTER_KAFKA_PORT} ${hvves_kafka_topic}
18 Define WTP Protocol
19 Start HV-VES TCP Client And Send Message ${GLOBAL_DNS_HV_VES_NAME} ${GLOBAL_HV_VES_SERVER_PORT}
marekpl62c91a92018-10-29 12:13:58 +010020 Wait Until Keyword Succeeds 5s 1s Check If Topic Exists ${GLOBAL_DNS_MESSAGE_ROUTER_KAFKA_NAME} ${GLOBAL_MESSAGE_ROUTER_KAFKA_PORT} ${hvves_kafka_topic}
marekpl503647c2018-10-24 14:33:25 +020021 ${msg_number_after}= Check Number Of Messages On Topic ${GLOBAL_DNS_MESSAGE_ROUTER_KAFKA_NAME} ${GLOBAL_MESSAGE_ROUTER_KAFKA_PORT} ${hvves_kafka_topic}
22 Should Not Be Equal As Integers ${msg_number_initial} ${msg_number_after}
23 Download VesEvent Proto File ${EXECDIR}
24 ${msg_decoded}= Decode Last Message From Topic ${GLOBAL_DNS_MESSAGE_ROUTER_KAFKA_NAME} ${GLOBAL_MESSAGE_ROUTER_KAFKA_PORT} ${hvves_kafka_topic} ${EXECDIR}
25 ${msg_decoded_template}= Get File ${EXECDIR}/robot/assets/templates/hvves/hvves_decoded_msg.template
26 Should Be Equal As Strings ${msg_decoded} ${msg_decoded_template}