-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Coroutines in Espresso #462
Comments
Any word on this? |
I think it's much better to have proper hooks and use DI to replace dispatchers instead of letting Espresso do magic that you might or might now fully understand. |
I can see that. I feel like it is possible to argue that having a UI testing framework be aware of async work feels like magic that's worth having but that aside it'd be nice to think about specifically how we'd get to a place where it's possible to write stable tests in Espresso while using coroutines. Maybe there are already docs on this that I've totally missed so sorry in advance if that's the case! In my head there are couple of things that we could do here:
Is there an opinion on which of these would be the right thing™️ to do or in your head would a completely separate route be appropriate? |
@JoseAlcerreca "support" doesn't necessarily mean it's on by default. @brettchabot what do we need to do/help with to get official documented support? |
With the deprecation of
AsyncTask
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 forAsyncTask
- as the docs say 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.
The text was updated successfully, but these errors were encountered: