# Migrating to the new coroutines 1.6 test APIs

DevFeed: [Migrating to the new coroutines 1.6 test APIs](<https://devfeed.tech/articles/migrating-to-the-new-coroutines-1-6-test-apis-27041.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/migrating-to-the-new-coroutines-1-6-test-apis-b99f7fc47774>)

Author: Márton Braun

Published: 2022-06-29T20:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [migration](<https://devfeed.tech/topics/migration.md>), [unit tests](<https://devfeed.tech/topics/unit-tests.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [junit](<https://devfeed.tech/tags/junit.md>), [migration](<https://devfeed.tech/tags/migration.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

## AI overview

This tutorial explains how to migrate Android projects from deprecated coroutines 1.6 testing APIs to the new APIs. It covers using runTest, handling the main thread in unit tests, and testing Flow collection.

## Source excerpt

See the steps we took to migrate our samples to the new APIs, and then get started on migrating your own project!