Ilya Mashin
Ilya Mashin

Reputation: 954

Android Espresso: why my tests don't pass in multi-module project?

I started to split my single module project into many modules. Before this my tests passed. But now I have an error:

androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (is displayed on the screen to the user and with id: com.ecwid.android:id/some_id)

I moved some base custom views to the "general" module which shared with all other modules and all these views in the tests don't pass with a no ids matching.I have an "app" module which has all my tests. Maybe I wrote my dependencies in gradle badly? It's like:

androidTestImplementation project(':general')

Also the Espresso dependencies were added to all modules.

Upvotes: 2

Views: 868

Answers (1)

NeDimom Vam
NeDimom Vam

Reputation: 78

Shouldn't it be testImplementation instead of androidTestImplementation?

Upvotes: 1

Related Questions