android / android/android-test
Support Coroutines in Espresso
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
With the [deprecation of `AsyncTask`](https://android-review.googlesource.com/c/platform/frameworks/base/+/1156409/6/core/java/android/os/AsyncTask.java#196) I'd imagine many apps are starting to look at a switch to coroutines. One outstanding problem is that (as far as I'm aware) Espresso does not have the same support for coroutines as it does for `AsyncTask` - as the [docs say](https://developer.android.com/training/testing/espresso/) Espresso will not make assertions until "There are no instances of AsyncTask currently executing a task".
This feature has always been a massive positive for Espresso and makes TDD/BDD workflows in Android comparatively easy so the lack of coroutine support is still a large blocker for adopting them - for me at least.
Contributor guide
Research direction
Start by reviewing Espresso's existing AsyncTask synchronization behavior and the linked Espresso documentation. The work is done when Espresso provides equivalent synchronization for coroutines so assertions wait until relevant coroutine work has completed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100