I am new to Android testing. The test is very simple:
@RunWith(AndroidJUnit4.class) @SmallTest public class BaseTestCases { @Rule public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class); @Test public void openBBCamera() throws InterruptedException { } }
I expected the activity to be open at the beginning and close at the end of the test, but it will remain in the last list of applications, so the next test just opens the same activity. Is this the desired behavior or is something wrong with my environment or code?
source share