Vaios Tsitsonis
01/03/2023, 11:28 AMandroidTest
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
)?