Unit Testing Kotlin Flows
September 27, 2021 3:20 PM 4:05 PM Online
Unit testing shared and state Flows can be a challenge as they are fairly new. In this talk, I will share with you how to implement and test practical examples from my experience. We’ll take a deep dive into the features of shared and state flows. We’ll explore buffering strategies, replaying events, and flow sharing methods. For each use case, we’ll look at how to use features in the coroutines library such as runBlockingTest and TestCoroutineDispatcher. From my journey of using and testing Flows in production, I’ll share the challenges I experienced.