I am new to Android and building an app in Android Studio. I have written some tests using JUnit and Mockito.
The tests run successfully and in the run console the text
Process finished with exit code 0 is shown.
However, the thread seems to remain active, the stop button is enabled and nothing happens even if I click on it. If I try to start multiple test configurations, they all remain active although the processes finish successfully.
I hope the question is clear enough… I have searched a lot for the answer and mananged to find nothing.
Ok, so after a little more research and some more checking I have concluded that the problem stands in a visual bug of Android Studio. Apparently the tests do indeed stop, the thread running them too. The problem is purely visual.
That can be fixed by following these steps:
- Open ‘Run’ tab in Android Studio
- Tap ‘X’ next to test which has just passed