Unit testing Akka Streams
In this section, we will discuss how to unit test Akka Streams, using Akka Toolkit's testing modules.
As we discussed in the previous section, like the actor-testkit module for Akka's Actors, the akka-stream-testkit module is useful for testing the components of the Akka Stream's API. However, we can test Akka Stream's components, using the actor-testkit module, too.
As we discussed in Chapter 7, Working with Reactive Streams, Akka Streams have mainly the following three components:
- Source
- Flow
- Sink
We are going to unit test these three components in the coming sections. Please refer to this GitHub repository for the next two sub-sections: https://github.com/rposa-srp-book/srp-book-examples/tree/master/Chapter-7/akka-streams-scala-helloworld-app ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access