Kahan Bhalani
Kahan Bhalani

Reputation: 193

Instrumented test is stuck on "Connected to process"

When I try to run the ExampleInstrumentedTest on my Android Studio project, it builds fine, installs the test and then it is stuck on "Connected to process ####..." and no test results are displayed.

I've waited for more than 2 minutes and still no result. When I create a new Android Studio project with Empty Activity, the test runs fine and results are displayed. It's not working unfortunately for my existing project which I had been working on for a long time but never tried to run the Example test.

Things I've tried:

Here's the screenshot of how it looks like:

Instrumented test results output

Upvotes: 0

Views: 649

Answers (2)

Juan Silva
Juan Silva

Reputation: 11

Removing androidx.test.espresso:espresso-core from dependencies did it for me.

Upvotes: 1

Kahan Bhalani
Kahan Bhalani

Reputation: 193

I don't know how I solved this problem but these are the changes I made:

  • I changed the Kotlin version from 1.6 to 1.7.
  • I removed an unnecessary test file Navigation.
  • I removed all the unnecessary testing dependencies.
  • And, finally I clean built the project and voila. It works.

Upvotes: 1

Related Questions