Hello! We have an app which has UI tests as well a...
# android
v
Hello! We have an app which has UI tests as well as E2E tests. Both of them are in the same module with the app (we have some dependency issues so we did not move them to separate modules for now). The UI tests are under the folder
androidTest
and the E2E tests are under the folder
e2eTest
which is added as a sourceSet for the androidTest. In the UI tests we have a di package that contains
Hilt
modules to provide fakes, but in the E2E tests we want to use the production code. So we tried to exclude the di package like that
java.exclude("**/di/**")
when e2e are about to run. We know when e2e are about to run based on an argument that we pass into the
./gradlew connectedTenantDebugAndroidTest
command. The problem is that this approach does not seem to work. More specifically our E2E tests use the fakes that are declared in the di package. Why does this happen? Is it possible to exclude a package with our approach or is there any limitation for the
androidTest
source sets? Do we have any other alternative (for example, can we generate two independent
androidTest
)?