I want to write espresso scripts to test deep linking and have no idea how to begin with. Looking for solutions that'll help me get more idea, possibly step by step procedure on how to get started.
For ex : I am looking for a scenario like you get a link in gmail tapping on which user should be directed towards the mobile app. How do I get started to test something like this using espresso ?
Thanks in advance.
Start with an activity rule
Then you want something to parse the uri from the link and return the intent
Then you want the activity rule to launch the intent
Well
IntentTestRule
doesn't work properly. So I will try like this with anActivityTestRule
:And then I will write the proper UI Unit Test to be something like this:
With this you are going to test that the deeplink with a given query parameter is actually being retrieved correctly by your activity that is handling the Intent for the deeplinking.