I am still figuring out Android unit tests. Also, still somewhat new to android and so some of the UI components puzzle me a little. I have inherited a complex android application with no unit tests and am attempting to write unit tests as I work on things.
I have an activity that extends ActionBarActivity and is basically a menu. The activity contains one listview and each item has an icon. Clicking an item in the list view takes you to another activity.
The items on the listview are conditionally added. I have been able to access the listview, and make sure the proper items are added in the proper condtions.
Now I want to go through the list view one at a time and click the item and make sure the right activity is getting launched.
I've read the documentation here: http://developer.android.com/training/activity-testing/activity-ui-testing.html, but it seems to me that dynamic list views are a little different since the list view has a name, but it's individual items all have the same name, right?
So how do I access the individual rows of my listview and click them to check my event?