Unit Testing Kotlin Channels & Flows

Mohit Sarveiya

Android Engineer

Unit testing Channels and 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. These examples are testing delays, retries, and errors. I'll also share testing more complex examples such as polling. 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.

Mohit Sarveiya is a Google Developer Expert in Kotlin and an Android Engineer. Prior to building Android apps, he was a Backend Engineer. He has worked on implementing Kotlin on both backend and Android. He was an early adopter of Kotlin and absolutely loves the language. He has given many talks and workshops on Kotlin.

droidcon Americas is produced by:

Mobile Seasons GmbH (droidcon Global HQ)

Messedamm 22

14055, Berlin

Germany

.droidcon is a registered Trademark of Mobile Seasons GmbH

  • dc-social
  • Twitter - White Circle
  • Facebook - White Circle