How do I launch an activity that lives in my test-application, not in the tested application
I have a subclass of an abst开发者_如何转开发ract Activity
subclass from the application I am testing that I am trying to instantiate in my test. The subclass lives in my test-application, not in the tested application. So how do I see to it that the instrumentation's launchActivity
finds it? How do I specify it in my manifest?
I tried to add this to the <application>
tag in the test-application manifest:
<activity android:name="com.my.company.application.dialogs.test.MockActivity2">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
com.my.company.application.dialogs.test is the actual java-path to the activity. There is something mentioned about a package path which might not be the same in the instrumentation documentation. Where do I set this and how do I set it so that the correct activity is found (but I must still have access to the other activities in my application)?
精彩评论