If I have an app that gets features from other modules, let's say [Login Android Module] -> [App]
. Where should I place the UI tests, in the App
module's androidTest
or in the Login
module's androidTest
? And why?
In general, you should put the majority of the tests in the same module only. In your case, for [Login Android Module]
, you should put the majority of the tests like input validataion, user login validation, etc. into the [Login Android Module]
only. Same goes with [App]
module as well.
Now, since the [App]
module depends on the [Login Android Module]
(that's what I assume from the description, please correct me in case I am wrong), there could be a scenario where the Activity/Fragment/UI/Class of [App] is navigating/using the Activity/Fragment/UI/Class of [Login Android Module]
. In such cases, the testing of this particular flow/integration would be the part of [App]
module only, since the navigation/usage is mainly done by the [App]
module classes.
Why to follow this approach:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.