I am trying to write a Robolectric test. I was following few tutorials where they seem to be using
@RunWith(RobolectricTestRunner::class)
@Config(constants = BuildConfig::class)
to setup the test, but in my case The parameter constants does not seem to resolve.
My Robolectric dependency looks like this:
testImplementation "org.robolectric:robolectric:4.0.2"
Robolectric is for
unit
test, not forandroidTest
, so please confirm that your test case is undersrc/test
, NOT undersrc/androidTest
.