Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UI Espresso Test on Dynamic feature modules

The firebase test lab accept an App Bundle / APK and an android test APK and with dynamic feature module UI tests fail on Firebase test lab. The error is about some multi dex problem indicating that the feature module is not found in the base apk which makes sense if they don't take care of dynamic feature module. wondering if anyone ran to the same issue or someone from the firebase test lab team can help on this.

So the problem is running Espresso UI Test for dynamic feature modules, android studio fails to run them but latest gradle plugin takes care of it properly. it basically installs the base module first and then try to install the feature test apk and everything works properly. (Have some issues with running tests for particular method but this is not the case of my question). the command line that works is famous connectedAndroidTest command. The problem is running those on Firebase test lab.

like image 948
vahidlazio Avatar asked Jun 11 '19 14:06

vahidlazio


1 Answers

You can check my question and my answer here:

Create Unit and Instrumentation test for Android project with dynamic features

Basically, you need to add the test dependency in the Dynamic Feature build.gradle:

dependencies {
    implementation project(":app")
    androidTestImplementation project(":app")
}

With this approach, I'm successfully testing against with Firebase Test Lab

like image 169
robigroza Avatar answered Sep 27 '22 16:09

robigroza