Testing Coroutines — Update 1.6.0

Photo by Ricardo Gomez Angel on Unsplash

Building Blocks

TestCoroutineScheduler

TestDispatcher

TestScope

runTest

Multiplatform Support

Standard- and UnconfinedDispatcher

Behavior of advancing time changed

Sharing the Scheduler with multiple Dispatchers

starting
1
unconfined is already started, runCurrent() will start standard
2
advanceTimeBy(n) will not run task scheduled at currentTime + n …
… but runCurrent() will:
3
runTest() will auto-advance all pending tasks at the end
4

Main Dispatcher

--

--

--

Developer @ https://www.compeople.de. Married, two children. Playing bass guitar.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Kubernetes Operator for Beginners — What, Why, How

MongoDB CRUD operation?

What is the Microsoft Power Platform in Layman’s Terms?

Indeed! It’s true. Clear GATE exam by studying at TestUrSelf.

Basic concepts of Spring MVC in OpenMRS

How brutalist design is taking over the internet

{UPDATE} Adia: playlist music game Hack Free Resources Generator

How to mine Ravencoin?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ralf Stuckert

Ralf Stuckert

Developer @ https://www.compeople.de. Married, two children. Playing bass guitar.

More from Medium

Android Gradle plugin with Test Fixtures support

Using Jetpack Compose in XML/View and Vice Versa : Perfect Interoperability🧁

Collect Kotlin’s Flow Lifecycle Aware With Style

An image of a waterfall.

Evolve Unidirectional Data Flow a.k.a MVI into MVVM + Jetpack Compose