Skip to main content

The Screen Object Design Pattern in Android UI Tests

  • Chapter
  • First Online:
Android Espresso Revealed
  • 1100 Accesses

Abstract

The Screen Object Design Pattern in mobile UI tests is equivalent to the well known Page Object Design Pattern in web tests, which is the abstraction layer representing an interface that allows its users to operate page elements or validate the page state. Since Page Object takes its name from the web page, it is hard to name a mobile application View or Screen, which is represented to the users as a page. This chapter demonstrates how the Screen Object Design Pattern can be applied to Android UI tests using Kotlin. You will learn to create a screen object that represents a single Android application activity or fragment (i.e., a screen) and then use these objects or their methods in tests that represent real user flows.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+
from €37.37 /Month
  • Starting from 10 chapters or articles per month
  • Access and download chapters and articles from more than 300k books and 2,500 journals
  • Cancel anytime
View plans

Buy Now

Chapter
EUR 29.95
Price includes VAT (Netherlands)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 49.99
Price includes VAT (Netherlands)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 65.39
Price includes VAT (Netherlands)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Denys Zelenchuk

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Zelenchuk, D. (2019). The Screen Object Design Pattern in Android UI Tests. In: Android Espresso Revealed. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4315-2_11

Download citation

Publish with us

Policies and ethics