Has anyone figured out how to test fragments in Dynamic feature modules in isolation using fragmentScenario Espresso tests where the app's Activity is in a base module.
I have overcome several issues such as complaints about the style not being Theme.Appcompat and Android Studio not running, but now the withId is complaining at runtime that it can't find an R.id in the fragment's layout.
I solve my problems with instrumented tests in dynamic modules by creating an
AndroidManifest.xmlin the foldersrc/debugof the dynamic module and placing:This will make the application works as monolithic
.apkon tests which is great for local and CI/CD small intrumentation tests.If you need to test the delivery itself in a end-to-end test like suggested here, I am not sure if this will have a impact, but if it has you can still create a flavor for your end-to-end test that override again the manifest.