Hi
Motivation
How can i autotest the UI ?
Solution
Espresso
- very simple functionality : onView\onData->perform->check
- ViewMatchers : withId , ...
- ViewActions : click , typeText , pressKey , clearText
- ViewAssertions : matches(Matcher) , ....
- onView(withId(R.id.my_view))
.perform(click())
.check(matches(isDisplayed()));
- notice 3 operations : 1. get view 2. perform operation 3. check result
Espresso runs under "androidTest" i.e. under Device\Emulator
Espresso with intents
suppose i have activity which return info - how can i test it ?
looks like the following link has the answer - here
Questions :
- More solutions ??
- Does it run inside JUnit
- how to check layout order
Reference
Nathan