I would like to write tests for Android app with deep link cases using UI testing framework (Espresso) - launch app using only ACTION_VIEW intent and check all views on open
I found one option - just added deep link opening parameters for existed intent and use standard activity launch:
@Rule
public ActivityTestRule activityRule = new ActivityTestRule(AppLauncherActivity.class){
@Override protected Intent getActivityIntent() {
Intent intent = super.getActivityIntent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("myapp://search/777"));
return intent;
}
};