Closed androidcodehunter closed 2 years ago
Can you check your device's Logcat? It might be that some exception is occurring during test startup and showing in Studio as 'no tests ran'.
@danysantiago actually logcat not showing anything though I run this command and got this error
adb shell am instrument -w -m -e debug false -e class 'com.pinwheel.desktop.NormalTestCheck#doRunTest' ```
com.pinwheel.desktop.test/com.pinwheel.desktop.HiltTestRunner
"
shortMsgProcess crashed.
@danysantiago I dig into more about this issue. I am using ContentProvider where I am using Room database injection using EntryPoint. Once I remove inject from contentprovider everything works fine otherwise it just runs indefinitely. Thanks for your time.
Ok, glad you were able to figure it out!
I am trying to write UI test using Hilt. When using
androidx.test.runner.AndroidJUnitRunner
tests always run with status passed or failed but when usingmypackage.HiltTestRunner
it's always 0 tests passed for any test cases under@HiltAndroidTest
. Here is the class I am using to get the AndroidJUnitRunner,I included the AndroidJUnitRunner in my gradle like this
testInstrumentationRunner = "com.pinwheel.desktop.HiltTestRunner"
To check hilt test integration I am running a sample activity like this,
Whatever I run it always say 0 tests passed. Here is the screenshoot from android studio bumblebeee,