This is a scope of my instrumented test:
...
import androidx.test.rule.ActivityTestRule
@RunWith(AndroidJUnit4::class)
@LargeTest
class InstrumentDialogFragmentTest {
@get:Rule
val activityRule = ActivityTestRule(MainActivity::class.java)
}
My gradle:
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test:rules:1.4.0'
I'm getting this warning:
'ActivityTestRule<T : Activity!>' is deprecated. Deprecated in Java
You can still use it on 'androidx.test:rules:1.2.0'.
It is deprecated on 1.4.0.
Use ActivityScenario or ActivityScenarioRule instead.
Learn more about ActivityTestRule: developer.android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With