diff options
4 files changed, 39 insertions, 0 deletions
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 3e413661c..c0a96dbc4 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -27,6 +27,9 @@ Configure Dcae App ${DCAE_APP_API_MESSAGES_COUNT_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_COUNT_PATH} Set Suite Variable ${DCAE_APP_API_MESSAGES_COUNT_URL} children=True + ${DCAE_APP_API_MESSAGES_VALIDATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_VALIDATION_PATH} + Set Suite Variable ${DCAE_APP_API_MESSAGES_VALIDATION_URL} children=True + ${DCAE_APP_API_TOPIC_CONFIGURATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} Wait until keyword succeeds 10 sec 5 sec ... Configure Dcae App Simulator To Consume Messages From Topics ${DCAE_APP_API_TOPIC_CONFIGURATION_URL} ${ROUTED_MESSAGES_TOPIC} @@ -45,6 +48,7 @@ ${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} /configuration/topics ${DCAE_APP_API_MESSAGES_RESET_PATH} /messages ${DCAE_APP_API_MESSAGES_PATH} /messages/all ${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count +${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate ${ROUTED_MESSAGES_TOPIC} test-hv-ran-meas diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/hv-ves.robot b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/hv-ves.robot index 3ed6b92c4..6d8640a1c 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/hv-ves.robot +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/hv-ves.robot @@ -18,6 +18,7 @@ Correct Messages Routing Wait until keyword succeeds 60 sec 5 sec ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} + Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST} *** Keywords *** Message Routing Suite Setup @@ -60,5 +61,6 @@ ${XNF_SIM_API_PATH} /simulator/async ${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios ${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json +${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json ${AMOUNT_25000} 25000
\ No newline at end of file diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py index 29e5b5721..80a5c41cf 100644 --- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py @@ -24,3 +24,13 @@ class DcaeAppSimulatorLibrary: resp = HttpRequests.session_without_env().delete(app_url, timeout=5) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) + def assert_DCAE_app_consumed_proper_messages(self, app_url, message_filepath): + logger.info("POST at: " + app_url) + file = open(message_filepath, "rb") + data = file.read() + file.close() + + resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=5) + HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) + + diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json new file mode 100644 index 000000000..fb53f50ec --- /dev/null +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json @@ -0,0 +1,23 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "HVRANMEAS", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name" + }, + "messageType": "FIXED_PAYLOAD", + "messagesAmount": 25000 + } +] |