'Unit tests not running after updated to Android Studio Chipmunk
I have been working on project in Android Studio Bumblebee, and the project contains several packages , some of them have test classes using Junit and Mockito.
So inorder to increase code coverage, I had excluded the packages with zero unit tests in Debug configurations . But after updating to Android Studio Chipmunk, after I exclude any package or any class file and run again, none of the test cases are run and shows this message
Test events were not received
I also tried adding the classes that I need coverage, still the same issue.
Solution 1:[1]
As a workaround you may run the tests through the gradle task window:
Use the command that you used for your run configurations:
gradle testDebugUnitTest --tests "your.package*"
Solution 2:[2]
Add in your module build.gradle testImplementation project(":name-of-your-module").
It's a workaround!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | pedrofsn |

