Andy Gibel
03/10/2021, 6:21 PMrobotTest {
screenRobot{
precondiitons{
userName = "user"
password = "pass"
}
verify{
errorisShown()
}
}
}
Andy Gibel
03/10/2021, 7:14 PMpsh
03/10/2021, 11:42 PMandroidx.test
you can use Espresso in unit tests. We have our page objects (screens / robots) in their own "sharedTest" source set, so they can be used from Robolectric unit tests too, along with common data setup code. The on-device android tests (the "what") are separated from the screens (the "how").
The pattern has worked well for us overall.