150 likes | 300 Views
UI testing Android apps. Using the Espresso testing framework. Unit testing vs UI testing. Unit testing. UI testing. Tests an application Or a part of an application Black box The tester does not need access to the source code How
E N D
UI testing Android apps Using the Espresso testing framework UI testing Android apps
Unit testing vs UI testing Unit testing UI testing Tests an application Or a part of an application Black box The tester does not needaccess to the source code How Interacts with the UI and make assertions about the state of the UI • Tests a single unit (class) • Usually the methods of a single class • White box • The tester has access to the source code • How • Calls the methods and makeassertationsabout the result UI testing Android apps
Espresso testing framework • Manyframeworks to do UI testing and Android apps • Espresso is a popular framework • https://developer.android.com/training/testing/espresso/ • Example: CollectWords + uitesting (intents) • Test cases canbe • Programmed or • Recorded from userinteraction • Run -> Record Espresso Test • https://developer.android.com/studio/test/espresso-test-recorder • Execution • The test is executed on a device or emulator UI testing Android apps
Gradle Stuff + Test UI testing Android apps