This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
This is wonderful. Have you done anything similar for Android Unit Tests? I'd love to stop extending ActivityUnitTestCase
This is definitely non-gross. Thanks Jake.
Now first-party in a test support library https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
Does anybody know how to get Instrumentation from android/support/test/rule/ActivityTestRule ?
I'm need it for Robotium instance.
Still use Jake's @rule for now...
Hi Jake,
Is there any means by which i can get the reference of Activity before its onCreate is called?
I want this because i want to inject mocks from tests into Activity.
Android testing support library already includes their ActivityTestRule. Why do we need this ActivityRule?
@IgorGanapolsky Mine came first.
hi all, need your expertise here. I m not sure why my JUnit4.class is in red color. I already sync gradle
/* JUnit4 & Espresso */
androidTestCompile 'com.android.support.test:runner:0.3'
// Set this dependency to use JUnit 4 rules
androidTestCompile 'com.android.support.test:rules:0.3'
but not working?any 1 know why?
Use: