In this tutorial, we will quickly explore some basic to high-level approaches for testing microservice applications built using Kafka. Also, we will learn about the advantages of the declarative way of testing Kafka applications over the traditional/existing way of testing.
For everything explained here, we can find running code examples in the “Conclusion” section of this post.
To keep the tutorial concise, we will demonstrate only the below aspects.
I strongly recommend reading through the Minimum Things We Need To Know For Kafka Testing post before proceeding with this tutorial.
The difficult part is some part of the application logic or a DB procedure keeps producing records to a topic and another part of the application keeps consuming the records and continuously processes them based on business rules.
The records, partitions, offsets, exception scenarios, etc. keep on changing, making it difficult to think in terms of what to test, when to test, and how to test.
#microservices #api testing #microservice best practices #kafka tutorial #kafka topics