
Android Espresso Revealed: Writing Automated UI Tests
Denys Zelenchuk
Résumé
Android Espresso Revealed explains the basics of using Espresso to write automated UI tests, and how to customize the framework for advanced functionality. The author provides examples in both Java and Kotlin, and includes dealing with network operations in UI tests, testing application accessibility, implementing supervised monkey tests, and more.
What You Will Learn
- Write Espresso tests with both Kotlin and Java including test project migration from Java to Kotlin
- Test web views inside the application under test
- Use Espresso to set up test devices or emulators to minimize test flakiness and run tests in Firebase Test Lab
- Verify and stub intents with Espresso-Intents
- Move test projects to AndroidX
- Test notifications or operate on third-party apps during Espresso test execution
- Apply different test architecture approaches to the test project to reduce maintenance effort
- Implement supervised monkey tests using Espresso and UIAutomator
Who This Book Is For Engineers with experience of Android test automation will benefit from this book
Chapter 2: Customizing Espresso for our needsWith more advanced examples reader will learn how to implement custom ViewActions, including clicks and swiping actions; ViewMatchers, such as: matching complex views, RecyclerView matchers or Drawable matchers. It will be shown how to use custom actions and matchers, implement custom FailureHandler with possibility to take and save screenshots on failure.
Chapter 3: Handling network operations or long lasting actionsExplains how to handle application network requests or long lasting operations during test execution with the help of IdlingResource interface. Provides an example about ConditionalWatcher as an alternative to IdlingResource.
Chapter 4: Verifying and stubbing intents with IntentMatchersShows IntentMatchers usage inside the application under test as well as possibility to stub external intents and provide back extras. A good example of external intent can be selecting image from the photo gallery which then can be used by our application under test.
Chapter 5: Testing web viewsHere reader will be given an overview about testing web views inside application under test.
Chapter 6: Writing Espresso tests with KotlinKotlin is gaining big popularity in Android developers world recently. So, in this chapter author will give an introduction into testing with Kotling and Espresso, tell about benefits of using Kotlin programming language, show how to migrate Java test code into Kotlin.
Chapter 7: Test automation toolingAfter reading this chapter reader will understand how to use Espresso test recorder, set up test device or emulator to minimize test flakiness and run tests in Firebase cloud.
Chapter 8: Espresso and UIAutomator - the perfect tandemThis chapter shows one of the most powerful test automation setup for Android, which combines Espresso test framework together with UIAutomator testing tool. There will be examples how to test notifications or operate on third party apps during Espresso tests execution.
Chapter 9: Accessibility testingAn example of how to test application accessibility with Espresso.
Chapter 10. Screen Object architecture approachWill show how to apply Screen Object (the same as page object) architecture approach to the test project which allows to reduce maintenance effort spent on reworking tests after changes in application under test source code.
Chapter 11: Supervised monkey tests using Espresso and UIAutomatorThe last chapter will give an example how to implement supervised pseudo monkey tests using Espresso and UIAutomator.
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Apress |
Auteur(s) | Denys Zelenchuk |
Parution | 28/02/2019 |
Nb. de pages | 308 |
EAN13 | 9781484243145 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse