Section V - service testing

Retrieving Test Data

We can now call the RESTful service to provide test data that is generated from the profile that is maintained by the Data Sample Analyzer microservice.

./scripts/curl-tdg.sh names
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Jonn
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Jon
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Johatton
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Jonn
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Johatton
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Jonny
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Jon
ArchConfWorkshopUser:~/environment $ ./scripts/curl-tdg.sh names
Jonn
circle-info

Notice that the test data generated is very limited due to the data we entered:

The first 2 letters is always Jo and the 3rd character is either a n or a h

Continuous Analyzing

First, ensure that the Data Analyzer microservice for the names topic is still running.

./target/debug/tdg_analyzer --topic names

Using the terminal where the Kafka producer is still running for the names topic, start feeding it more names.

kafka_2.13-2.6.0/bin/kafka-console-producer.sh --topic names --bootstrap-server localhost:9092

circle-info

You should see messages in the Data Analyzer's consoler that the names are being processed.

Call the RESTful endpoint again and see what test data is now generated.

Last updated