Hi, thanks for sharing your solution!
I have a question about your test setup — are you testing only single Activities or do you also perform E2E tests spanning across multiple Activities? The idling resource implementation you posted uses `activityTestRule.activity` so that would be always the launching Activity so this…
You got some good points there.
“executing an already disposed use case” — that’s true, we get occasionally these :/
Almost all our use cases should make some operations on the background thread and return on the main thread — having “execute” avoids a lot of boilerplate…
I think it should be possible. You could create an alternative “execute” method e.g. “executeWith” which would not attach a subscriber but use the output as params to a different use case. It is something we actually could use in a number of places in our app — I’ll try to prepare some code samples soon and maybe make an…
Thanks for posting this. That’s a solution we actually use in our own test code. I’m not sure why I haven’t included it in this article TBH.
In our app we’re using Android Test Orchestrator with the “clearPackage” option which clears the data between each test and if I remember correctly it also…
You could always provide two implementations — one with params and one without.
As for the constructor approach — I think that params can be dynamic in many cases (at least in the cases we had) so using a constructor and a params provider might be too much effort. Usually, when we don’t need…
Well, we always had flavors so it’s hard to tell really. However, sometimes when resolving some dependencies or syncing you can see in the logs that’s it’s doing some stuff for all the flavors. This is not an issue normally though.
We used to keep them in the main build.gradle which over time grew rather large… Currently though, we keep them in a separate file. We have a setup similar to the one I’ve described here: https://medium.com/stepstone-tech/modularizing-your-flavored-android-project-5db75c59fb0d which can be quite useful if you’re using more than one flavored module.