Android instrumentation test only works for app module

98 Views Asked by At

I a have multi module android app. I need to write some instrumentation test for my app but only instrumentation test from app module are working. These tests run fine and either pass or fail but instrumentation test from other module are not even recognized.

I use assembleAndroidTest gradle task to build instrumentation test APK, the install is with adb and run adb shell am instrument -w com.example.test/androidx.test.runner.AndroidJUnitRunner to run test.

For the result I only see test which are in app module. I analyzed generated APK but only tests from app module were included.

I even used android studio to specifically run test in other modules but i faced message below:

enter image description here

0

There are 0 best solutions below