From the course: Building Event-Driven Applications In Go
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Integration and end-to-end testing
From the course: Building Event-Driven Applications In Go
Integration and end-to-end testing
- [Instructor] Unit testing is just one way to asserting the behavior of your code. Particularly for event-driven applications, unit tests alone cannot validate the integration between the different parts of your application to achieve a result. This is best tested in an end-to-end flow. Unlike unit tests, which focus on individual components, integration and end-to-end tests validate the interaction between components and the overall behavior of your system. You see, integration testing, involves testing multiple components together to ensure that they work correctly as a group. In the context of event-driven applications, this often means testing interaction between event handlers, publishers and the broker. Let's head on over to the coding screen to see an example. Here we are in the coding example for this video. On the right, I have the pub_sub.go. This is what we used in a previous video where I had already set up a publisher and a consumer, based on cofluentinc's Kafka-go…