Skip to content

Integration Tests

Ivan Yourshaw edited this page Mar 25, 2024 · 16 revisions

How to Run Test Scripts

Prerequesites:

A test machine with:

Clone this wiki repository to the test machine.

Run the following applications in Docker:

Conflict Visualizer

The output of the Conflict Monitor can be viewed in the Conflict Visualizer GUI.

With the Visualizer running in Docker, access the visualizer using a browser pointed to http://localhost:3000, and view the Notifications and Map for the query being run.

Use kcat to view kafka topics directly

The command line tool kcat can be used to directly view activity on kafka topics.

Kafa must be mapped to localhost:9092.

Follow the output topic, and optionally the input (OdeJson___) topics, for the test being run. For example for the "BSM Events" test, the following command follows the input and output topics:

$ kafkacat -b localhost:9092 -G group topic.OdeBsmJson topic.CMBsmEvents -f '\nTopic: %t\nKey: %k\nOffset: %o\nTimestamp: %T\nValue: %s\n'

Running Scripts

Run scripts using the command line tool script-runner-cli.jar in the /jpo-conflictmonitor/scripts/IntegrationTestScripts folder in the 'usdot-jpo-ode/jpo-conflictmonitor' repository.

Example:

$ cd IntegrationTestScripts
$ java -jar script-runner-cli.jar Script-BSMs.csv

View the kcat output to check that the output event was produced.