The espresso message is "java.lang.RuntimeException: Test class could not be found". when run from a library project in Android Studio

I have a multi-project application that consists of 3 library projects and 1 application project. One of the library projects contains all of my activities and views and will be reused for similar applications in the future ... so I would like to create and run all my Espresso tests so that I can reuse the same tests on other application projects that will use the same library.

It looks like Espresso can only be launched from within the Application project. When I create and run Espresso tests from the App project, they cannot run any problems.

But when I build and run Espresso tests from my project in the library where everything is going anyway, it cannot find my test class ... although they are the same exact tests that ran successfully in the Application project.

Someone else had this problem. I would add code examples, but I was working on a project without disclosure.

+3


source to share





All Articles